Re: [OxLUG] 4k sector size disks

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Simon Iremonger (oxlug)
Date:  
To: Oxfordshire Linux User Group Discussion List
Subject: Re: [OxLUG] 4k sector size disks
> no, users are turning up with disks which present the 4k sectors to the OS:
>  kernel: usb 2-5: new high speed USB device using ehci_hcd and address 6
>  kernel: usb 2-5: configuration #1 chosen from 1 choice
>  kernel: scsi10 : SCSI emulation for USB Mass Storage devices
>  kernel:   Vendor: HitachiG  Model: ST                Rev: 0000
>  kernel:   Type:   Direct-Access                      ANSI SCSI
> revision: 06
>  kernel: SCSI device sdb: 976754431 4096-byte hdwr sectors (4000786 MB)
>  kernel: sdb: Write Protect is off
>  kernel: sdb: assuming drive cache: write through
>  kernel: SCSI device sdb: 976754431 4096-byte hdwr sectors (4000786 MB)
>  kernel: sdb: Write Protect is off
>  kernel: sdb: assuming drive cache: write through
>  kernel:  sdb: sdb1
>  kernel: sd 10:0:0:0: Attached scsi disk sdb
>  kernel: sd 10:0:0:0: Attached scsi generic sg1 type 0


Hrrm That is via USB? Does the same drive do the same thing
when presented over SATA bypassing the USB bridge controller?

But, fair-enough, it may be the case that the latest "very large"
disks really are no longer saying 512-byte-sectors...


I'm wondering if the USB mass storage protocol, has some LBA limit



    
> I think this is probably inevitable given that it is a 4TB disk...


I'm not convinced.
With LBA28, 512byte sectors, was a traditional 128GB limit.

However, now there is LBA48 ;-).
That looks like 128 Binary Petabytes according to my calculations,
with 512byte sectors...

2^48 * 512 / 1048576 /  1024  / 1024  / 1024
  (bytes)      (->mb)  (->gb)  (->tb)  (->pb)



>> This reminds me, there was the case, in DOS, dos 3.3 or so
>>    introduced FAT16 but couldn't cope with>64k sectors and hence
>>    was limited to 32mb/partition and weird drivers were invented
>>    to do weird translation to present the illusion of larger sectors
>>    to dos, in order that it could cope, or something ;-).
> are you talking about LBA? Logical Block Allocation was a replacement
> for Cylinders, Heads, Sectors (CHS).

No no no this predated all of that LBA stuffs ;-).


> so far I have ascertained that RHEL5 is incompatible with disks which
> have 4k sectors. RHEL6 is probably ok but I would like to have a disk
> that I can use for testing.

OK now all makes sense, I have a machine with a large 4k sector drive
but would need to reboot it to compare kernel messages and comment.
I do wonder if the "hdwr sectors" COULD refer to the fact that linux
''knows'' it is 4k-sectors but the interface still speaks 512...
Maybe not =).


> see above. I need the OS to be compatible, I do not want to right my own
> kernel space drivers!
> GREG


Aaaaah! Now that you have explained you are actually getting drives
that, when connected over USB, appear as 4k sector drives, this
makes more sense. In that case, apologies, I don't know yet.


Seemingly there is a "Reduced Block Commands" USB mass storage
interface, but it isn't clear what this does/doesn't support
in terms of LBA size!!
Maybe there is a sector size translation going on in the
SATA->USB bridge insize the unit... Again, maybe-not!


Supposedly, some 4k physical sector drives were provided as an
'engineering sample' !! Code introduced in Linux 2.6.37

http://www.h-online.com/open/features/Kernel-Log-Coming-in-2-6-37-Part-3-Network-and-storage-hardware-1153025.html?page=2

Presumably RHEL5 is <2.6.37 kernel...


It is also interesting to notice that Microsoft say
  "Most of the drives larger than 2 terabytes and with a USB
    connection are this kind of drive." [4k native]


http://support.microsoft.com/kb/2510009



I don't have a direct answer/solution, but hope the above notes/
links will be of interest to some, at least.

--Simon