How Do I Remap Bad Sectors?

Status
Not open for further replies.

Ykno

Dabbler
Joined
Jan 31, 2017
Messages
27
I have a HDD with couple bad sectors 10 or so and was just wondering how do I remap this HDD?

On my old Synology box it was easy as running a program in the GUI I have a feeling in FreeNAS it will be harder...
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
The good news is that modern drives do this internally when a write is attempted to a bad block. The bad news is that when new bad blocks appear, it usually means it is time to immediately stop trusting that drive and start looking for a replacement.
 

melloa

Wizard
Joined
May 22, 2016
Messages
1,749
Q: How Do I Remap Bad Sectors?
A: Don't. Replace the drive as @wblock said above.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
I suspect your drive is out of warranty otherwise you would have it replaced. If you are getting bad sectors then the media on the drive platters and/or the heads are failing. The best way to test and lock out curently bad sectors is to run badblocks on it but this will destroy your data. The downside is if you are having issues now, they will likely grow. I'd replace the drive if I were you.
 

Ykno

Dabbler
Joined
Jan 31, 2017
Messages
27
The good news is that modern drives do this internally when a write is attempted to a bad block. The bad news is that when new bad blocks appear, it usually means it is time to immediately stop trusting that drive and start looking for a replacement.
I suspect your drive is out of warranty otherwise you would have it replaced. If you are getting bad sectors then the media on the drive platters and/or the heads are failing. The best way to test and lock out curently bad sectors is to run badblocks on it but this will destroy your data. The downside is if you are having issues now, they will likely grow. I'd replace the drive if I were you.

O don't get me wrong I will replace the drive I just want to make it last maybe 1-2 months more just so I can get some money saved up for some WD Reds (as I need 3 more WD Reds £85+ a time OUCH) and ye the old drive is out of warranty.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
The problem is, when the SMART starts to tell you things are going bad, they tend to go bad quickly. If you want to take that risk well it's up to you. I understand that the hard drives are not cheap and I have yet to locate a tree that grows money. Keep an eye on the failing sectors, if it keeps growing you may want to expedite replacing it.
 

Ykno

Dabbler
Joined
Jan 31, 2017
Messages
27
Ye I'm backing up my data at the moment any ways I'm switching to Raidz2 for added redundancy hit why I'm buying more disks so I think I'm just going to leave server off till I get new disks which will probs be in line with 11.1 release so I can set dockers back up ha.

There nothing irreplaceable on my server so if I was to lose my data be more of a annoyance replace all lost data as I keep all my irreplaceable stuff on cloud storage systems.

talking of Raidz2 is it worth it?
Should I go for added redundancy or more storage.
its for my media server that runs a couple VM's for testing/learning and remote desktop, and dockers when there back on FreeNAS, but like I said its not mission critical stuff I cant afford to lose it just there is a lot of it.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
talking of Raidz2 is it worth it?
This is strickly up to you. To help you decide were are a few things to think about:
1) The more data that is stored in a pool, the longer it will take to resilver a replacement drive into that pool.
2) Fewer hard drives will take longer to resilver than more hard drives for a given pool.
3) If you plan to create a large pool, use RAIDZ2.
4) If your pool is critical then consider RAIDZ3.

My opinion would be:
If you feel the data restoration would be a real pain and you would rather not have to deal with it, use a RAIDZ2 setup. I can see that the data is not that important but it's the recovery that would not be worth the heartache.

Also, what are drives are you specifically planning on using for your pool, just 3 WD Red drives and what size would they be? Prior planning will really help here.
 

Ykno

Dabbler
Joined
Jan 31, 2017
Messages
27
Ah that is some great info.

Right the drives I have are:
1x WD 3tb RED (Was a free gift from a work collage so that why it diffrent size)
1x WD 2tb Green (Has couple failed sectors so will be getting replaced soon with a WD 2tb RED)
1x WD 2tb RED (Has a lot of failed sectors so will be checking warranty on this drive for a replacement)

I understand if I want Raidz2 I will need to add a fourth drive
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
According to your previous posting you are planning to purchase three more WD Red drives, what size are you planning for those to be? You can mix the sizes of the hard drives however in a RAIDZ the size of the pool will be limited to the smallest size drive. So if you had four 3TB drives and one 2TB drive, all drives would be treated as 2TB drives until the 2TB drive was replaces with at least a 3TB drive or larger, then they would all be treated as 3TB drives. It's an automatic thing. hopefully I didn't confuse you.

If I understand you correctly, you are going to purchase another 2TB drive to replace the WD Green drive.

What is your goal for how many hard drives and the drive sizes you desire, and most importantly how much storage do you want to have? There are easy calculations if you know what you want.
 

Ykno

Dabbler
Joined
Jan 31, 2017
Messages
27
I understand drive pool limitation with different drive sizes :) and ye the 3 WD reds I was buying where to replace the 2 disk with bad sectors and a extra one if I go down the route of Raidz2

Basically its a media server for my home network for just 2 people so currently I have used up only 1tb of storage so

My goal is to keep my server cheap and have it run just my media server stuff, some dockers (when that features is back) and couple VMs one windows VM for remote access to my network from work and a couple other VM for test/learning purposes that be like windows desktop machines and windows server machines.

I don't think ill go past 2tb storage soon so it now just determining if I should go with Raidz1 or Raidz2
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
If you use four 3TB drives that would give you the following:

RAIDZ2: 5.5TB - 1.1TB (20%) = 4.4TB of useable space.

If you drop down to three 3TB drives and a RAIDZ1 you end up with the same space, 4.4TB.

Some other information you might like... My WD Red 2TB drives have been continuously running (spinning and heads not parked) for a long time (see chart below, you can see that I started out with 4 drives and added 2 more later when I could afford it). So plan on your drives lasting at least 4 years. I got lucky and I still have lots of free space so I hope these drives last another year or so however once they start failing, it's time for a complete change.

Code:
+------+---------------+----+-----+-----------+----+
|Device|Serial		 |Temp|Power|  Sector   |Last|
|	  |			   |	|On   |  Errors   |Test|
|	  |			   |	|Hours|RE|PE|OL|MZ|Age |
+------+---------------+----+-----+--+--+--+--+----+
|ada0  |WD-WMC301176xxx| 28 |37111| 0| 0| 0| 0|   0|
|ada1  |WD-WMC301183xxx| 28 |36657| 0| 0| 0| 0|   0|
|ada2  |WD-WMC300411xxx| 28 |40560| 0| 0| 0| 0|   0|
|ada3  |WD-WMC300412xxx| 28 |40544| 0| 0| 0| 0|   0|
|ada4  |WD-WMC300411xxx| 29 |40564| 0| 0| 0| 0|   0|
|ada5  |WD-WMC300410xxx| 29 |40568| 0| 0| 0| 0|   0|
+------+---------------+----+-----+--+--+--+--+----+
 
Last edited:
Status
Not open for further replies.
Top