Partitioning Scenarios

This section discusses how to implement two of the most common partitioning scenarios in Scyld ClusterWare:

The Scyld beofdisk tool can read an existing partition table on a compute node. It sequentially queries compute nodes beginning with node 0. For each new type/position/geometry it finds, it looks for an existing partition table file in /etc/beowulf/fdisk. If no partition table is present, a new one is generated that uses the default scheme. For each device/drive geometry it finds, beofdisk creates a file in /etc/beowulf/fdisk/. These files can then be modified by hand. Whether modified or using the default options, the files can be written back to the hard drives.

Caution

Compute nodes with unpartitioned disks will be tagged with the error state when they are booted if the /etc/beowulf/fstab file refers to those disks.

Applying the Default Partitioning

To apply the default disk partitioning scheme (as recommended by the Scyld beofdisk tool) to the compute nodes, following these steps:

  1. Query all the hard drives on the compute nodes and write out partition table files for them that contain the suggested partitioning:

    [root@cluster ~] # beofdisk -d
    	Creating a default partition table for hda:2495:255:63
    	Creating a default partition table for hda:1222:255:63

  2. Read the partition table files, and partition the hard drives on the compute nodes so that they match:

    [root@cluster ~] # beofdisk -w

  3. To use the new partitions you created, modify the /etc/beowulf/fstab file to specify how the partitions on the compute node should be mounted. The contents of /etc/beowulf/fstab should be in the standard fstab format.

  4. To format the disk(s) on reboot, change "mkfs never" to "mkfs always" in the cluster config file /etc/beowulf/config.

  5. To try out the new partitioning, reboot the compute nodes with the following:

    [root@cluster ~] # bpctl -S all -s reboot

Caution

To prevent disks from being reformatted on subsequent reboots, change "mkfs always" back to "mkfs never" in /etc/beowulf/config after the nodes have booted.

Specifying Manual Partitioning

You can manually apply your own homogeneous partitioning scheme to the partition tables, instead of taking the suggested defaults. There are two methods for doing this:

For example, assume that your cluster has 6 compute nodes, and that all disks have 255 heads and 63 sectors (this is the most common). Nodes 0, 1, and 5 have a single IDE hard disk with 2500 cylinders. Nodes 2, 3, and 4 have a first IDE disk with 2000 cylinders, and node 4 has a SCSI disk with 5000 cylinders. This cluster could be partitioned as follows:

  1. Partition the disk on node 0:

    [root@cluster ~] # bpsh 0 fdisk /dev/hda

    Follow the steps through the standard fdisk method of partitioning the disk.

  2. Manually partition the disk on node 2 with fdisk:

    [root@cluster ~] # bpsh 2 fdisk /dev/hda

    Again, follow the steps through the standard fdisk method of partitioning the disk.

  3. Manually partition the SCSI disk on node 4 with fdisk:

    [root@cluster ~] # bpsh 4 fdisk /dev/sda

    Again, follow the steps through the standard fdisk method of partitioning the disk.

  4. Next, query the compute nodes to get all the partition table files written for their hard drives by using the command beofdisk -q .

    At this point, the 3 partition tables will be translated into text descriptions, and 3 files will be put in the directory /etc/beowulf/fdisk. The file names will be hda:2500:255:63, hda:2000:255:63, and sda:5000:255:63. These file names represent the way the compute node hard drives are currently partitioned.

    You have the option to skip the fdisk command and just edit these files manually. The danger is that there are lots of rules about what combinations of values are allowed, so it is easy to make an invalid partition table. Most of these rules are explained as comments at the top of the file.

  5. Now write out the partitioning scheme using the command beofdisk -w.

    When specifying unique partitioning for certain nodes, you must also specify a unique fstab for each node that has a unique partition table. To do this, create the file /etc/beowulf/fstab.<nodenumber>. If this file exists, the node_up script will use that as the fstab for the compute node; otherwise, it will default to /etc/beowulf/fstab. Each instance of /etc/beowulf/fstab.<nodenumber> should be in the same format as /etc/beowulf/fstab.

  6. To format the disk(s) on reboot, change "mkfs never" to "mkfs always" in the cluster config file /etc/beowulf/config.

  7. To try out the new partitioning, reboot the compute nodes with the following:

    [root@cluster ~] # bpctl -S all -s reboot

Caution

To prevent disks from being reformatted on subsequent reboots, change the "mkfs always" back to "mkfs never" in /etc/beowulf/config after the nodes have booted.