[clug] 3TB (4k sector) disk question

rodneyp at pcug.org.au rodneyp at pcug.org.au
Fri Sep 7 17:53:50 MDT 2012


I could not see any obvious technology change-over point for utilising 
capacity beyond 2TiB.   It might have something to do with version/revision of 
ATA spec,  which I have not investigated.

Eyal's mainboard, that did work, is reporting SATA 2 speeds only (3 Gb/s).  
ISTR that early 3 TB drives were SATA 2 anyway, although I never  used one.

Western Digital site has some info re their 2.5 &   3 TB drives.  They 
initially supplied same cf PCI controller that ensured the full  capacity 
would be utilised.  That practice has now  been discontinued, on the basis 
that suitable mainboards/add-on  cards are readily available.

Looks like  a case  of "try it and see"

Rod

On Wed, 5 Sep 2012 04:01:18 linux-request at lists.samba.org wrote:
> Message: 5
> Date: Wed, 05 Sep 2012 20:01:07 +1000
> From: Eyal Lebedinsky <eyal at eyal.emu.id.au>
> To: linux at lists.samba.org
> Subject: Re: [clug] 3TB (4k sector) disk question
> Message-ID: <504722E3.90609 at eyal.emu.id.au>
> Content-Type: text/plain; charset=UTF-8; format=flowed
> 
> It is still not clear to me what the exact failure more was, so for anyone
> interested, here are the details of the controller and the motherboard at
> boot time: ata4: SATA max UDMA/133 abar m2048 at 0xf7286000 port 0xf7286280
> irq 44 scsi8 : ioc0: LSISAS1068E B3, FwRev=011b5600h, Ports=1, MaxQ=277,
> IRQ=16
> 
> Messages when the disk was attached to the PCIe controller::
>    mptsas: ioc0: attaching sata device: fw_channel 0, fw_id 17, phy 6,
> sas_addr 0x433b592f806b384f scsi 8:0:8:0:
> Direct-Access     ATA      ST3000DM001-9YN1 CC9D PQ: 0 ANSI: 5 sd 8:0:8:0:
> Attached scsi generic sg8 type 0
>    sd 8:0:8:0: [sdi] 4294967294 512-byte logical blocks: (2.19 TB/1.99 TiB)
>    sd 8:0:8:0: [sdi] Write Protect is off
>    sd 8:0:8:0: [sdi] Mode Sense: 73 00 00 08
>    sd 8:0:8:0: [sdi] Write cache: enabled, read cache: enabled, doesn't
> support DPO or FUA sdi: sdi1
>    sd 8:0:8:0: [sdi] Attached SCSI disk
> 
> Messages when the disk was attached to the motherboard directly:
>    ata4: exception Emask 0x10 SAct 0x0 SErr 0x4050000 action 0xe frozen
>    ata4: irq_stat 0x00000040, connection status changed
>    ata4: SError: { PHYRdyChg CommWake DevExch }
>    ata4: hard resetting link
>    ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>    ata4.00: ATA-8: ST3000DM001-9YN166, CC9D, max UDMA/133
>    ata4.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
>    ata4.00: configured for UDMA/133
>    ata4: EH complete
>    scsi 3:0:0:0: Direct-Access     ATA      ST3000DM001-9YN1 CC9D PQ: 0
> ANSI: 5 sd 3:0:0:0: [sdi] 5860533168 512-byte logical blocks: (3.00 TB/2.72
> TiB) sd 3:0:0:0: [sdi] 4096-byte physical blocks
>    sd 3:0:0:0: Attached scsi generic sg8 type 0
>    sd 3:0:0:0: [sdi] Write Protect is off
>    sd 3:0:0:0: [sdi] Mode Sense: 00 3a 00 00
>    sd 3:0:0:0: [sdi] Write cache: enabled, read cache: enabled, doesn't
> support DPO or FUA GPT:Primary header thinks Alt. header is not at the end
> of the disk. GPT:4294967293 != 5860533167
>    GPT:Alternate GPT header not at the end of the disk.
>    GPT:4294967293 != 5860533167
>    GPT: Use GNU Parted to correct GPT errors.
>     sdi: sdi1
>    sd 3:0:0:0: [sdi] Attached SCSI disk
> The above GPT errors are due to the bad table built earlier. They were gone
> once a new GPT was built.
> 
> cheers
>         Eyal
> 
> On 09/04/12 20:52, Eyal Lebedinsky wrote:
> > Thanks Rod,
> > 
> > As you suggest at the end, and as I reported early today, the problem was
> > the SATA controller which did not handle the required protocol (LBA48?).
> > 
> > Once connected to the mobo, the disk showed up with the full size.
> > 
> > cheers
> >
> >      Eyal
> >
> > On 09/04/12 17:51, rodneyp at pcug.org.au wrote:
> >> Hi Eyal,
> >> 
> >> I was  away  yesterday  (and  not checking my email from the top of Mt
> >> Twynam during a total white-out
> >> 
> >> I've never dealt with a drive > 2TB and might not be able to enlighten
> >> you
> >> much further.
> >> 
> >> AFAIK the -z switch in gdisk is for, most importantly, erasing sectors 1
> >> to 34 prior to replacing GPT disk-label with an MBR/DOS disk-label.  You
> >> need the -n switch to create a new disk GPT label.  I suggest you try
> >> that first.
> >> 
> >> By way of comparision, my 2TB WD20 EARX reports to hdparm  -I
> >> 
> >> CHS current addressable sectors:   16514064
> >>
> >>          LBA    user addressable sectors:  268435455
> >>          LBA48  user addressable sectors: 3907029168
> >>          Logical  Sector size:                   512 bytes
> >>          Physical Sector size:                  4096 bytes
> >>          Logical Sector-0 offset:                  0 bytes
> >>          device size with M = 1024*1024:     1907729 MBytes
> >>          device size with M = 1000*1000:     2000398 MBytes (2000 GB)
> >>
> >> and hdparm  -V
> >> hdparm v9.37
> >> 
> >> Results are fairly analagous, but HDD from different manufacturers
> >> 
> >> gdisk 0.8.5 reports
> >> 
> >> Logical sector size: 512 bytes
> >> Partition table holds up to 128 entries
> >> First usable sector is 34, last usable sector is 3907029134
> >> Partitions will be aligned on 2048-sector boundaries
> >> Number  Start (sector)    End (sector)  Size       Code  Name
> >>
> >>     1            2048           22527   10.0 MiB    0700
> >>     5           22528         4216831   2.0 GiB     8200  Linux swap
> >>   10         4237312        37791743   16.0 GiB    8300  Linux/Windows
> >>data 11        37791744        71346175   16.0 GiB    FD00  Linux/Windows
> >>data>>
> >> <snip>
> >> 
> >> (gdisk continues speaking 512 B when using 4k logical sectors, which I
> >> find a more than a little confusing)
> >> 
> >> I see no switch in gdisk for forcing 4k hardware sectors - that would be
> >> more of a hdparm function and fairly risky.   AFAIK, the translation to
> >> logical 512 B sectors is "hardwired"  in the current crop of Advanced
> >> Format drives. It might take little processing power and have little
> >> performance "impact" The "impact" comes if a file block has to span 2
> >> physical 4 k sectors and partitioning via gdisk s avoids that.
> >> 
> >> Your starting point of a USB drive might be the problem.  It's possible
> >> there is some jiggery-pokery in the USB-SATA controller that you have
> >> set aside and which did disable the translation at each start-up.   It's
> >> possible that OEM have access to some utility for that purpose.  You
> >> could try going to the Seagate web site and looking for their
> >> utiility  to see whether it provides for the translation being
> >> disabled.  There were reports last year that the then current WD USB
> >> drives could not be repartitioned - even from Windows. Yet, as  my drive
> >> ilustrates, it is not an issue with a bare SATA  drive.
> >> 
> >> OTOH, gdisk does default to 4k partition sectors and that ought to give
> >> you
> >> the performance  advantage of Advanced Format by aligning to 4k physical
> >> sectors anyway.  Your remaining problem then is capacity.
> >> 
> >> Another possibilty is limitations in older SATA controllers/mainboard
> >> firmware that might not cope with > 2.1 TB drives - perhaps  try a
> >> different mainboard. (I' m using Proliant N40L.  Spec suggests it
> >> handles a max  of 2 TB / drive, but it is SATA II not SATA III - Hmm)
> >> 
> >> ISTR Rainer purchasing a 3 TB WD for his N40L recently.  Perhaps he can
> >> report his experience with it.
> >> 
> >> 
> >> Rod
> >> 
> >> On Sun, 2 Sep 2012 12:00:03 linux-request at lists.samba.org wrote:
> >>> Message: 5
> >>> Date: Sun, 02 Sep 2012 19:36:16 +1000
> >>> From: Eyal Lebedinsky <eyal at eyal.emu.id.au>
> >>> To: linux at lists.samba.org
> >>> Subject: Re: [clug] 3TB (4k sector) disk question
> >>> Message-ID: <50432890.6000504 at eyal.emu.id.au>
> >>> Content-Type: text/plain; charset=UTF-8; format=flowed
> >>> 
> >>> Thanks Michael,
> >>> 
> >>> Yes, I tried gdisk, which is easy to use. However, it seems to inherit
> >>> the size limit from the disk. It does not switch to 4k sectors and I do
> >>> not
> >>> see a way of telling it to do so. I also do not see a way of telling it
> >>> to
> >>> use a larger number of small sectors than the disk advertises. Note how
> >>> 'hdparm -I' knows:
> >>>
> >>> Configuration:
> >>>           CHS current addressable sectors:   16514064
> >>>           LBA    user addressable sectors:  268435455
> >>>           LBA48  user addressable sectors: 5860533168 <<<<< 3TB of 512B
> >>>
> >>> sectors
> >>> 
> >>> Nevertheless gdisk uses a lower limit of 4294967294 (2TB), same as
> >>> fdisk.
> >>> What gives? Maybe Rod understands (and can explain) where the
> >>> restriction
> >>> comes from.
> >>> 
> >>> cheers
> >>>
> >>>          Eyal
> >>>
> >>> On 09/02/12 19:17, Michael James wrote:
> >>>> On 01/09/2012, at 6:49 PM, Eyal Lebedinsky wrote:
> >>>>> Today I bought a 3TB disk, which originally was in a USB3 case (now
> >>>>> out
> >>>>> of it).
> >>>>> 
> >>>>> When introduced linux (as bare SATA) it seems that a sector size of
> >>>>> 512B
> >>>>> is used, and the disk size is limited.
> >>>>>
> >>>>> 'hdparm -I' knows that this is a native 4k disk:
> >>>>>       Model Number:       ST3000DM001-9YN166
> >>>>>       Logical  Sector size:                   512 bytes
> >>>>>       Physical Sector size:                  4096 bytes
> >>>>>       Logical Sector-0 offset:                  0 bytes
> >>>>>       device size with M = 1024*1024:     2861588 MBytes
> >>>>>       device size with M = 1000*1000:     3000592 MBytes (3000 GB)
> >>>>>
> >>>>> However parted thinks otherwise (I created one large GPT partition):
> >>>>> 
> >>>>> # parted /dev/sdi
> >>>>> GNU Parted 3.0
> >>>>> Using /dev/sdi
> >>>>> Welcome to GNU Parted! Type 'help' to view a list of commands.
> >>>>> (parted) print
> >>>>> Model: ATA ST3000DM001-9YN1 (scsi)
> >>>>> Disk /dev/sdi: 2199GB
> >>>>> Sector size (logical/physical): 512B/512B
> >>>>> Partition Table: gpt
> >>>>> 
> >>>>> Number  Start   End     Size    File system  Name     Flags
> >>>>> 1      1049kB  2199GB  2199GB  ext2         primary
> >>>>> 
> >>>>> Note the line 'Sector size (logical/physical): 512B/512B'.
> >>>>> 
> >>>>> How do I make linux use 4k sector size? Or is there a jumper
> >>>>> on the disk? Or a special SATA command to configure the disk?
> >>>>> 
> >>>>> Also, should GPT not be able to create very large disks even with 512B
> >>>>> sectors, using the 64bit internal pointers/sizes/etc.? Where is the
> >>>>> disk size limit coming from?
> >>>> 
> >>>> Dear Eyal,
> >>>> 
> >>>> If you knew enough to partition it GPT you probably know this
> >>>>
> >>>>    but I hope it's worth putting put for the list.
> >>>>
> >>>> The 2 TB limit is inherent in Master Boot Record (MBR/MSDOS)
> >>>> partitioning.
> >>>> The field that delimits a partition doesn't have enough bits to
> >>>> describe
> >>>> anything bigger.
> >>>> 
> >>>> Either it's not done in terms of logical blocks or you can't change
> >>>> that
> >>>> anyway.
> >>>> 
> >>>> Modern disks actually work in 4 KB blocks, but present logically as 512
> >>>> Byte blocks. If you partition a disk NOT on 4 KB boundaries; expect 10
> >>>> x
> >>>> less performance.
> >>>> 
> >>>> This is explained quite well here:  http://www.rodsbooks.com/gdisk/
> >>>> 
> >>>> BTW Rod's gdisk partitioning tool is quite a groovy little utility.
> >>>> Acts like fdisk, writes GPT partition tables.
> >>>> 
> >>>> FWIW,
> >>>> michaelj
> >>> 
> >>> --
> >>> Eyal Lebedinsky (eyal at eyal.emu.id.au)
-- 
test


More information about the linux mailing list