[OmniOS-discuss] I would like to create a zfs file system in my zone
Peter Tribble
peter.tribble at gmail.com
Sun Sep 18 09:32:24 UTC 2016
On Sun, Sep 18, 2016 at 9:55 AM, Richard Skelton <skeltonr at btconnect.com>
wrote:
> Hi,
> I would like to create a zfs file system in my zone and create snapshots
> like I would in a global zone.
> In the zone I see:-
> root at fred5:/root# zfs list
> NAME USED AVAIL REFER MOUNTPOINT
> rpool 38.6G 93.2G 23.5K /rpool
> rpool/zones 2.94G 93.2G 19K /zones
> rpool/zones/fred5 1.85G 93.2G 19K /zones/fred5
> rpool/zones/fred5/ROOT 1.85G 93.2G 19K legacy
> rpool/zones/fred5/ROOT/zbe 1.85G 93.2G 1.85G legacy
> root at fred5:/root# ls /zones/fred5
> ls: cannot access '/zones/fred5': No such file or directory
>
So the way it works is this: the dataset
rpool/zones/fred5/ROOT
is delegated to the zone. Anything above that is associated with the global
zone;
that dataset or below is associated with the local zone. You get to see all
the parents
in the hierarchy, with their mountpoints in their own context, which is a
bit confusing.
> root at fred5:/root# zpool list
> NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
> rpool 136G 30.3G 106G - 19% 22% 1.00x ONLINE -
> root at fred5:/root#
>
> Before I install any optional software I would like to create a zfs file
> system and mount it on /opt in the zone.
> How can I do this?
>
In this case, it could be:
zfs create -o mountpoint=/opt rpool/zones/fred5/ROOT/opt
However, I wouldn't normally do this. If I was creating datasets for use by
a
zone, I would create a separate dataset such as rpool/fred5 in the global
zone
(with mountpoint set to none), use 'add dataset' in the zone configuration
to
delegate that dataset to the zone, and use that to create my own filesystems
in the zone. The aim being to separate my own data from that managed by the
operating system.
(Although the same issue of conflicts arises with the use of /opt, which the
OS might think it has control of. Creating /opt/local or /opt/company-name
one level down might be a better choice.)
--
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://omniosce.org/ml-archive/attachments/20160918/3a577f25/attachment.html>
More information about the OmniOS-discuss
mailing list