[plug] WD-EARS 2TB drives and linux?
Daniel Pittman
daniel at rimspace.net
Thu Aug 26 13:04:51 WST 2010
Steve Baker <steve at iinet.net.au> writes:
> On 26/08/10 11:21, Ari wrote:
>>
>> I think I may have made an error and I'm just now realising it. I have two
>> WD Greenpower 2TB drives - one as an encrypted backup drive (using luks)
>> and one as a storage drive (also using luks). I just fdisked them and put
>> them to work. Now I'm hearing I should have realligned them or some such?
Uh-huh. Anything that aligns on a 4K boundary will have less performance cost
from the internal remapping of 512 to 4096 byte sectors. (IIRC, at least,
those drives are 4K internally.)
>> I'm searching but not sure exactly what's up or if it's even applicable to
>> linux (using Fedora Core 11). Any help would be greatly appreciated. The
>> storage drive backs up onto a Seagate external 2TB drive, and the backup
>> drive is a backup of two 1TB greenpower drives (I think). I'm freaking out
>> just a little here about terrabytes of data loss!
Absolutely no risk of that: basically, what happens is that because you wrote
to the first 512 bytes of a 4K block the drive has to read the old block,
update the first 512 bytes, then write the whole thing back. That makes it
slower, but really not any more risky, than aligned writes.
Anyway, you can check your partitioning by running as root:
sfdisk -ub -l /dev/sda # read-only, I promise
If your start is '63' you have bad partitioning; if it is a multiple of 8 then
you are good. Work that out before you worry further. :)
[...]
> New HDDs have a 4K block size, older drives used a 512b block size.
*SOME* new hard disks; it is also important to note that the 4K blocks can be
internal only, or visible from the outside. The later pretty much nothing
supports yet, but the former is what is floating around.
> I'm not sure of the specifics, but I believe that older versions of Windows
> fdisk can put the start of a partition in the middle of a (4k) block, as it
> assumed that any 512 byte boundary would be fine (as it was on older
> drives). This misalignment could cause significant performance problems.
Well, some performance problems. Most people probably wouldn't really
notice, and frankly the data loss risks are so small that you couldn't
distinguish them from the other risks of the disk anyway.
> Linux, and newer versions of windows (Vista, 7) don't have this issue, and
> place the partition on the block boundary where it belongs.
....not true: if you partition with an old tool it will happily put the first
block of the partition at the 63 512-byte "sector" mark, which will have
exactly the same issue.
Daniel
--
✣ Daniel Pittman ✉ daniel at rimspace.net ☎ +61 401 155 707
♽ made with 100 percent post-consumer electrons
More information about the plug
mailing list