ZFS RAIDZ1 upgrade HDDs

Hello all,

I am currently running my DIY NAS under Ubuntu Server 20.04.
I have a pool made of 3 x 4Tb Ironwolf 5900rpm/64Mb cache and I want to upgrade the HDDs to Exos X16 16Tb ST16000NM001G (they are second hand with about 500 hours of use).
I searched for a guide on how to perform the upgrade of the disks without success so far.
Can anyone here help with the steps I need to follow to change the HDDs?
I think I need to mention the fact that I can’t copy the content of the pool on a different drive, create a new pool and then copy the content on the new pool as I do not have the storage to do this operation. Also on the same pool I keep my Nextcloud, Plex and some SQL DB for IoT projects.
Thank you in advance for your support.

Take one disk out, replace it with a larger one, let it rebuild.
Take out the 2nd disk, replace with a larger one, let it rebuild.
Take out the last drive, replace with the larger drive, let it rebuild.

Once the array is clean again, grow to fill the available space. That’s how I’ve expanded my RAID5 array in the past. Takes time, but keeps your data available. Note: start with the drive most at risk of failure, consult the SMART reports for your drives.

Yeah, this is the best method if you can’t afford any downtime. I recommend making sure you’re using /dev/disk/by-id as the disk identifier before doing it, to make your life a bit easier (can be done with zpool export poolname zpool import -d /dev/disk/by-id poolname).

The command is

zpool replace poolname olddiskid newdiskid

You can monitor the resilvering with zpool status

2 Likes

If you had the new drives already, you could make a backup of the whole pool to one of them, and change that drive in last of all.

I would suggest you plan a backup for future though, because when one of the new disks dies, it will be even harder to try and copy the pool to a non-existing backup…

But this is just my opinion

2 Likes

Thank you all very much for your quick support.

@Trooper_ish
My intention is to have 2 striped raidz1 (3 maybe 4 HDDs per pool), I will build this in time and depending on the available money.
From what I see on the forums this configuration is the best balance for redundancy and speed. The most important files I have them copied on 2 different USB HDDs (every 2 weeks or once a month).

This topic was automatically closed 273 days after the last reply. New replies are no longer allowed.