How to use non default partitions including the additions of /dev/sda* disks

The default configuration for LCG installations with LCFG assumes you have IDE disks (/dev/hda*) and then uses the very safe but far from optional partitions.

/dev/hda1 /boot ext3 38 Megs
/dev/hda2 /     ext3 Remainder
/dev/hda3  swap  swap 512 Megs

This is set up in the configuration file redhat-73-cfg.h which is part of the release. It contains by default:

fstab.disks                      hda
fstab.dopartition_hda            yes
fstab.partitions_hda             hda2 hda1 hda3
                                                                                                                          
fstab.mpt_hda1                   /boot
fstab.size_hda1                  32
fstab.type_hda1                  ext3
fstab.preserve_hda1              no
fstab.mkmpt_hda1                 zap
                                                                                                                          
fstab.mpt_hda2                   /
fstab.size_hda2                  free
fstab.type_hda2                  ext3
fstab.preserve_hda2              no
fstab.mkmpt_hda2                 zap
                                                                                                                          
fstab.size_hda3                  512
fstab.type_hda3                  swap
fstab.preserve_hda3              no
fstab.mkmpt_hda3                 zap

Most of the values above are fairly obvious but:

  • Setting dopartitions_hda to yes specifieis that the disk should be partitioned at install time.
  • Setting preserve_hda1 to no specifies that the partition should be formatted at install time.
  • Setting mkmpt_hda3 to zap dictates that any files found in the mount point before the mount is made will be removed.
  • Setting size_hda3 to free will calcualte the size of the disk left and create the partition at this size.
See the man page of lcfg-fstab on existing LCFG client to obtain furthur details.

So it is possible to just extend all of this or override any of it, eg to add a second scsi disk to the situation.

EXTRA(fstab.disks)               sda
fstab.dopartition_sda            yes
fstab.partitions_sda             sda2 sda1 
                                                                                                                          
fstab.mpt_sda1                   /usr/local
fstab.size_sda1                  32
fstab.type_sda1                  ext3
fstab.preserve_sda1              no
fstab.mkmpt_sda1                 zap
                                                                                                                          
fstab.mpt_sda2                   /usr
fstab.size_sda2                  free
fstab.type_sda2                  ext3
fstab.preserve_sda2              no
fstab.mkmpt_sda2                 zap
would create a /usr and /usr/local partitions on sda. Note the order which the partitions are created in must be sensible. You can not create /usr/local before /usr. A couple of things to note:
  1. If the nodes profile has SCSI_HOSTADAPTOR set then an #ifdef exists in redhat-73-cg.h then the default disk will be set to sda rather hda. So if all you have is one scsi disk instead of one ide disk then that is all that is needed. See the faq about scsi for some more details and also look at redhat-73-cfg.h to understant it. The file contains comments.
  2. The default install assumes a /boot partition. If you combine /boot into your / partition then all the grub paths change. You will have to correct the values for the grub profile as well.
  3. The partition tool in LCFG only supports primary partitions so there is a maximum of 4 partitons per disk.
LCG FAQ


Last modified Mon 14 June 2004 . View page history
Switch to HTTPS . Website Help . Print View . Built with GridSite 1.4.3
For more about GridPP please contact Neasan O'Neill