Create disk partitions for LVM

In IBM® Platform Cluster Manager Community Edition, to customize the disk partitioning on compute nodes, you can create a custom script to configure Logical Volume Manager (LVM) partitioning.

About this task

LVM is flexible. LVM enables the ability to dynamically increase partitions to accommodate new disks. Complete the following procedure to create disk partitions for LVM.

Procedure

  1. Create a custom script that uses the standard xCAT kickstart template. The custom script must create the /tmp/partitionfile file. For example:
    #!/bin/sh
    # lvm_example.sh
    # Use Anaconda to create and format LVM partitions
    cat << EOF > /tmp/partitionfile
    clearpart --all --drives=sda --initlabel
    part /boot --fstype ext3 --ondisk=sda --size=100 --asprimary
    part pv.00 --ondisk=sda --size=1 --grow --asprimary
    
    volgroup VolGroup00 pv.00
    logvol / --name=ROOT --fstype=ext3 --vgname=VolGroup00 --size=1024 --grow
    logvol swap --name=SWAP --vgname=VolGroup00 --size=1000 --grow --maxsize=4000
    EOF
  2. Create a stateful image profile that uses the new custom script. In the Web Portal, select the Resources tab, and go to Node Provisioning > Provisioning Templates > Image Profiles. Select an existing stateful image profile and click Modify to apply the new custom script.
  3. In the Modify Image Profile window under the General tab, for Disk Partition select the Use Customized Script option.
  4. Select the custom script file, click Browse Server File....
  5. To save the changes, click OK.

Results

Disk partitions are created on the compute nodes using the specified stateful image profile.