[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux not ready for new 4K-sector hard drives



On Mon, 2010-02-15 at 15:38 -0600, Steven Pritchard wrote:
> On Sun, Feb 14, 2010 at 04:02:24PM -0600, Robert G. (Doc) Savage wrote:
> > At the last SILUG meeting I mentioned that there is a new generation of
> > hard drives coming whose default sector sizes are 4K rather than the 512
> > bytes inherited from floppy drives. I said we could probably expect to
> > see some problems with these new drives until some very low-level
> > software is rewritten to support 4K sectors. (Note that I'm using the
> > term "sector" rather than "block". That's an important distinction at
> > the hardware layer.)
> > 
> > Here's an example of what I was talking about:
> > 
> > http://www.osnews.com/story/22872/Linux_Not_Fully_Prepared_for_4096-Byte_Sector_Hard_Drives
> 
> Look at this comment though:
> 
>  http://www.osnews.com/thread?409410
> 
> There's a thread about this on the Fedora devel list.
> 
> Steve

The killers are the foundation-level utilities like fdisk which still
use the old LBA->CHS mapping of 255 logical heads per drive and 63
logical sectors per track. Consider this 250GB SATA drive:

        # fdisk -l /dev/sdc
        
        Disk /dev/sdc: 250.0 GB, 250000000000 bytes
        255 heads, 63 sectors/track, 30394 cylinders
        Units = cylinders of 16065 * 512 = 8225280 bytes
        
           Device Boot      Start         End      Blocks   Id  System
        /dev/sdc1   *           1       30394   244137984    7
        HPFS/NTFS

To work efficiently with 4096-byte drives, fdisk would have to be
rewritten to use different logical numbers. For example, Ted Ts'o uses
224 heads per drive and 56 sectors/track in an exercise to optimize an
Intel solid-state hard drive with 4096-byte sectors:

        # fdisk -H 224 -S 56 -l /dev/sdc
        
        Disk /dev/sdc: 250.0 GB, 250000000000 bytes
        224 heads, 56 sectors/track, 38925 cylinders
        Units = cylinders of 12544 * 512 = 6422528 bytes
        
           Device Boot      Start         End      Blocks   Id  System
        /dev/sdc1   *           1       38926   244137984    7
        HPFS/NTFS
        Partition 1 does not end on cylinder boundary.

Note the warning.

One problem we're going to have is with hard drives that lie when we
interrogate their interfaces. The new Western Digital drives do use
4096-byte sectors, but when interrogated they report using 512-byte
sectors. That's beyond bad.

--Doc


-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.