Copying Failing Drive

Status
Not open for further replies.

Peter Friedrich

Dabbler
Joined
Mar 11, 2016
Messages
13
Hi everybody!

I have a FreeNAS setup with several 500GB and a 1 TB hdd. RAID 0 (I know i know....)

Now the 1 TB drive (ada6) is starting to fail:

=== START OF READ SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED

Please note the following marginal Attributes:

ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE

184 End-to-End_Error 0x0032 099 099 099 Old_age Always FAILING_NOW 1

190 Airflow_Temperature_Cel 0x0022 063 045 045 Old_age Always In_the_past 37 (0 2 39 30 0)


Drive went away twice already, but a reboot allowed FreeNAS to work without issues - for now. FreeNAS actually shows the disk as healthy and ONLINE.

My big question is:

I want to replace the failing 1TB drive with a new 1TB drive. All drives listed above are assigned to just 1 Volume. How can i copy/clone/mirror/replicate ONLY the failing disk so that i can replace it? Does FreeNAS offer an option for that specific case? Or can i take the HDD out, connect it to my Linux Desktop and do a disk clone?

Advice or a How-To would be extremely appreciated....

As a note: I do not currently have enough drive space to copy all 4 TB of data to another drive/computer as backup to then copy all back after drive replacement.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
How can i copy/clone/mirror/replicate ONLY the failing disk so that i can replace it?
Assuming you have a place to plug in the new drive without removing the old drive, you should be able to use the web GUI to replace the disk. The manual has instructions, but they have you remove the fail(ed|ing) disk before replacing, which you won't want, need, or be able to do. Install the new disk, go to Storage -> Select volume -> Volume Status, click on the failing disk, then click the Replace button. Select the new disk from the pop-up window, then click the Replace Disk button. When the resilver finishes, you can remove the old disk.

Note that this is theoretical; I haven't replaced a disk in a single-disk volume before. But it should work, and if it doesn't it won't harm anything. The other (far less elegant) option would be to create a new pool on the new disk, copy all the data (using ZFS replication, rsync, or whatever other mechanism you like), then remove the old pool. You could then optionally rename the new pool to match the name of the old one.

Edit: But you really should consider putting together a proper redundant pool.
 

Peter Friedrich

Dabbler
Joined
Mar 11, 2016
Messages
13
Yes, i found those instructions, but none for a case where i want to copy data before the drive completely fails. Your instructions sound plausible, and i'll try those out. Would be nice if the instructions could mention that ;) I'll update if it worked.

Edit: But you really should consider putting together a proper redundant pool.
That is my plan. Saving up for 2 6 TB HDD's so i can run a decent mirroring....

One more question: Will the drive and Volume be available during resilvering?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Will the drive and Volume be available during resilvering?
Yes.

The instructions for expanding a pool do suggest doing the replacement without first removing the original disk, but there's no discussion of that possibility when it comes to replacing a fail(ed|ing) disk. I've raised a bug against the docs to include that.
 

rs225

Guru
Joined
Jun 28, 2014
Messages
878
If the replace doesn't work, wouldn't upgrading the failing drive/vdev to a mirror work? And if that also fails, you can always try to image the failing drive.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
wouldn't upgrading the failing drive/vdev to a mirror work?
Probably, but there's still no GUI way to do that.
 

Peter Friedrich

Dabbler
Joined
Mar 11, 2016
Messages
13
Ok, this worked.

I did as described above
go to Storage -> Select volume -> Volume Status, click on the failing disk, then click the Replace button. Select the new disk from the pop-up window, then click the Replace Disk button.
, but got actually two options. One was an 'In-Place Replace' and the other one i don't remember the exact wording, but i choose the latter one. Took a few hours, and right when it finished i had a power outage lol. I rebooted, took the failing hdd offline, shut down, physically removed the failing drive, booted up, and it seems like all files are still there.

The only thing that is left, is that my Volume now shows as 'DEBRADED', with one volume marked as 'UNAVAIL' (the one i removed) and one drive listed as 'replacing-3' as 'DEGRADED'. The latter one was automatically created when i did the replacing/resilvering.

Can i assume that those will disappear with the next scheduled scrub? if not, how can i remove those two? If i click on them i only see the option to 'REPLACE' for both of them.
 
Status
Not open for further replies.
Top