Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Replace live disk in single-disk vdev

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE

MrHans

Dabbler
Joined
May 12, 2019
Messages
11
Hello,

I have a single-disk vdev that is continuously being read from/written to and the disk would need to be replaced with a larger one, preferably without stopping a "critical service" accessing the disk. Can the a disk replacement be done while a critical service is constantly accessing the disk or would it need to be stopped?

This is running on FreeNAS 11.2 U8. (Ok, it is not really a critical application, but I would much prefer not to turn it off. )

Assuming I do not want to stop the application using the disk:
1. Can I proceed with a replace disk operation on a "live", single-disk vdev?
  • What happens during the replace operation when the (single) source disk is continuously being read from/written to?
  • Would the replace operation only finish and offline the old disk and online the new disk once it was certain that all data (data that has changed since the start of the replace operation) was successfully synced?
  • Or would it merely copy the state of the disk as it was when the replace started and thereby miss data that was changed?

2. Would it be better to turn the single-disk vdev first to a 2-way mirror with the larger drive and then remove the old, smaller drive, thereby returning to a single-disk vdev?

I might be overthinking this and a simple replace will do exactly what I need.
 

sretalla

Hall of Famer
Joined
Jan 1, 2016
Messages
6,936
Would it be better to turn the single-disk vdev first to a 2-way mirror with the larger drive and then remove the old, smaller drive, thereby returning to a single-disk vdev?
That's effectively what will happen either way.
 

Arwen

Wizard
Joined
May 17, 2014
Messages
1,954
Agree with @sretalla, you can either do a manual mirror way, or a simple replacement of the disk. With either method, no data loss, either pre-existing or new data.
 

MrHans

Dabbler
Joined
May 12, 2019
Messages
11
Thank you both for confirming this.

I added the second disk and it is currently happily resilvering.
 

MrHans

Dabbler
Joined
May 12, 2019
Messages
11
It all worked fine using the "replace disk" option. Slowly, but the old disk resilvered to the larger disk successfully and was automatically removed from the pool upon completion. I cannot see any data being lost, the aforementioned critical service could be kept running.

Code:
scan: resilvered 3.28T in 1 days 18:37:03 with 0 errors on Wed May 25 14:28:10 2022


Thanks for the help again.
 
Top