Hi, I''m Hank and I''m recovering from a crash attempting to make a zfs pool the root/mountpoint of a zone install. I want to make the zone appear as a completely configurable zfs file system to the root user of the zone. Apparently that is not exactly the way things work. Any thoughts otherwise? o Do zfs resources (datasets) need to be a separate item from the mountpoint of the zone? o Is there any problem with making a pool the mountpoint of a zone? Thanks. -- This message posted from opensolaris.org
Hank Ratzesberger wrote:> Hi, I''m Hank and I''m recovering from a crash attempting to make a zfs pool the root/mountpoint of a zone install. > > I want to make the zone appear as a completely configurable zfs file system to the root user of the zone. Apparently that is not exactly the way things work. > > Any thoughts otherwise? > > o Do zfs resources (datasets) need to be a separate item from the mountpoint of the zone? >Yes, they do. A zone''s dataset is a ZFS filesystem which is "owned'' by the zone. Once a filesystem is zoned, it is only visible to the zone.> o Is there any problem with making a pool the mountpoint of a zone? >What exactly do you want to do (and why)? Create a pool per zone? -- Ian.
> Hank Ratzesberger wrote: > Hi, I''m Hank and I''m recovering from a crash attempting to make a zfs > pool the root/mountpoint of a zone install. > > I want to make the zone appear as a completely configurable zfs file system to the root user of the zone. Apparently that is not exactly the way things work. > > Any thoughts otherwise? > > o Do zfs resources (datasets) need to be a separate item from the mountpoint of the zone?As Ian says, you can''t trail the zoned tank dataset off the zoneroot. My zones are created off rpool/zones. My layout looks like this: rpool/zones/zone1 6.44G 41.8G 23K /zones/zone1 rpool/zones/zone1/tank 6.41G 41.8G 21K none rpool/zones/zone1/tank/home 104K 41.8G 104K /export/home rpool/zones/zone1/tank/logs 56.5K 41.8G 56.5K /var/icg/logs rpool/zones/zone1/tank/postgresql 6.41G 41.8G 6.41G /var/postgresql rpool/zones/zone1/tank/scratch 21K 41.8G 21K /export/scratch rpool/zones/zone1/zroot 27.6M 41.8G 27.6M I create rpool/zones/zone1/tank when I build the zone, and then delegate to the zone, so the zone admin (which happens to be Puppet, but regardless) can create filesystems inside the zone. benr wrote about it here: http://www.cuddletech.com/blog/pivot/entry.php?id=755 -- bda cyberpunk is dead. long live cyberpunk.
(hoping email replies OK) On Thu, Oct 15, 2009 at 10:47 PM, Ian Collins <ian at ianshome.com> wrote: [snip]>> o Do zfs resources (datasets) need to be a separate item from the >> mountpoint of the zone? >> > > Yes, they do. ?A zone''s dataset is a ZFS filesystem which is "owned'' by the > zone. ?Once a filesystem is zoned, it is only visible to the zone.But it seems the zone itself cannot exist in its own zfs filesystem.>> o Is there any problem with making a pool the mountpoint of a zone? >> > > What exactly do you want to do (and why)? ?Create a pool per zone?What I hoped to do, the way I thought this worked, is that you can create a zsf file system, with a size limit, make it the mountpoint of a zone, then the zone has all control to do what it wishes. So, I made the dataset equal to the mountpoint. This was actually allowed and I was able to install and boot the zone. When I rebooted the system, however, it came up in single user mode complaining that the (now) zoned zfs filesystem had files in it. The server is a long ways from home so I don''t want to repeat that. OK, thanks everyone, I think I understand now that I can give a zone a zfs filesystem in a way similar to other file system resources, and that I can mount a zone into a zfs file system created in the global zone. Best, Hank -- Hank Ratzesberger Santa Barbara, CA The best way to reach me is to knock on my door and yell, Dude! What the Hell? I''ve been trying to reach you
Thanks again for comments, I want to clear this up with a few notes: o In OSOL 2009-06, zones MUST be installed in a zfs filesystem. o This is different than any dataset specified, which is like adding an fs. And of course if you specify as a dataset the same zfs pool that you installed into, the system will boot into single user mode waiting for the local filesystem service to clear with an error something like "No files expected in pool" Anyway, despite my operator error, I am happy to be running under 2009-06 where I can put the zone in its own zfs fs. As mentioned elsewhere, the zone path is not hidden so users can have some idea what other zones are running on your system. Regards, Hank -- This message posted from opensolaris.org