Page 1 of 1
Replacing WD drive with 4k sectors: how?
Posted: 12 Jul 2013 13:44
by odedia
Hi,
One of my drives reported failure so I had it replaced. I had 4 WD 2TB green drives in my NAS4FREE box. I now replaced the faulty drive with a WD RED model, also 2Tb.
When I setup my NAS box, I did that "advanced 4k format" checkbox to solve the 4k misalignment issue with WD drives. I think I also did .nop trick so it will work find but honestly it was so long ago that I can't remember.
Should I do anything special regarding the 4k sectors as part of the replacement process? I just followed the guide here step by step without doing anything special (Didn't even to a format of the drive because it was brand new, nas4free seemed to be fine with it).
http://www.wiki.nas4free.org/doku.php?id=faq:0149
Thanks for your help.
Re: Replacing WD drive with 4k sectors: how?
Posted: 12 Jul 2013 13:45
by odedia
Interesting, I just took a look at the SMART panel and while the green drives show the following:
Sector Size: 512 bytes logical/physical
The RED drive shows the following:
Sector Sizes: 512 bytes logical, 4096 bytes physical
Does this mean that there are no issues at all with the RED drives in NAS4FREE? Seems that it should be able to properly identify the physical sector size and work with that, right?
Re: Replacing WD drive with 4k sectors: how?
Posted: 13 Jul 2013 08:20
by b0ssman
you can use the wd red drive like a normal drive. if its not aligned you will loose some performance. (5-30%)
however if your array was not aligned before the creation, you cant align it afterwards
Re: Replacing WD drive with 4k sectors: how?
Posted: 13 Jul 2013 09:38
by siftu
bOssman is right. I'm at the point of recommending that everyone use advanced format even if your drive isnt 4k drives. I think the performance hit of formatting a 512b sector drive to 4k is far less the other way around.
If I were you I would backup my data and recreate my pool with both devices as advanced format. This will also future proof you when you replace your next drive.
Re: Replacing WD drive with 4k sectors: how?
Posted: 13 Jul 2013 09:54
by b0ssman
there is no performance hit using advanced format on a 512b drive.
only a tiny storage hit.
Re: Replacing WD drive with 4k sectors: how?
Posted: 13 Jul 2013 12:32
by odedia
Thanks for the info,
As I said in the first post, I DID format the drives originally as 4k drives (meaning I checked the "advanced format drive" checkbox).
However, I have now replaced one drive in the pool (did a zpool replace command). The new drive was not formatted beforehand.
Should the fact that I am replacing an old 4k drive formatted drive with a new drive automatically align it correctly? Hope my question is clear...
If I had to format it as a 4k drive before doing the replace command, I can always just take that last drive offline, format it to 4k then resilver, right?
Thanks for that help.
Re: Replacing WD drive with 4k sectors: how?
Posted: 13 Jul 2013 16:20
by siftu
Ok it sounds like your are fine then. If the output of "zdb | grep ashift" is 12 and not 9 there is no problem and you are good to go.
Re: Replacing WD drive with 4k sectors: how?
Posted: 13 Jul 2013 16:48
by siftu
b0ssman wrote:there is no performance hit using advanced format on a 512b drive.
only a tiny storage hit.
That is my suspicion but I had heard others say there is a slight performance hit. Do you have any sources or benchmarks? I would love to see the numbers myself
Re: Replacing WD drive with 4k sectors: how?
Posted: 13 Jul 2013 20:27
by odedia
siftu wrote:Ok it sounds like your are fine then. If the output of "zdb | grep ashift" is 12 and not 9 there is no problem and you are good to go.
Code: Select all
nas4free:~# zdb | grep ashift
ashift: 12
Thanks!

Re: Replacing WD drive with 4k sectors: how?
Posted: 20 Jun 2015 14:44
by françois ROLAND
And, is it possible to change it after replace 1 or 2 HD by WD red series?
Or should I backup my data, erase and re creat a pool ZFS using advanced format 4Kb ?
Re: Replacing WD drive with 4k sectors: how?
Posted: 20 Jun 2015 17:35
by b0ssman
you can not change the alignment after the pool is created.
Re: Replacing WD drive with 4k sectors: how?
Posted: 20 Jun 2015 17:50
by françois ROLAND
I tried to re create a new pool with 4x1To HD, but I checked advanced format 4k
When I remove one HD to replace it by a WD RED 2 To, I got same message :
Code: Select all
state: ONLINE
status: One or more devices are configured to use a non-native block size.
Expect reduced performance.
action: Replace affected devices with devices that support the
configured block size, or migrate data to a properly configured
pool.
scan: resilvered 45K in 0h0m with 0 errors on Sat Jun 20 17:46:14 2015
config:
NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0 block size: 512B configured, 4096B native