Solaris 10: Mount a Disk Slice in a Sub-Zone

Posted May 19, 2005 by Quinn McHenry in Uncategorized

Last Updated on

Non-global zones in Solaris 10 do not have the ability to see drives or disk slices. (To prove this, list the contents of /dev/dsk from within a zone.) What filesystems are mounted in which zones is controlled exclusively from the global zone. This tech-recipe describes persistently mounting a disk slice in a non-global zone.

To mount the device c0t1d0s3 in the existing zone testzone under the mount point /mnt, log in to the global zone and become root or a priviledged user. Then complete the following steps:

zonecfg -z testzone
zonecfg:testzone> add fs
zonecfg:testzone:fs> set dir=/mnt
zonecfg:testzone:fs> set special=/dev/dsk/c0t1d0s3
zonecfg:testzone:fs> set raw=/dev/rdsk/c0t1d0s3
zonecfg:testzone:fs> set type=ufs
zonecfg:testzone:fs> end
zonecfg:testzone> verify
zonecfg:testzone> commit
zonecfg:testzone> exit

Following the commit command, the filesystem will be immediately available in the zone. Substitute the desired mount point and device name for your system. If the zone has not yet been created, you can use the ‘add fs’ commands when creating the zone.


About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.

Leave a Reply