DICE Disk Partitioning
Here's how the default disk partitioning is decided for DICE machines. Note that this is a snapshot of how things worked in August 2016; things may have changed by the time you read this, and for the canonical information you should refer to the header files in subversion.
Typically the filesystem layout for both desktops and servers is configured through the
dice/options/disk-layout.h
header this creates a layout for the primary disk (e.g. sda or vda) but leaves all others untouched.
Variables
-
DICE_DISK_DEFAULT_FS
- Controls the default filesystem type used for partitions. On SL6 it is ext3, on SL7 and beyond it is ext4.
-
FIRST_INSTALL
- If this is defined in a machine's LCFG profile, 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
).
-
DICE_LOCAL_PART
- When this is defined an additional local partition will be added to the layout which has a
free
size to use up all remaining space on the disk. Use the variable to specify the mount point, typically this is /disk/scratch
.
-
DICE_DISK_VAR_MPT
- The mount point for the "var" partition, usually this is the AFS cache partition which is mounted at
/var/cache/afs
.
You can use the following variables to control encryption (SL7 only):
-
DICE_DISK_ENCRYPT_SWAP
- If this variable is defined the contents of the swap partition will be encrypted (SL7 only).
-
DICE_DISK_ENCRYPT_TMP
- If this variable is defined the contents of the
/tmp
partition will be encrypted, note that this means all data in the partition is lost on reboot (SL7 only).
You can use the following variables to adjust the sizes of various partitions:
-
DICE_ROOTSIZE
- Define this variable to alter the size of the root partition, the default is 80Gb.
-
DICE_SMALL_MAIN_DISK
- Define this at the top of the LCFG profile for a machine with a small primary disk. Reduces
DICE_ROOTSIZE
to be 40Gb.
-
DICE_SWAPSIZE
- By default the size of the swap partition is based on the amount of RAM at install time. Define this variable if a specific size is required.
-
DICE_DISK_TMP_SIZE
- Define this variable to alter the size of the
/tmp
partition, the default is 10Gb (SL7 only).
-
DICE_DISK_AFSCACHE_SIZE
- Define this variable to alter the size of the AFS cache partition, the default is 8Gb.
-
DICE_DISK_VAR_SIZE
- Define this variable to alter the size of the "var" partition (usually AFS cache and thus
DICE_DISK_AFSCACHE_SIZE
which is 8Gb).
Desktops
A desktop machine is any machine which includes the
dice/options/desktop.h
header. In that header
DICE_LOCAL_PART
is set to
/disk/scratch
also for SL7
DICE_DISK_ENCRYPT_SWAP
and
DICE_DISK_ENCRYPT_TMP
are enabled.
A standard SL6 DICE desktop will have a partition layout which looks like:
Partition |
Mount Point |
Size |
Notes |
1 |
/ |
80Gb |
|
2 |
swap |
auto |
|
3 |
/var/cache/afs |
8Gb |
|
4 |
/disk/scratch |
free |
|
A standard SL7 DICE desktop will have a partition layout which looks like:
Partition |
Mount Point |
Size |
Notes |
1 |
/ |
80Gb |
|
2 |
bios_grub |
5Kb |
|
3 |
swap |
auto |
Encrypted |
4 |
/var/cache/afs |
8Gb |
5 |
/tmp |
10Gb |
Encrypted |
6 |
/disk/scratch |
free |
|
Note that the bios_grub partition where grub2 installs the boot loader is essential, it is not mounted though.
Servers
It is recommended that system managers define their own partition layouts to suit the requirements of the services being hosted. This needs to take into consideration issues such as local data storage needs, log files (location and quantity).
A server will include one of the
dice/options/server.h
or
dice/options/small-server.h
headers.
Note that neither of the standard server headers adds a scratch disk and on SL7 they do not enable encryption. If the
dice/options/small-server.h
is used then the root partition size is reduced to 10Gb, the AFS cache size becomes 2Gb and on SL7 the
/tmp
partition size is 1Gb.
For SL6 the default server partition layout is:
Partition |
Mount Point |
Size |
Notes |
1 |
/ |
80Gb |
|
2 |
swap |
auto |
|
3 |
/var/cache/afs |
8Gb |
|
On SL7 the default server partition layout is:
Partition |
Mount Point |
Size |
Notes |
1 |
/ |
80Gb |
|
2 |
bios_grub |
5Kb |
|
3 |
swap |
auto |
|
4 |
/var/cache/afs |
8Gb |
5 |
/tmp |
10Gb |
|
Note that the bios_grub partition where grub2 installs the boot loader is essential, it is not mounted though.
--
StephenQuinney - 02 Aug 2016