ZFS Replacing HDD with SSD

StoreFS

Active Member
Jan 21, 2019
3
0
41
53
Hi,

I need advice on the best way to upgrade my ZFS drives from HDD to SSD without downtime.

Below is my setup

zpool - mirror-0 (for Proxmox OS)
2 x 200G SDD

zpool - raidz2-0 (for VMs)
4 x 960G HDD

My intention is to totally swap all 4x960G HDD on raidz2-0 used for the VMs with 4x960G SSD.

Can I replace them in turn and resilver without breaking the pool? I am concerned the disk speed difference could cause an issue. Note that I have two extra disk slots.

How would you do this?
 
If you replacing them all it shouldn't make the difference.
The short time between disk swap pool should be ok.
I have played with mixed disk pool before and never run into an issue.
 
I have just realized that there is alight difference in the actual drive sizes. The HDD is 931G and the SDD is 894G. Would swaping the disks in turn still be possible in this case or is there a better was to handle this?
 
I am not 100% sure but you may not be able to swap them like this. Zfs may though a fit with different size replacement.

As this is mirror setup. You can try attach and detach command but only if You can plug in new disks together with old obes.
If not you are riskin loosing data. So backup is your friend.
 
Hi,

Let see what you can do ;)

- stop the server, remove one hdd and add 3 new ssd
- start the server (hdd pool will be in degraded mode, but you can lose another hdd disk)
- then create a new raidz2 pool (using 3 new ssd and 1 spare file on hdd pool)
- now you have 2 raidz2 (raidz2 hdd A in degraded mode and raidz2 ssd pool B)
- remove the spare file from pool B so this pool will be also in degraded mod (3 ssd out of 4)
- now the pool A and B are both in degraded mode
- use zfs send/recive from pool A to pool B
- if during this process any ssd from pool B is not broken, then you are ok
- make a scrub on both pools

××××- halt your server again , and replace one hdd with another new ssd
- start the server
- add the new ssd in pool B (so the pool will have 4 ssd out of 4)
- now you have pool A without any parity (2 hdd out of 4) and pool B with 2 parity ssd
- wait the resilver to finish on pool B
- stop all your VM /CT, and make the last zfs send/receive from pool A to pool B
- stop the server and remove all hdd
- start the server, and rename your as the hdd pool
- restart all of your VM/CT

I know is are many steps, and a small windows time when you can lose your current data(step xxxx) but you will have any old data from previos zfs send/receive.
Also note that you can test each step using 2 fake zfs pools with files insted of hdd. Put on paper each step. In the end will be ok.
I do many times this tricks for converting pools ... and is was ok.

Good luck
 

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!