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

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

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.

Quinn McHenry
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.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!