1

In the same server I have a bunch of 4 TB Seagate disks. I just installed them and I realized that some are recognized as 4 TB, but some as 2 TB. What could be the issue?

$ dmesg | grep '8:0:3:0'
[   10.810825] scsi 8:0:3:0: Direct-Access     ATA      ST4000DM005-2DP1 0001 PQ: 0 ANSI: 5
[   11.508060] sd 8:0:3:0: [sdf] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[   11.508061] sd 8:0:3:0: [sdf] 4096-byte physical blocks
[   11.508064] sd 8:0:3:0: Attached scsi generic sg5 type 0
[   11.508089] sd 8:0:3:0: [sdf] Write Protect is off
[   11.508090] sd 8:0:3:0: [sdf] Mode Sense: 00 3a 00 00
[   11.508100] sd 8:0:3:0: [sdf] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   11.524947] sd 8:0:3:0: [sdf] Attached SCSI disk

$ dmesg | grep 9:0:4:0
[   13.235315] scsi 9:0:4:0: Direct-Access     ATA      ST4000DM005-2DP1 0001 PQ: 0 ANSI: 5
[   13.240191] sd 9:0:4:0: Attached scsi generic sg14 type 0
[   13.241734] sd 9:0:4:0: [sdo] 4294967294 512-byte logical blocks: (2.20 TB/2.00 TiB)
[   13.278030] sd 9:0:4:0: [sdo] Write Protect is off
[   13.278031] sd 9:0:4:0: [sdo] Mode Sense: 73 00 00 08
[   13.280316] sd 9:0:4:0: [sdo] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   13.392557] sd 9:0:4:0: [sdo] Attached SCSI disk

smartctl says that both drives are 4 TB. parted sees them as 4 TB and 2 TB, respectively:

$ parted /dev/sdf unit s print
Model: ATA ST4000DM005-2DP1 (scsi)
Disk /dev/sdf: 7814037168s
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start  End          Size         File system  Name     Flags
 1      2048s  7814035455s  7814033408s               primary  raid

$ parted /dev/sdo unit s print
Model: ATA ST4000DM005-2DP1 (scsi)
Disk /dev/sdo: 4294967294s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start  End          Size         File system  Name     Flags
 1      2048s  4294965247s  4294963200s               primary  raid

Update:

It seems the issue is that some drives are attached to the LSI SAS1068E SCSI storage controller and that one has a 2 TB drive limitation.

Not sure if there is a workaround for this. :-(

4
  • 4
    Is one drive gpt and other MBR(msdos). The maximum that MBR supports is 2TiB as MBR was designed 30 to 40 years ago when KB was large & MB huge. GB & TB were unheard of. Post this: sudo parted /dev/sda unit s print MBR details including 2TiB limit and GPT link en.wikipedia.org/wiki/Master_boot_record
    – oldfred
    Aug 31, 2017 at 3:32
  • Added parted output.
    – Mitar
    Aug 31, 2017 at 7:29
  • This is strange. The drives have the same 'model number', but the other overall data (about size) differ according to parted. Which version of Ubuntu are you running and which version of parted? What information will you get from gdisk? Could it be that some of the raid information confuses parted?
    – sudodus
    Aug 31, 2017 at 9:06
  • Do not know about RAID, but one drive shows sectors as 512B/4096B and other shows 512B/512B. I thought all new drives were 4096 physical and only partition tools used 512 for compatibility. Did you use different partitioning tools to partition drives?ibm.com/developerworks/linux/library/…
    – oldfred
    Aug 31, 2017 at 15:17

2 Answers 2

2

The drives are in RAID format. As long as the RAID shows up as 4G or 8G, you're fine. If the RAID shows up as something else, then one of your GPT partition tables is corrupt, and needs to be re-written.

3
  • Please explain how to check that RAID shows up as 4G or 8G, and how to rewrite the partition tables.
    – sudodus
    Aug 31, 2017 at 16:22
  • 1
    @sudodus I'm not a RAID management expert, but I believe that you'd use the mdadm tools. However, I do know that it's common to have RAID0 or RAID1 configurations, and the total capacity would be 8/4G, using the RAID drive name (not /dev/sdX). Generally to rewrite the GPT partition table, you'd first backup your data, use gparted to write a new partition table, then restore your data... but depending on the type of RAID, there are some additional steps in the process.
    – heynnema
    Aug 31, 2017 at 16:31
  • Well, we agree that some RAID data might cause this problem. Maybe @Mitar knows more about RAID than we do ;-) Otherwise, let us hope that someone who knows more about it will chip in an help.
    – sudodus
    Aug 31, 2017 at 16:37
1

Try this (after wiping the partitions from the disk so it's empty):

parted /dev/sdo
 mklabel gpt
 mkpart primary 0GB 4096GB

You can replace "primary" with another name for the partition.
"4096GB" corresponds to the maximum usable size of the disk so you might have to lower this to match the actual usable space, to something like "3906GB", etc.

You should be able to check the available space with fdisk:

fdisk /dev/sdo

then type p to list partitions and drive data.

If everything worked, you should see the drive as a 4TB one in parted and if so, just proceed to formatting and mounting as usual with mkfs and mount.

2
  • 2
    This is not a partitioning problem, the scsi layer sees the wrong size...
    – pim
    Aug 31, 2017 at 9:06
  • 1
    This absolutely worked, thank you. On this page thegeekstuff.com/2012/08/2tb-gtp-parted , there is a tutorial which shows the output of those commands.
    – Michael
    Jan 13, 2021 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .