biolocal:HDdiskless

From Wiki CEINGE

Jump to: navigation, search

Each diskless box can mount local disk partitions to use them as temporary repository of the running OS. This allows to increase performance and reduce the network load of the nfs mounted partitions.

The partitions defined on local HD are:

  • swap partitions
  • tmp partition

Each box should initialize the local disk according to a a pre-built configuration of the partition schema:

On each diskless node:

cat /var/local/hda.out

gives:

# partition table of /dev/hda
unit: sectors

/dev/hda1 : start=       63, size=  3919797, Id=82
/dev/hda2 : start=  3919860, size=  3919860, Id=82
/dev/hda3 : start=  7839720, size=148456665, Id= 5
/dev/hda4 : start=        0, size=        0, Id= 0
/dev/hda5 : start=  7839783, size=  9783522, Id=83

This file is used to initialize the local disk as follows:

sfdisk -f /dev/hda < /var/local/hda.out
mkswap -L swap1 /dev/hda1; mkswap -L swap2 /dev/hda2; mkfs -t ext3 /dev/hda5; e2label /dev/hda5 /tmp; 

Once the partitions are built, mount them:

swapon /dev/hda1; swapon /dev/hda2; mount /tmp
Personal tools