How To Add A File System To An Existing Zone
How To Add A File System To An Existing Zone
There are four methods. The following list uses UFS examples, but other types of file
systems, such as HSFS and VxFS, can be used in the zonecfg "fs" resource
type property or attached by mount(1M).
1. Create and mount the filesystem in the global zone and use LOFS to mount it
into the non-global zone (very safe)
2. Create the filesystem in the global zone and use zonecfg to mount the
filesystem into the zone as a UFS filesystem (very safe)
3.Export the device associated with the disk partition to the non-global
zone, create the filesystem in the non-global zone and mount it. Security
consideration: If a _block_ device is present in the zone, a malicious user
could create a corrupt filesystem image on that device, and mount a
filesystem. This might cause the system to panic. The problem is less
acute with raw (character) devices. Disk devices should only be placed into
a zone that is part of a relatively trusted infrastructure.
global# cd /usr/tmp
The first available slot, which is /dev/lofi/1 if no other lofi devices have been
created, is used.
7. Log in to the zone and verify that the devices were successfully imported.
my-zone# ls -l /dev/*lofi/*
1. Become superuser, or have the Zone Management rights profile in your list of
profiles.
2. In the zone my-zone, create a new file system on the disk.
** /dev/rlofi/1
** Last Mounted on
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 9 used, 9320 free (16 frags, 1163 blocks, 0.2% fragmentation)
7. Mount the file system.
1. Become superuser, or have the Zone Management rights profile in your list of
profiles.
2. In the zone my-zone, add the following line to /etc/vfstab:
D. How to Mount a File System From the Global Zone Into a Non-
Global Zone
Assume that a zone has the zonepath /export/home/my-zone. You want to mount the disk
/dev/lofi/1 from the global zone into /mnt in the non-global zone.
You must be the global administrator in the global zone to perform this procedure.
2. To mount the disk into /mnt in the non-global zone, type the following from the
global zone:
global# ls -l /dev/vx/rdsk/rootdg/vol1
crw------- 1 root root 301, 102000 Jun 3
12:54 /dev/vx/rdsk/rootdg/vol1crw------- 1 root sys 301, 10200
0 Jun 3 12:54 /devices/pseudo/vxio@0:rootdg,vol1,102000,raw
4 Verify that /myzone/dev/vx contains the raw volume node and that the non-
global zone can perform I/O to the raw volume node.
The exported device can now be using for performing I/O or for creating file
systems. Symantec recommends using VxFS file systems, due to the increased
fault tolerance provided by VxFS
Just login non-global zone and create the file system , modify /etc/vfstab &
mount it as per Symantec .