DICE Disk Partitioning on SL5 and FC6

Here's how the default disk partitioning is decided for DICE machines. Note that this is a snapshot of how things worked in February 2008; things may have changed by the time you read this, and for the canonical information you should refer to the header files in subversion.

Desktop machines

Office machines and student lab machines come into this category. These use a recently written and fairly tidy disk partitioning header in dice/options/disk-layout.h.


25GB root partition / hda1 or sda1
2GB swap partition hda2 or sda2
2GB AFS cache partition /var/cache/afs hda3 or sda3
remaining free space scratch partition /disk/scratch hda4 or sda4

The scratch partition is writeable by normal users on office machines, but not on student lab machines.

Variables you can use

If this is defined in a machine's LCFG file, above where the headers are included, then running the DICE install process will repartition the disk without saving anything on it. If it's not defined there then the DICE install process won't partition the disk and will preserve the contents of the local data partition (generally called /disk/scratch).
define this above the inclusion of the headers to change the size of the root partition from its default (25GB.
define this above the inclusion of the headers to change the size of the swap partition from its default (2GB).

More detail

Office machines are expected to include one of the dice/options/office-site.h headers. These all include dice/options/office.h which includes dice/options/desktop.h and dice/options/scratch-disk.h.

Student lab machines are expected to include one of the dice/options/studentlabs-site.h headers. These all include dice/options/studentlabs.h which includes dice/options/desktop.h.

dice/options/desktop.h defines the name of the scratch partition (in DICE_LOCAL_PART) then includes dice/options/disk-layout.h.

dice/options/disk-layout.h contains all the rest of the disk partitioning configuration, except for adjusting the permissions of the scratch partition. For office machines this is done in dice/options/scratch-disk.h and for student lab machines it's done in dice/options/studentlabs.h.


The default disk name is hda. Machines with SCSI disks instead of IDE will instead have sda. The change from hda to sda is done by including lcfg/options/scsiroot.h. This is included at the end of the hardware model headers in lcfg/hw/ which are included by the dice/hw/ hardware model headers which are included in machines' own LCFG files - so lcfg/options/scsiroot.h should not normally need to be included in the LCFG file. The settings in lcfg/options/scsiroot.h are largely overridden by those in dice/options/disk-layout.h - however the latter chooses disk partition names based on whether or not lcfg/options/scsiroot.h has been included.


This encompasses all machines which don't include dice/options/desktop.h or dice/options/disk-layout.h somehow. This largely means those which don't use a dice/options/office-site.h or dice/options/studentlabs-site.h header. However there are one or two other headers which use disk-layout.h - for instance dice/options/buildhost.h uses it to give the build hosts a /disk/scratch partition.


By default these machines get their disk partitioning fstab resources from lcfg level headers. They get a partition table like this:

25GB root partition / hda1 or sda1
1GB swap partition hda2 or sda2
2GB AFS cache partition /var/cache/afs hda3 or sda3

If you want your machine to have a local partition, use dice/options/disk-layout.h. First you'll have to define the name of your local partition using DICE_LOCAL_PART. For example:

#include (the headers)

#define DICE_LOCAL_PART /disk/scratch
If you don't use dice/options/disk-layout.h then you'll have to muck about with the underlying lcfg-level default disk partitioning arrangements, and they're ghastly.

Variables you can use

if you want a local disk partition on your disk's free space, and you're wise, you will define this to the desired name of your partition then #include <dice/options/disk-layout.h> as above.
If you want to make life difficult for yourself, use the lcfg-level disk partitioning arrangements and stock up on painkillers to cure your imminent headache. In this case, read on; the rest of the variables mentioned here apply to these partitioning arrangements.
This variable is defined by default, and suppresses the making of a local partition using up the free space on the disk. If your machine has a SCSI disk then if you #undef _NO_DEFAULT_LOCALPART _after the dice/os header and before the dice/hw header then you'll get a local partition sda4 taking up the free space on the disk. Its default name is /localdisk. This only works for machines with a SCSI (sd) disk!
This changes the name of the optional local partition (see _NO_DEFAULT_LOCALPART). Use it _before the dice/os header. For example #define _LOCALPART /mydisk would set the name of the local partition to /mydisk.
The creation of the /var/cache/afs partition is conditional on this being defined, but it's defined for all DICE Linux machines, like it or not.

More detail

Servers are expected to include dice/options/server.h instead of dice/options/desktop.h. In contrast to the latter, dice/options/server.h does not impose any DICE partitioning scheme. Servers therefore largely use the LCFG-level disk partitioning default settings.

Most of the default disk partition configuration resources are in lcfg/defaults/fstab.h. This is included via the dice/os/ header in the machine's own LCFG file. (The dice/os/ file includes dice/defaults.h which includes ed/defaults.h which includes lcfg/defaults.h which includes lcfg/defaults/fstab.h.)

-- ChrisCooke - 18 Feb 2008

Edit | Attach | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 18 Feb 2008 - 15:24:37 - ChrisCooke
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies