Disk Partitioning Procedures

Deciding on a partitioning schema for the compute node disks is no easier than with the master node, but it can be changed more easily.

Compute node hard disks may be remotely partitioned from the master using beofdisk. This command automates the partitioning process, allowing all compute node disks with a matching hard drive geometry (cylinders, heads, sectors) to be partitioned simultaneously.

If the compute node hard disks have not been previously partitioned, you can use beofdisk to generate default partition tables for the compute node hard disks. The default partition table allocates three partitions, as follows:

The partition table for each disk geometry is stored in the directory /etc/beowulf/fdisk on the master node, with the filename specified in nomenclature that reflects the disk type, position, and geometry. Example filenames are hda:2495:255:63, hdb:3322:255:63, and sda:2495:255:63.

The beofdisk command may also be used to read an existing partition table on a compute node hard disk, as long as that disk is properly positioned in the cluster. The command captures the partition table of the first hard disk of its type and geometry (cylinder, heads, sectors) in each position on a compute node's controller (e.g., sda or hdb). The script sequentially queries the compute nodes numbered 0 through N - 1, where N is the number of nodes currently in the cluster.

Typical Partitioning

While it is not possible to predict every configuration that might be desired, the typical procedure to partition node disks is as follows:

  1. From the master node, capture partition tables for the compute nodes:

    [root@cluster ~]# beofdisk -q
    With the -q parameter, beofdisk queries all compute nodes. For the first drive found with a specific geometry (cylinders, heads, sectors), it reads the partition table and records it in a file. If the compute node disk has no partition table, this command creates a default partition set and reports the activity to the console.

    If the partition table on the disk is empty or invalid, it is captured and recorded as described, but no default partition set is created. You must create a default partition using the beofdisk -d command; see the Section called Default Partitioning.

  2. Based on the specific geometry of each drive, write the appropriate partition table to each drive of each compute node:

    [root@cluster ~]# beofdisk -w
    This technique is useful, for example, when you boot a single compute node with a local hard disk that is already partitioned, and you want the same partitioning applied to all compute nodes. You would boot the prototypical compute node, capture its partition table, boot the remaining compute nodes, and write that prototypical partition table to all nodes.

  3. Reboot all compute nodes using the beosetup command to make the partitioning effective.

  4. If needed, update the file /etc/beowulf/fstab on the master node to record the mapping of the partitions on the compute node disks to the file systems.

Default Partitioning

To apply the recommended default partitioning to each disk of each compute node, follow these steps:

  1. Generate default partition maps to /etc/beowulf/fdisk:

    [root@cluster ~]# beofdisk -d
  2. Write the partition maps out to the nodes:

    [root@cluster ~]# beofdisk -w
  3. You must reboot the compute nodes before the new partitions are usable. Rebooting should be done using beosetup.

Generalized, User-Specified Partitions

To create a unique partition table for each disk type/position/geometry triplet, follow these steps:

  1. Remotely run the fdisk command on each compute node where the disk resides:

    [root@cluster ~]# bpsh n fdisk device
    where n is the node number or the first compute node with the drive geometry you want to partition, and device is the device you wish to partition (e.g., /dev/sda, /dev/hdb).

  2. Once you have created the partition table and written it to the disk using fdisk, capture it and write it to all disks with the same geometry using:

    [root@cluster ~]# beofdisk -w
  3. You must reboot the compute nodes before the new partitioning will be effective. Rebooting should be done using beosetup.

  4. You must then map file systems to partitions as described later in this chapter.

Unique Partitions

To generate a unique partition for a particular disk, follow these steps:

  1. Partition your disks using either default partitioning or generalized partitions as described above.

  2. From the master node, remotely run the fdisk command on the appropriate compute node to re-create a unique partition table using:

    [root@cluster ~]# bpsh n fdisk device
    where n is the compute node number for which you wish to create a unique partition table and device is the device you wish to partition (e.g., /dev/sda).

  3. You must then map file systems to partitions as described below.