Patrik Gustavsson
2005-Dec-14 13:08 UTC
[zfs-discuss] ZFS and delegated dataset in a non-global zone
Hi, I am running build 28 in SF240. I created a pool data in the global zone (zpool create data mirror c0t1d0 c0t0d0) I created a fs in the global zone (zfs create data/zonea) and configured 4G qouta (zfs set quota=4G data/zonea). I configured a new zone (zonea) and added add dataset set name=data/zonea end to the zone-config. I installed and booted the zone and /data /data/zonea turned up in zfs list. Then I tried the following: In the global zone, I created data/zonea/a and it turned up in zfs list the non-global zone, but not mounted. In the non-global zone, I created data/zonea/a/b and data/zonea/a/b become mounted, but not data/zonea/a. When I rebooted the zone I got the following error-message: cannot mount ''/data/zonea/a'': directory is not empty use legacy mountpoint to allow this behavior, or use the -O flag svc:/system/filesystem/local:default: WARNING: /usr/sbin/zfs mount -a failed: exit status 1 Dec 14 14:04:32 svc.startd[6766]: svc:/system/filesystem/local:default: Method "/lib/svc/method/fs-local" failed with exit status 95. [ system/filesystem/local:default failed fatally (see ''svcs -x'' for details) ] Is this normal ? Shouldn''t zfs in the global zone warn me that I am creating a fs in a delegated dataset ? This message posted from opensolaris.org
Eric Schrock
2005-Dec-14 15:40 UTC
[zfs-discuss] ZFS and delegated dataset in a non-global zone
While we have tried to make the separation of global and non-global zones as clean as possible, there is always going to be a way to shoot yourself in the foot. I encourage you to push the limits, but keep in mind that at some point the answer might just be "don''t do that" (such as manually twiddling the ''zoned'' property). Preventing a global zone admin from creating datasets within a delegated dataset seems reasonable. The basic problem is that we want the mounts to be done from within the context of the local zone, so while we can create the datasets we can''t actually do the the mount. Feel free to file an RFE at opensolaris.org for this functionality. - Eric On Wed, Dec 14, 2005 at 05:08:34AM -0800, Patrik Gustavsson wrote:> Hi, > > I am running build 28 in SF240. > > I created a pool data in the global zone (zpool create data mirror c0t1d0 c0t0d0) > > I created a fs in the global zone (zfs create data/zonea) and configured 4G qouta > (zfs set quota=4G data/zonea). > > I configured a new zone (zonea) and added > add dataset > set name=data/zonea > end > > to the zone-config. > > I installed and booted the zone and /data /data/zonea turned up in zfs list. > > Then I tried the following: > > In the global zone, I created data/zonea/a and it turned up in zfs list the non-global > zone, but not mounted. > > In the non-global zone, I created data/zonea/a/b and data/zonea/a/b become mounted, but not data/zonea/a. > > When I rebooted the zone I got the following error-message: > cannot mount ''/data/zonea/a'': directory is not empty > use legacy mountpoint to allow this behavior, or use the -O flag > svc:/system/filesystem/local:default: WARNING: /usr/sbin/zfs mount -a failed: exit status 1 > Dec 14 14:04:32 svc.startd[6766]: svc:/system/filesystem/local:default: Method "/lib/svc/method/fs-local" failed with exit status 95. > [ system/filesystem/local:default failed fatally (see ''svcs -x'' for details) ] > > Is this normal ? > > Shouldn''t zfs in the global zone warn me that I am creating a fs in a delegated dataset ? > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss-- Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock