Skip to content

Instantly share code, notes, and snippets.

@aboron
Created March 2, 2019 18:36
Show Gist options
  • Save aboron/0604dcd1de1a5b9f6458751c72a82abb to your computer and use it in GitHub Desktop.
Save aboron/0604dcd1de1a5b9f6458751c72a82abb to your computer and use it in GitHub Desktop.
Adding lofs filesystems to smartos zones
When adding filesystems using json at initial creation, include:
"filesystems": [
{
"type": "lofs",
"source": "tank/Movies",
"target": "/Movies"
},
{
"type": "lofs",
"source": "tank/TV",
"target": "/TV"
},
{
"type": "lofs",
"source": "tank/Music",
"target": "/Music"
}
]
To add to zone after creation (or in triton) use the zonecfg command on the created vm:
# zonecfg -u <UUID>
zonecfg:<UUID>> add fs
zonecfg:<UUID>:fs> set dir=/mountpoint-in-zone
zonecfg:<UUID>:fs> set special=/folder-in-global
zonecfg:<UUID>:fs> set type=lofs
zonecfg:<UUID>:fs> end
zonecfg:<UUID>> verify
zonecfg:<UUID>> commit
zonecfg:<UUID>> exit
#
@thetooth
Copy link

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment