Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP XC System Software: XC Installation Guide > Appendix E Customizing Client Node Disks

Dynamically Configuring Client Node Disks

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Dynamic disk configuration identifies the actual client disk device type and size during the actual autoinstallation operation based on a list of possible disk architectures supported within an HP XC configuration. This method provides an alternative to attempting to predefine a static client disk configuration based on the golden client (head) node. Configuring disks dynamically avoids issues encountered when the golden client node disk configuration differs from the client disk configuration.

You also have the flexibility to configure client node disks on a per-image and per-node basis and to create an optional scratch partition. Partition sizes can be fixed or can be based on a percentage of total disk size. You can set the appropriate variables in the /opt/hptc/systemimager/etc/make_partitions.sh file or in user-defined files with a .part extension.

This section addresses the following topics:

Component Files Required for Dynamic Configuration of Client Node Disks

Dynamic disk configuration uses dynamic logic embedded in the component files described in this section; these files are simple shell scripts.

Each component file is responsible for a portion of the client disk configuration during the imaging installation and is sourced into the master autoinstallation script when the script is created. The master autoinstallation script is created each time the cluster_config utility is run.

The component files are as follows:

  • /opt/hptc/systemimager/etc/make_partitions.sh

    Identifies the client disk type and size and creates the default partition table. You edit the variables in this file to modify the default partition sizes or swap space. Partition sizes can be based on a fixed size or as a percentage of total disk size. Read the comments in the file for more details.

  • /var/lib/systemimager/scripts/{image_name}.part or /var/lib/systemimager/scripts/{host_name}.part

    Defines partition modifications on a per-image or per-node basis. These files are user-defined. See “Example 1: Modifying Partitions Using Fixed Sizes and Defining an Additional Partition” for an example.

  • /opt/hptc/systemimager/etc/make_filesystems.sh

    Makes file systems of type ext3 and swap space on the partitions that were made by the make_partitions.sh file. No user modifications to this file are required.

  • /opt/hptc/systemimager/etc/make_fstab.sh

    Creates a client disk device-specific /etc/fstab file on the client node. No user modifications to this file are required.

  • /opt/hptc/systemimager/etc/make_umount.sh

    Unmounts the file systems that were created and mounted in the make_filesystems.sh file. File systems are unmounted before the reboot of the client node, signalling the completion of the autoinstallation imaging operation.

Each component file is a protected configuration file with respect to an RPM upgrade of the package that delivers these files. What this means is that any customizations made to these files will be preserved if the package delivering these files is upgraded through an rpm -U operation. Each customized file is saved to an .rpmsave file extension so that the original file and associated customizations are preserved when new versions of the file are delivered.

Example 1: Modifying Partitions Using Fixed Sizes and Defining an Additional Partition

This example applies fixed sizes to modify the default partition sizes on all compute nodes and creates an additional /scratch partition on each compute node.

The user-defined .part files allow partition modifications to be done on a per-image or per-node basis.

  1. Use the text editor of your choice to create the following file to define the partition format for compute nodes:

    /var/lib/systemimager/scripts/compute.part

    The file name must contain the .part suffix. The remainder of the file name can be anything you want.

  2. Add the following lines to the file to create partition sizes based on a fixed size in megabytes. If you specify the TMP_SIZE variable, another partition is created for temporary scratch files.

    BOOT_SIZE="200"
    ROOT_SIZE="6000"
    VAR_SIZE="7500"
    TMP_SIZE="9000"

    The additional partition is mounted as /tmp by default.

    NOTE: Use the following variables instead to calculate partition sizes based on a percentage of disk size:

    BOOT_PERCENTAGE= ROOT_PERCENTAGE= VAR_PERCENTAGE= TMP_PERCENTAGE=

    The actual size of the partition is based on the size of the disk minus any fixed-size partitions multiplied by the partition percentage. For each partition, you must specify either a _SIZE or a _PERCENTAGE variable, but not both. In the following example, TMP_PERCENTAGE="1" represents 100% of remaining disk space.

    BOOT_SIZE="200"
    ROOT_SIZE="6000"
    VAR_SIZE="7500"
    TMP_PERCENTAGE="1"
  3. To override the name of the /tmp partition, add the TMP_NAME variable and set it to something other than /tmp:

    TMP_NAME="/scratch"

    The /tmp directory still exists, but it remains part of the root partition.

  4. Save the changes to the file and exit the text editor.

  5. Identify the node names of the compute nodes:

    # shownode roles --role compute
    n[4-156]
  6. Create a symbolic link from the node names of the compute nodes to the newly created compute.part file. The node name is appended with a .part extension:

    for i in 'expand_nodes n[4-156]'
    do
    ln -sf compute.part $i.part
    done
  7. Do one of the following to install and image the client nodes:

    • If the client nodes were not previously installed with the HP XC System Software, see “Task 12: Run the startsys Utility to Start the System and Propagate the Golden Image” to continue the initial installation procedure.

    • If the client nodes were previously installed, issue the following sequence of commands to set the nodes to network boot and reboot the client nodes (wait until the stopsys command completes before invoking the startsys command):

      # setnode --resync n[4-156]
      # stopsys n[4-156]
      # startsys --image_and_boot n[4-156]

Example 2: Changing Default Partition Sizes and Swap Space for All Client Nodes

This example modifies the default partition sizes and the available swap space for all client nodes. The size of the / (root) partition is increased to 70 percent of available disk space (after accounting for swap space), the /var partition is decreased to 29 percent of available disk space (after accounting for swap space), and the amount of swap space is changed to be 1.5 times the amount of physical memory.

  1. Use the text editor of your choice to open the /opt/hptc/systemimager/etc/make_partitions.sh file and search for the following:

    BOOT_SIZE="300
  2. Add a pound sign (#) to comment out the line:

    # BOOT_SIZE="300
  3. Search for the block of text that is similar to this:

    #BOOT_PERCENTAGE=" "
    ROOT_PERCENTAGE=".60"
    VAR_PERCENTAGE=".40"

  4. Make the following changes to alter the partition sizes as a percentage of the available disk space. Remember to uncomment and set the BOOT_PERCENTAGE.

    BOOT_PERCENTAGE=".01"
    ROOT_PERCENTAGE=".70"
    VAR_PERCENTAGE=".29"

  5. Search for the block of text that is similar to this:

    # Configure swap space as a percentage of memory. Default is 1X.
    # At the MINIMUM, we need 4GB of swap space for 'tmpfs' staging
    # for future multicast (flamethrower) imaging.  However, 6GB is
    # recommended, since the size of the image is likely to grow over time.
    
    SWAP_MIN="6144"
    #
    # The maximum swap size we'll configure, regardless of memory size
    #
    SWAP_MAX="16384"
    #
    # The percentage of memory we'll configure as swap space
    # Default is 1 (100%).
    #
    MEM_PERCENTAGE="1"

  6. Change the MEM_PERCENTAGE variable to 1.5 to create a swap partition that is 1.5 times the size of physical memory. This will only be effective if the physical memory size is greater than 6 GB and less than 16 GB because swap partition size is bounded by these limits.

    MEM_PERCENTAGE="1.5"

  7. Save the changes to the file and exit the text editor.

  8. Run the cluster_config utility, choosing the default answers, to create a new master autoinstallation script (/var/lib/systemimager/scripts/base_image.master.0) and generate an updated version of the golden image:

    # /opt/hptc/config/sbin/cluster_config

  9. After the cluster_config utility completes its processing, the client nodes are ready to be installed. Do one of the following:

Example 3: Customizing Partition Sizes on a Group of Client Nodes

The procedure described in this example increases the size of the /var partition only on the login nodes and retains the default partition sizes on the compute-only nodes. In this example, the newly created copy of the master autoinstallation script (base_image.master.0) is modified rather than the make_partitions.sh file described in “Example 2: Changing Default Partition Sizes and Swap Space for All Client Nodes”; it is simpler to do it this way. The base_image.master.0 file is not created until the cluster_config utility is run as described in “Task 7: Run the cluster_config Utility to Configure the System”.

NOTE: If you rerun the cluster_config utility at any time, the symbolic links revert to point to the base_image.master.0 file, and you must re-create the links.
  1. Begin this procedure as the root user on the head node

  2. Change to the /var/lib/systemimager/scripts directory, and make a copy of the base_image.master.0 file:

    # cd /var/lib/systemimager/scripts
    # cp base_image.master.0 login.master.0

  3. Use the text editor of your choice to open the /var/lib/systemimager/scripts/login.master.0 file and search for the following:

    BOOT_SIZE="300
  4. Add a pound sign (#) to comment out the line:

    # BOOT_SIZE="300
  5. Search for the block of text that is similar to this:

    # BOOT_PERCENTAGE=" "
    ROOT_PERCENTAGE=".60"
    VAR_PERCENTAGE=".39"

  6. Increase the size of the /var file system to be 50 percent of the available disk space (after accounting for swap space), and decrease the size of the / partition accordingly. Remember to uncomment and add a value to BOOT_PERCENTAGE:

    BOOT_PERCENTAGE=".01"
    ROOT_PERCENTAGE=".49"
    VAR_PERCENTAGE=".50"

  7. Save the changes to the file and exit the text editor.

  8. Identify the node names of the login nodes:

    # shownode servers lvs
    n[135-136]

  9. Create a symbolic link from the node names of the login nodes to the newly created master autoinstallation script. Note that the node name is appended with a .sh extension:

    for i in n135 n136
    do
    ln -sf login.master.0 $i.sh
    done

  10. Do one of the following to install the client nodes:

    • If the client nodes were not previously installed with the HP XC System Software, see “Task 12: Run the startsys Utility to Start the System and Propagate the Golden Image” to continue the initial installation procedure.

    • If the client nodes were previously installed, issue the following sequence of commands to set the nodes to network boot and reboot the client nodes (wait until the stopsys command completes before invoking the startsys command):

      # setnode --resync n[135-136]
      # stopsys n[135-136]
      # startsys --image_and_boot n[135-136]

Example 4: Customizing Partition Sizes to Maximize File System Performance

This example describes how to configure a set of compute nodes to maximize file system performance and create a large /scratch partition for computational work. All of the options described in this section will take effect the next time the system is imaged.

  1. Use the text editor of your choice to create the following file to define the partition format for compute nodes:

    /var/lib/systemimager/scripts/compute.part

    The file name must contain the .part suffix. The remainder of the file name can be anything you want.

  2. Add the following lines to the file to minimize the required XC partitions and create a /scratch partition equal to the remaining disk:

    BOOT_SIZE="150"
    ROOT_SIZE="5000"
    VAR_SIZE="6000"
    TMP_PERCENTAGE=".99"
    TMP_NAME="/scratch"
    NOTE: This allocates 150 MB to /boot, 5000 MB to / (root), 6000 MB to /var, 6144 MB to a swap partition, and the remainder of the disk to a /scratch partition.
  3. Save the changes to the file and exit the text editor.

  4. Create links to all nodes you want to image with these partition sizes. For example, to partition node n7 with these partition sizes, enter the following command, appending .part to the node name:

    # cd /var/lib/systemimager/scripts
    # ln -s compute.part n7.part
  5. If the node has two disks, you can also configure the node with software RAID0 (striping) for maximum file system throughput. To do this, edit the /etc/systemimager/systemimager.conf file, and the following line to the end of the file:

    SOFTWARE_RAID0_NODES = n[5,7-9]

    Then, rerun the /opt/hptc/config/sbin/cluster_config utility, which configures nodes n5, n7, n8 and n9 with software RAID0 when they are reimaged.

    NOTE: With software RAID, the Linux boot loader requires the /boot partition to be mirrored (RAID1).

    In addition, the swap partitions are not raided (with striping) because the operating system stripes them automatically.

  6. Do one of the following to install and image the node or nodes:

    • If the node or nodes were not previously installed with the HP XC System Software, see “Task 12: Run the startsys Utility to Start the System and Propagate the Golden Image” to continue the initial installation procedure.

    • If the node or nodes were previously installed, issue the following sequence of commands to set the node or nodes to network boot and reboot (wait until the stopsys command completes before invoking the startsys command):

      # setnode --resync n7
      # stopsys n7
      # startsys --image_and_boot n7

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2003–2007 Hewlett-Packard Development Company, L.P.