Incorect sectors on WD20EARS disks

Status
Not open for further replies.

Digidoc

Dabbler
Joined
Oct 30, 2011
Messages
41
Good to know, thanks! I'm still quite the n00b when it comes to FreeBSD (been a Windows guy for almost 15 years now... :/ ) so I'm still learning.

The reason I forced a 4096k sector size when I created the pool though was because one of the drives happened to be an older 512k drive. It's a long story, but the short of it is when I bought my drives, I had bought them through Newegg when they had a great deal on them. One of them turned out to be bad so I had to send it in for a warranty exchange. In the meantime, to get the system up and running with all the drives, I went out and bought another 2TB WD drive locally in a retail box. Turns out that drive was an older non-advanced format drive. :/

You have me wondering though. If TECK has AF drives but they're not being detected correctly, could he have the jumper on the back set for compatibility with non-AF aware OS's?

Your does because the FreeBSD succeeds to detect the disk as a 4096 sector size, in some cases the OS can retrieve that info correctly, in some it doesn't (depending on the disk, firmware version, achi mode, etc)

For example, in my WD15EARS it shows as 512 sector size, still it works pretty ok with the 4k sector size checked...
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
What cache files?
About swap I think so, it will probably use a sector size of 512, but i'm not sure if that is relevant.
 

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
If TECK has AF drives but they're not being detected correctly, could he have the jumper on the back set for compatibility with non-AF aware OS's?
There are no jumpers installed on my drives. The WD20EARS-00MVWB0 are known for not returning the proper physical sector size to the OS. Windows checks them with a model match, for Linux we are stuck to manually modify the partitions created into disk.



What cache files?
About swap I think so, it will probably use a sector size of 512, but i'm not sure if that is relevant.
This one:
cachefile=/data/zfs/zpool.cache
and the swap:
gpart add -b 128 -t freebsd-swap -s 4194304 ada0

If the zpool.cache is stored on a 512bytes partition, you can forget about performance. Usually, the cache is best to be stored into a SSD drive. I plan to add a SATA3 card and a Crucial SSD drive to store the cache on my NAS box.

#gnop create -S 4096 /dev/ada0
This will just create a dev /dev/ada0.nop that will emulate temporarily 4096 sector size:
diskinfo -v /dev/ada0.nop
So if I run this command prior the actual pool creation in GUI it will not overwrite it? I checked after the pool creation and I get this info:
Code:
# diskinfo -v /dev/ada0.nop
/dev/ada0.nop
        4096            # sectorsize
        2000398934016   # mediasize in bytes (1.8T)
        488378646       # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        484502          # Cylinders according to firmware.
        16              # Heads according to firmware.
        63              # Sectors according to firmware.
        WD-************ # Disk ident.


However, the disk still shows the wrong sector size:
Code:
# diskinfo -v /dev/ada0
/dev/ada0
        512             # sectorsize
        2000398934016   # mediasize in bytes (1.8T)
        3907029168      # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        3876021         # Cylinders according to firmware.
        16              # Heads according to firmware.
        63              # Sectors according to firmware.
        WD-************ # Disk ident.
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
There are no jumpers installed on my drives. The WD20EARS-00MVWB0 are known for not returning the proper physical sector size to the OS. Windows checks them with a model match, for Linux we are stuck to manually modify the partitions created into disk.




This one:
cachefile=/data/zfs/zpool.cache
and the swap:
gpart add -b 128 -t freebsd-swap -s 4194304 ada0

If the zpool.cache is stored on a 512bytes partition, you can forget about performance. Usually, the cache is best to be stored into a SSD drive. I plan to add a SATA3 card and a Crucial SSD drive to store the cache on my NAS box.
Could you post the commands to manually create the array with proper sectors, so I can auto-import it in GUI? Thanks.

zpool.cache is not a cache in the sense you're thinking, it does not cache data for read. It is just a "state" file for ZFS.
Cache in ZFS is done through a cache device: zpool add pool cache devname

And for the third and last time :) You don't need to manually create the pool, the GUI does that automatically if you choose the 4k sector size in the wizard!
 
Status
Not open for further replies.
Top