Created
March 6, 2018 07:44
-
-
Save ThomasLeister/0a348035f337c0ca0b976b904fd3aa4b to your computer and use it in GitHub Desktop.
Grow LXD ZFS pool file (LXD snap package)
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
According to: "Growing a loop backed ZFS pool" on https://lxd.readthedocs.io/en/latest/storage/ | |
For LXD via Snap package: | |
- The default pool is located at /var/snap/lxd/common/lxd/disks/default.img | |
- and is named "default". | |
### To increase the pool size by 20 GiB do this: | |
>>> Stop all your containers! <<< | |
truncate -s +20G /var/snap/lxd/common/lxd/disks/default.img | |
zpool set autoexpand=on default | |
zpool online -e default /var/snap/lxd/common/lxd/disks/default.img | |
zpool set autoexpand=off default | |
... and turn your containers back on. | |
DONE! 🎉 |
@HW-Siew,Hey a bit late to the party ik. But default
here references the name of your storage pool. you can check the name of your storage pool and some info about them using lxc storage list
and lxc storage info <poolName>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, any idea why i cannot find my default.img under the path /var/snap/lxd/common/lxd/disks/ ? By the way, I am using lxd via snap with zfs pool 'default' created. Everything works fine, but i want to grow my the disk size using this method.
Thanks for your advise. ;)