Hello all,
I would like to delegate an arbitrary ZFS dataset to a VM/Zone. I know
there's the delegated_dataset option available for vmadm but I would like
to mount some other arbitrary dataset from the GZ into a zone.
I know I can achieve what I need via zonecfg, but I would really like to be
able to do the same via the JSON sourced by vmadm for zone creation since
zonecfg is too much of a manual process.
I'm using the following in the vmadm create JSON -
"filesystems": [
{
"source": "zones/delegated/fileserver",
"target": "/fileserver",
"type": "zfs",
"options": [
"nodevices"
]
}
In first try, the above gave me an error during zone creation, saying that
the dataset had to be mounted as legacy -
Command failed: could not verify fs /fileserver: zfs
'zones/delegated/fileserver' mountpoint is not "legacy"
zone '4408365c-aefd-4e5e-9fc0-b57902a17bdd': "/usr/lib/fs/zfs/mount -o
nodevices,nosuid zones/delegated/fileserver
/zones/4408365c-aefd-4e5e-9fc0-b57902a17bdd/root/fileserver" failed with
exit code 1
zone '4408365c-aefd-4e5e-9fc0-b57902a17bdd': error removing flows for net0
zoneadm: zone '4408365c-aefd-4e5e-9fc0-b57902a17bdd': call to zoneadmd
failed
So I tried this again, after setting mountpoint=legacy for
zones/delegated/fileserver.
This time the zone came up OK, I was able to see the delegated dataset
zones/delegated/fileserver in the zone with zfs list.
But when I tried to do the following, I again got an error -
# zfs set mountpoint=/fileserver zones/delegated/fileserver
cannot set property for 'zones/delegated/fileserver': 'mountpoint' cannot
be set while dataset 'zoned' property is set
So, in the GZ, I set the property of the dataset to zoned=on.
But now, I find that the ZFS dataset zones/delegated/fileserver no longer
shows up in the zone/VM.
# zfs set mountpoint=/fileserver zones/delegated/fileserver
cannot open 'zones/delegated/fileserver': dataset does not exist
Any help will be appreciated.
Thanks in advance.
Sam
-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription:
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com