[clug] 3TB (4k sector) disk question
eyal at eyal.emu.id.au
Sun Sep 2 03:36:16 MDT 2012
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:
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
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.
Eyal Lebedinsky (eyal at eyal.emu.id.au)
More information about the linux