Sunday 12 May 2024


ZFS Expansion


Image copyright

I have now finished by ZFS pool expansion from a 2 TB pool to a 4 TB pool.

I purchased two 4 TB refurbished enterprise hard drives from IT disposal companies. I wanted to purchase new drives, like I did with my 2 TB drives, but the increase in costs was prohibited. I managed to purchase my 2 TB drives for around £90 new 4-5 years ago, but now 4 TB drives would cost me £140. I was looking for NAS drives that are 7,200 RPM, 5-year warranty and CMR. To replace my old drives it would cost approx £280.

My pool was reaching 88% full. ZFS does not like the pool to be 100%, so I set a quota of 90%. After a little research, I found my first drive for £40. It is a HSGT enterprise hard drive with 20 start-stop count, 3.16 years running and was built 2019 (5 years old). This drive passed my badblocks test and successfully entered the pool.

The second was my best find: It is a Toshiba 4 TB enterprise hard drive built in 2020 with 3 stop-start counts and 280 days continuous use; for the cherry on top, it has valid warranty until Feb 2025, and it only cost £37.

I checked the SMART daya and both drives had 0 reallocated and pending sectors (a strong indicator of failure).

I did not want two 2 TB drives from backup, so I sold one. I managed to fetch £70 on eBay - after fees and postage £50 profit. This meant I could purchase the second hard drive, speeding up my pool expansion to less than 2 months.

To add a new drive to an existing mirrored vdev, it is advisable, if you have a spare SATA port, to add the third drive and resilver, then remove once everything ok, that was you maintain redundancies during the intensive resilver.

zpool attach pool old_disk_name new_disk_name

I had difficulty auto expanding pool from 2 TB to 4 TB. I had the property autoexpand switched on, but this did not expand even after reboot. The following command worked.

zpool online -e new_drive_name

That's it: I now have extra 2 TB to play with and my pool is now at 44% capacity. I hope to use these drives for 5 years before considering ways to upgrade storage, either changing out 4 TB for 6 TB or adding two more 2 TB into a separate vdev.

I have used the remaining 2 TB hard drive for ZFS send backups of media and pictures old, other datasets (such as documents, configs, music) are backed up to two 250 GB and


Backlinks:
index
Journal:Index
Journal:2024:05