Wednesday 22 February 2012

Solaris Zones - Fibre channel presentation

This process will persistently mount an FC LUN in a Non Global Zone

On the Global Zone present the required FC LUN, format as UFS and manually mount:
mkdir /<folder name>
fcinfo hba-port
fcinfo remote-port -slp <wwn> 
format
newfs /dev/dsk/<device id>
mount -f ufs /dev/dsk/<device id> /<folder name>

On the Global Zone add the newly formatted file system to the required Non Global Zone as type = UFS
global# zonecfg -z <my-zone>
zonecfg:my-zone> add fs
zonecfg:my-zone:fs> set dir=/<folder name>
zonecfg:my-zone:fs> set special=/dev/dsk/<device id>
zonecfg:my-zone:fs> set raw=/dev/rdsk/<device id>
zonecfg:my-zone:fs> set type=ufs
zonecfg:my-zone:fs> end

On the Global Zone unmount the newly created file system, reboot the Non Global Zone and delete the now defunct mount point:
umount  /<folder name>
zoneadm –z <my-zone> reboot
rm –r /<folder name>

Login to the Non Global Zone and run the mount command to check the file system is mounted Read\Write

To remove a file system:
global# zonecfg -z <my-zone>
zonecfg:my-zone> add fs
zonecfg:my-zone> remove fs dir=/<folder name>
zonecfg:my-zone> verify 
zonecfg:my-zone> commit

No comments:

Post a Comment