Zone file systems are a little confusing. This quick guide on moving a file system from one mount point to another should help explain a few of the details that can be used for other operations as well.
In the Local Zone make the new folder for the new file system mount location:
In the LOCAL ZONE
# mkdir /NewMountPoint
#Or you could do this in the global zone as “mkdir /zones/ZoneHostName/root/NewMountPoint”
Unmount the Zone mount and the Global File system mount on the Global zone:
(Do all of this from the global zone)
umount /zones/ZoneHostName/root/OldMountPoint umount /zones/ZoneHostName_mounts/OldMountPoint
Now make the new folder in /zones/ZoneHostName_mounts to mount the file system in the gloal zone and remove the old one:
mkdir /zones/ZoneHostName_mounts/NewMountPoint rmdir /zones/ZoneHostName_mounts/OldMountPoint
Now edit /etc/vfstab to change the reference to /OldMountPoint to /NewMountPoint
Do the same for /etc/zones/ZoneHostName.xml
#Note that the changes to the XML file will not be used until the next reboot, so be sure to get it right, otherwise you’ll have a boot failure and not know why
Now remount the file system on the global zone:
now, FROM THE GLOBAL ZONE remount the file system into the local zome (this is the tricky one):
mount -F lofs /zones/ZoneHostName_mounts/NewMountPoint /zones/ZoneHostName/root/NewMountPoint
Remove the old mount point from the local zone:
As you can see, the file system is actually mounted TWICE:
Once on the global zone in /zones/ZoneHostName_mounts/NewMountPoint as the file system type.
Then again, in the zone under /zones/ZoneHostName/root/NewMountPoint as a “loopback” (lofs) file system.
This makes thingsa little confusing. I think it might actually be less confusing if you did NOT use the same name in the …mounts/… folder as you did in the zone. YOu could actually mount it anywhere in the global zone.
There are other ways to do this too.
The file system can be mounted only in the local zone.
You can also use “lofs” to mount a subfolder from the global zone, which case the double mounting makes a little more sense.