Zpool won't expand after replacing disks.

Aug 17, 2020
24
1
23
90
Not too long ago, I decided to increase the capacity of my rpool, and replace it's SATA SSDs with larger NVMe disks. So I attached the two new larger NVMe disks to the rpool and let it resilver. I decided to leave the SATA disks in place until I next had the time and need to reboot the server. The resilver went off without a hitch. I then followed the ZFS docks in order to remove the SATA disks from the vdev in the rpool. I then power cycled the server so that I could physically remove the SATA disks and their cables. I expected the rpool to expand automatically but it didn't.

I tried setting the autoexpand property to on but nothing happened. I also tried using the zpool online -e command but again, nothing happened. So I tired toggling autoexpand off and on and trying the `online` command again. Still nothing. I then tried detaching one of the disks and reattaching it. After the resilver had finished... nothing happened. The zpool remains stubbornly at the same, smaller capacity of the SATA disks.

What should I do next?
 
You need to set autoexpand=on before starting the maint. Then you only need to do zpool online -e on both disks in the pool based on the output of ' zpool status -v ' if that doesn't work.

[[ Emphasis mine, from ' man zpool-online '
-e Expand the device to use all available space. If the device is part of a mirror or raidz then all devices must be expanded before the new space will become available to the pool.
]]

Take a look at your partitions on the nvme disks with a live rescue environment / gparted

https://github.com/nchevsky/systemrescue-zfs/releases

If the partitions are curtailed before the end of the disk, you'll need to resize them. Needless to say, keep your original SATA drives around until everything is as it should be.

https://sirlagz.net/2023/07/03/updated-live-resize-lvm-on-linux/

Since this is an rpool mirror, you'll also need to correct proxmox EFI boot for both of them.

https://pve.proxmox.com/pve-docs/pve-admin-guide.html#chapter_zfs
^ Search page for " Changing a failed bootable device "

See also:
https://github.com/kneutron/ansites...-replace-zfs-mirror-boot-disks-with-bigger.sh