• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to configure Solaris Zone to access a CDROM

By admin

There are times when it would be useful for a zone to access it’s host system’s CDROM device. This can be done using the Loop Back File System(lofs).

Procedure for Solaris 10

# zonecfg -z zone01
zonecfg:zone01> add fs
zonecfg:zone01:fs> set dir=/cdrom
zonecfg:zone01:fs> set special=/cdrom
zonecfg:zone01:fs> set type=lofs
zonecfg:zone01:fs> end
zonecfg:zone01> commit
zonecfg:zone01> exit

Solaris 10 uses the vold SMF service to mount a CDROM/DVD. The above set of commands adds a loop back file system to mount the global /cdrom file system on the /global directory of the non-global zone. The commit command writes the zone configuration from memory to disk. Next, reboot the non-global zone to make the configuration changes effective.

# zonecfg -z zone01 reboot

Place the media into the system’s CDROM drive. After it is mounted in the global zone, it will be available to the non-global zone, zone01 in this example. Once you are finished using the CDROM, type eject from the global zone to retrieve the CD media.

Procedure for Solaris 11

The value of the attribute “special” in the zones configuration should be ‘/media’ for Solaris 11. ‘/media’ is the standard path on Global zone where CDROM media gets mounted by rmmount command. Ensure the package media-volume-manager is installed

global_zone # pkg list media-volume-manager
NAME (PUBLISHER)                                  VERSION                    IFO
system/storage/media-volume-manager               0.5.11-0.175.3.3.0.3.0     i--

Ensure the SMF filesystem/rmvolmgr is ‘online’. Solaris 11 uses the rmvolmgr SMF service to mount a CDROM/DVD

global_zone # svcs rmvolmgr
STATE          STIME    FMRI
online         12:14:20 svc:/system/filesystem/rmvolmgr:default

Check the available devices and aliases and default for the CDROM on Global zone. In this case you can see the title of the currently mounted Solaris_10 DVD with title ‘SOL_10_SPARC’. Look for the DVD device in global zone :

global_zone # ls -l /dev/removable-media/dsk/*s2
lrwxrwxrwx   1 root     root          18 Aug 27  2012 /dev/removable-media/dsk/c3t0d0s2 -> ../../dsk/c3t0d0s2

Mount the DVD in global zone :

global_zone # rmmount /dev/dsk/c3t0d0s2
/dev/dsk/c3t0d0s2 mounted at /media/SOL_10_SPARC

List aliases :

global_zone # rmmount -l
/dev/dsk/c3t0d0s2    cdrom,cdrom0,cd,cd0,sr,sr0,SOL_10_SPARC,/media/SOL_10_SPARC

List default device :

global_zone # rmmount -d
Default device is: cdrom

Add the device to a non-global-zone using zonecfg :

global_zone # zonecfg -z zone01
zonecfg:my-zone> add fs
zonecfg:my-zone:fs> set dir=/cdrom
zonecfg:my-zone:fs> set special=/media
zonecfg:my-zone:fs> set type=lofs
zonecfg:my-zone:fs> add options [ro,nodevices]
zonecfg:my-zone:fs> end
zonecfg:my-zone:fs> commit
zonecfg:my-zone:fs> exit

In case the System is running Solaris 11.2 or higher, the modifications done by zonecfg can be applied online (without reboot of the non-global zone) by

# zoneadm -z zone01 apply

For Solaris 11 versions older than 11.2 you must reboot the non-global zone to activate the zonecfg changes. Confirm that the content of the DVD is visible in non-global zone :

global_zone # zlogin zone01 ls -l /cdrom/                
total 4
drwxr-xr-x   7 root     other       2048 Dec  4  2002 SOL_10_SPARC
global_zone # zlogin zone01 ls -l /cdrom/SOL_10_SPARC

Filed Under: Solaris, Solaris 11, Zones

Some more articles you might also be interested in …

  1. How To Change Timezone for Oracle Grid Infrastructure
  2. Solaris 10 boot process : SPARC
  3. What are Oracle Solaris 11 Installation Methods
  4. Solaris : How to configure a user account to never expire (disable password aging)
  5. How to configure NTP client in Solaris 8,9,10 and non-global zones
  6. Solaris ZFS : How to Create and Manage Mirrored Storage Pools
  7. SVM : How to set boot device at OBP for mirrored root disk
  8. Complete Hardware Reference : SPARC T4-1 / T4-2 / T4-4
  9. How to make telnet listen to a different port in Solaris
  10. Solaris 11 : Setting user and group quota for ZFS datasets

You May Also Like

Primary Sidebar

Recent Posts

  • How to disable ACPI in CentOS/RHEL 7
  • How to Use real-time query to access data on a physical standby database
  • CentOS/RHEL 8: “ACPI MEMORY OR I/O RESET_REG” Server Hung after reboot
  • How to Create a Physical Standby Database by Using SQL and RMAN Commands
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary