Zfpool -Replace Hard Drive to increase Storage

Jan 23, 2020
8
0
21
35
Hi Guys,

I have 6 hard drives that are part of one ZFS pool, I would like to increase the storage size of the pool by replacing the disk.

What is the best option in this case, replace the disk one by one and then increase disk size or can we replace 2 disks simultaneously?

If so what are the steps in doing it, with minimal disruption to the production server?

Kind Regards,
Santosh
 
Take a disk offline (zpool offline command), replace physical disk and make sure you replace the right one, replace the disk in your ZFS pool (zpool replace command), bring the new disk online (zpool online command), run a resilver and wait for it to finish (might take really long on a raidz pool of HDDs). Repeat for each disk until all disks are replaced. After all disks are replaced and autoexpand is enabled, your pool should be able to grow to use the new capacity.
In case you also boot from that pool it is more work. Than you would need to clone the partition table and write the bootloader to each disk before replacing just the ZFS partition.
 
Last edited:
You can look at the partition table of your disks. For example fdisk -l /dev/YourDisk. If you just see partition 1+9 then you don't boot from it. If you see something like partition 1+2+3 then you boot from it. lsblk -o NAME,FSTYPE,UUID,SIZE,STATE,TYPE,MOUNTPOINT,LABEL,MODEL | grep -v zd is also always useful to get a overview over your disks and how they are used.

Also keep in mind that you might loose your entire pool when something bad happens. Especially when you are just using a striped mirror or raidz1 where only one disk per vdev may fail. So when a single error happens while resilvering disks you loose data as there is no parity with a degraded vdev.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!