NetBSD-Users archive

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

Re: Disks w/non-512-byte sectors?



jdbaker%mylinuxisp.com@localhost ("John D. Baker") writes:

>First, can anyone point me to message threads about how modern 4K-sector
>disks are to be handled?  I must admit some confusion when reading about
>4K native sectors, but having to deal with a 512-byte emulation mode.
>At what point does the emulation get out of the way and allow one to address
>the native 4K sectors?

With 512-byte emulation mode you do not address 4K sectors, that's
the whole point. You can treat the disks just as disks with 512-byte
sectors and they will "work". However, you should still arrange the 
data on the disks so that accesses are aligned to the 4K sectors,
otherwise you will see performance penalties.

In particular:

- start partitions on 4K (or multiple) boundaries. A common value
  is to use 1M alignment (which wastes a few sectors).
- use filesystem block sizes of 4K (or multiple). With FFS that's
  the _fragment size_. You need to tell newfs about this, because
  it can only see the emulated block size.



>Second, and the real point of this message:  Some time ago I was given
>several 18GB 10k-rpm SCA SCSI disks that had been removed from an IBM
>AS400.  I knew they had strange native sector sizes (522 bytes in the
>case of the drives I have).  When I hooked one up to one of my NetBSD
>boxes, it was probed and reported reasonable data except for the message
>"preposterous sector size 0x20a bytes".  The test machine netboots and
>otherwise operates via NFS--the disk is just connected for testing.
>It is running a recent build of i386-7.99.4.

NetBSD won't be able to use such a disk format.


>It also did that while the disk was formatted with its original 522-byte
>sectors.  Once re-formatted with 512-byte sectors, there was no delay and
>booting proceeded directly.  I wonder what causes the delay when the disk
>has non-512-byte sectors--even if it has a power-of-two sector size?

Did you see any errors on console?



>I've been unable to complete a "-wrveri" (write verification) with
>'sformat'.

That depends on the drive, it needs to understand the command.


>sd0(adv1:0:0:0): timed out
>adv1: exiting ccb not allocated!

That's some bug in the adv driver or possibly the SCSI layer.


-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index