-
-
Save madsmith/0bae9551c506457043020b0842f29069 to your computer and use it in GitHub Desktop.
Adding a zfs dataset to a SmartOS zone. Seems there's no vmadm api for this, but you can do it with zonecfg:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vmadm halt <uuid> | |
# zonecfg -z <uuid> | |
zonecfg:uuid> add dataset | |
zonecfg:uuid:dataset> set name=<zfs/path> | |
zonecfg:uuid:dataset> end | |
zonecfg:uuid> commit | |
zonecfg:uuid> exit | |
# zfs set mountpoint=legacy <zfs/path> | |
# vmadm boot <uuid> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not entirely sure as to why the author proposed setting the mountpoint to legacy. My testing with this shows that the zfs dataset then needs to be configured inside of the zone as it's no longer auto mounted by zfs. The zonecfg alone should be sufficient to expose the zfs dataset to the zone.