LCFG and Very Big Disks

(By the time you read this, 6Tb of disk is probably not that big any more…)

Handling a new server which required a 4Tb (RAIDed) Data partition turned out to be a bit of a hassle. In this case, capacity was specified as a priority over performance so the array was made of a few very large disks; only comfortably enough for one logical disk group (so dedicating some spindles for root was not an option).

Disks (physical or otherwise) over 2Tb cannot be handled by the classic DOS partition table: for DICE, then, GPT is required. But here’s where it starts to go wrong: the fstab component does not currently support GPT, so disks in the multi-terabyte range are currently out of bounds. What’s more, our GRUB does not understand GPT at all so booting from a large-but-manually-partitioned disk is also out of the question.

The solution to the physical split is of course to make two RAID containers; the first, boot (virtual) disk is managed by LCFG while the second, larger container is ‘tolerated’ by LCFG and just mounted when the time is right. The install procedure requires some degree of failure to be built-in, however.

The disks should be managed in a manner similar to this:

profile for lcfg/myserver:
!fstab.size_sda1        mSET( /* root partition size */ )
!fstab.size_sda2        mSET( /* swap appropriate to your machine */ )
!fstab.size_sda3        mSET(free) /* slack space for AFS cache: ~3Gb in this case */

Then to manage the monster disk, add it with appropriate warning commentary:

!fstab.disks            mADD(sdb) /* must be GPT partitioned by hand */
fstab.dopartition_sdb   no /* GPT: can never be LCFG partitioned */
fstab.partitions_sdb    sdb1
fstab.preserve_sdb1     yes /* regardless of size */
fstab.mpt_sdb1          /disk/data/
fstab.size_sdb1         free /* ~3.5Tb in my case */
fstab.type_sdb1         ext3

Kick off an install then wait for it to fail when the second disk isn’t as expected:

[FAIL] fstab: Error: Unable to open /dev/sdb - unrecognised disk label. 
Error: msdos labels do not support devices that have more than 
4294967295 sectors. mkparts:ped_disk_new_fresh

Fire up parted to do the job properly.

# parted
(parted) select /dev/sdb
(parted) print
Error: Unable to open /dev/sdb - unrecognised disk label.

(parted) mklabel gpt
(parted) print
Model: DELL PERC 6/i (scsi)
Disk /dev/sdb: 3945GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags

(parted) mkpart
Partition name?  []?
File system type?  [ext2]? ext3
Start? 0
End? -0

(parted) quit
Information: Don't forget to update /etc/fstab, if necessary.

Parted on SL5 won’t create ext3 volumes for me, so we can just go on to do this manually (expect to wait a while…):

# mkfs.etx3 /dev/sdb1
Creating journal (32768 blocks): done
This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

Reboot, start another install, and watch it proceed as if nothing had happened.

Leave a Reply

Your email address will not be published. Required fields are marked *