My drive is starting to fail, I want to replace it

Status
Not open for further replies.

juanjico

Dabbler
Joined
Sep 18, 2012
Messages
31
Hi!

I'm receiving emails about failing sectors on my HD. I'm using FreeNAS 9.3 with a single 3TB disk.

This is the email:

The following warning/error was logged by the smartd daemon:

Device: /dev/ada0, 24 Offline uncorrectable sectors

Device info:
ST3000DM001-1CH166, S/N:W1F2ZSS8, WWN:5-000c50-060966774, FW:CC29, 3.00 TB

So, I want to replace my failing disk with a new one. Can I simply do a sector by sector copy from the old disk to the new disk ?

And, if I buy two disks, can I set up a RAID1-like mirroring in FreeNAS ??? But, how can I copy my data from the old disk to the new array ? I have some datasets and plugins installed.

Thanks!

 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Why are you bothering with ZFS on a single disk anyway? ZFS is all about data integrity, which won't do much for you if you don't have any redundancy. That said, I can think of a couple of ways to make this happen:
  • Using the CLI, set up the new disk as a mirror of the old one. Once the data is synced, split the mirror in the GUI, and remove the old disk.
  • Set up a new pool, use ZFS replication to move everything on the old pool to the new pool, remove the old pool, rename the new pool to the old pool's name.
See this post, and the link from it, for more information. Review cyberjock's powerpoint in the N00bs forum for basic information on ZFS.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Trying to mirror a bad disk is a terrible idea. You'll simply end up with a mirror of a bad pool.

What you need to do is create a new pool and then copy the files (or restore from backup).

As I just said in my previous post, if you are using single-disk zpools you probably shouldn't be using FreeNAS as it's not the best tool for the job. Recovery from ZFS is basically impossible, copying data off a bad zpool is almost impossible unless you are lucky and you shouldn't be banking on being lucky, etc.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Well, if ZFS serves up the data, you know it's good--or at least that it matches what was written to the pool initially. The fact that the disk is reporting pending sectors doesn't mean that it's (yet) serving garbage. But I'd still probably lean toward my second option.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
ZFS will serve up the data, even if its corrupted. That's the problem, and that's why single-disk pools are voodoo for your data.

ZFS will still serve up whatever turd it gets if it can't fix it without redundancy (which single-disk pools don't have).

ZFS will *log* the fact that it can't read the file properly and can be queried with "zpool status -v <poolname>".

You're in this weird grey area because you aren't supposed to be letting zpools operate without the ability to recover from identified errors. So not surprisingly people are a little confused. ;)
 
Status
Not open for further replies.
Top