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
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
Detach iSCSI rpool and bpool
Run following command to set autoexpand
zpool set autoexpand=on bpool
zpool online -e bpool <partition_id>
- Set autoexpand off
zpool set autoexpand=off bpool
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
zfs import bpoolto import bpool from iSCSI
- Attach local boot partition back to bpool again
Used sfdisk copy partition
This creates an issue, the two partitions has same blkid. After added the second iSCSI LUN.