Table of Contents
Resize bpool on ubuntu VM with zfs
Got two kind of messages of disk space issue on bpool.
- apt upgrade can not perform snapshot
ERROR couldn't save system state: Minimum free space to take a snapshot and preserve ZFS performance is 20%.
Free space on pool "bpool" is 19%.
- do-release-upgrade can not be performed
Steps
-
Add iSCSI LUN
-
Change grub configuration
-
Partition iSCSI LUN
-
Attach partitions into zpool
-
Detach old partitions from zpool
-
Repartition rpool and bpool partition in old disk
-
Add back to the rpool and bpool
-
Run
update-grub2
-
Detach iSCSI rpool and bpool
-
Run following command to set autoexpand
zpool set autoexpand=on bpool
- Run
partprobe
orzfs online
zpool online -e bpool <partition_id>
- Set autoexpand off
zpool set autoexpand=off bpool
Troubleshooting
Removed local boot partition
I also got unable to boot error due to removed local bpool, and grub can not find BOOT filesystem as it was in iSCSI LUN.
To fix this issue, use following steps
- Boot from CDROM
- Install open-iscsi package
- Add iSCSI LUN
- Use
zfs import bpool
to import bpool from iSCSI - Attach local boot partition back to bpool again
- Reboot
Used sfdisk copy partition
This creates an issue, the two partitions has same blkid. After added the second iSCSI LUN.
References
HOWTO replace zfs bpool and rpool with larger disk - Ubuntu 20.04 (Virtualbox)
ZFS on Linux resize rpool