I have a large RAID disk of around 36TB. I've partitioned it as follows:
Code:
# parted -l
Model: SMC SMC2208 (scsi)
Disk /dev/sda: 36.0TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 10.7GB 10.7GB ext4 boot
2 10.7GB 35.8TB 35.8TB primary
3 35.8TB 35.8TB 51.2GB primary
4 35.8TB 35.9TB 51.2GB primary
5 35.9TB 35.9TB 51.2GB primary
6 35.9TB 36.0TB 51.2GB primary
You can see here that partition 2 is a large 35.8TB partition. The partition sizes are all reported correctly in /proc/partitions except for partition 2:
Code:
# cat /proc/partitions
major minor #blocks name
8 0 35156238336 sda
8 1 10485760 sda1
8 2 586013679 sda2
8 3 49999872 sda3
8 4 49999872 sda4
8 5 49999872 sda5
8 6 49999872 sda6
As you can see, there is a large discrepancy in the size reported by parted and the size reported by /proc/partitions. Instead of 35.8TB, the size is reported as 600GB (586013679*1024/1000^3==600).
What's going on here? I was expecting perhaps to see this partition limited to 16TB, which is a GPT/ext4 limit, but why 600GB? Something seems to be seriously wrong here, but other tools agree with /proc/partitions:
Code:
# blockdev --getsize64 /dev/sda2
600078007808
$ echo "600078007808/1000^3" | bc
600
Can anyone explain what's going on? For what it's worth, this partition is going to be used as a raw partition and not formatted with ext4 or similar file system.