mkextrafs failure on second 1TB disk
sudo /usr/testbed/bin/mkextrafs -s 1 -r /dev/sdb /mnt1
on our CentOS 7 image creates a filesystem that is only 27GB instead of 900+GB. The culprit seems to be the line:
echo '2048,1953525168' | sfdisk --force /dev/sdb
which should correctly create the 900+GB partition one, but instead says:
[root@node1 ~]# echo '2048,1953525168' | sfdisk --force /dev/sdb Checking that no-one is using this disk right now ... OK Disk /dev/sdb: 121601 cylinders, 255 heads, 63 sectors/track Old situation: Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sdb1 2048 5520- 3473- 27896024 83 Linux /dev/sdb2 0 - 0 0 0 Empty /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 83 Linux Warning: given size (1953525168) exceeds max allowable size (119553) New situation: Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sdb1 2048 1953527215 1953525168 15691690911960 83 Linux /dev/sdb2 0 - 0 0 0 Empty /dev/sdb3 0 - 0 0 0 Empty /dev/sdb4 0 - 0 0 0 Empty Warning: partition 1 extends past end of disk Successfully wrote the new partition table Re-reading the partition table ... If you created or changed a DOS partition, /dev/foo7, say, then use dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1 (See fdisk(8).)
and then produced the tiny partition instead, which appears to be some sort of default.
Note that this is only a 1TB drive and should not trigger the DOS partition 2TB problem. But I would not doubt that it is related.
Note also that we parse out the disk size from fdisk (1953525168) and then want to use that size, offset by 2048, to create the new partition. Seems like we should be subtracting 2048 from the size before we do that. I tried that manually, but it did not seem to affect the outcome. But maybe there is some rounding going on that caused it to still be too big.