468x60 Ads

Wednesday, August 21, 2013

How to Add Access to CD/DVD Media in a Non-Global Zone in Solaris 10



Below is the procedure for Add Access to CD/DVD Media to Non-Global zone permanently.

1.     Login to global zone become super user.

2.     Determine whether the Volume Management file system is running in the global zone.

global # svcs volfs
STATE          STIME    FMRI
online         2012     svc:/system/filesystem/volfs:default

3.     (Optional) If the Volume Management file system is not running(offline) in the global zone,enable it.


4.     Insert the media.

5.     Check for media in the drive.

global# volcheck

6.     Test whether the DVD is auto mounted.

global# ls /cdrom

You will see a output similar to the following:

cdrom   cdrom1  

7.     Take backup of existing zone configuration similar to attached file with info command under zonecfg
Eg:


global


zonecfg:EMS> info

zonename: EMS

zonepath: /Zones/EMS

brand: native

autoboot: true

bootargs:

pool:

limitpriv:

scheduling-class:

ip-type: shared

hostid:

inherit-pkg-dir:

        dir: /lib

inherit-pkg-dir:

        dir: /platform

inherit-pkg-dir:

        dir: /sbin

inherit-pkg-dir:

        dir: /usr

fs:

        dir: /usr/local

        special: /Zones/storage/local/EMS

        raw not specified

        type: lofs

        options: []

net:

        address: 172.16.0.3

        physical: igb0

        defrouter not specified

zonecfg:EMS>exit

8.     Loopback mount the file system with the options nodevices, ro (no devices, read-only) in the Non-global zone.

zonecfg:EMS> add fs
zonecfg:EMS> set dir=/cdrom
zonecfg:EMS> set special=/cdrom
zonecfg:EMS> set type=lofs
zonecfg:EMS> add options [ro,nodevices]
zonecfg:EMS> end
zonecfg:EMS> commit
zonecfg:EMS> exit

9.     Reboot the non-global zone.


EMS—is Name of Non-Global Zone

10.  Use the zoneadm list command with the -v option to verify the status.


11.  You will see a display that is similar to the following:

ID  NAME     STATUS       PATH                           BRAND      IP
0  global   running      /                              native     shared
1  EMS      running      /Zones/storage/local/EMS       native     shared

12.  Log in to the non-global zone.

global# zlogin EMS

13.  Verify the DVD-ROM mount.

EMS# ls /cdrom

14.  You will see a display similar to this:

cdrom   cdrom1 

15.  Get the use of DVD/CD in Non-Global zone..:-)

16.  Exit the non-global zone.

EMS# exit

If you want to retain the /cdrom file system in your non-global zone. The mount will always reflect the current contents of the CD-ROM drive, or an empty directory if the drive is empty.

17.   (Optional) If you want to remove the /cdrom file system from the non-global zone, use the following procedure.

global# zonecfg -z EMS
zonecfg:EMS> remove fs dir=/cdrom
zonecfg:EMS> commit
zonecfg:EMS> exit