Reprovision a Nonpersistent Disk on an eLogin Node

Describes how to safely change a disk that is nonpersistent. Involves changing the config set then rebooting the node.

eLogin node is booted.

To reprovision a nonpersistent disk on an eLogin node, the disk must be reconfigured and the node rebooted (with either the --pxe or --staged option). To reconfigure the disk, either modify the storage profile in the CLE config set assigned to that eLogin node, or create a new storage profile in that config set and assign it to the node.

  1. Prepare configuration worksheets for editing.
    1. Generate a set of configuration worksheets with the current CLE configuration data.
      This example uses the existing CLE config set p0.
      smw# cfgset update -m prepare --no-scripts p0
      
    2. Copy the CLE worksheets to a work area for editing.
      This example makes a directory called /my/workarea. Use a suitable work area directory location to perform this step.
      smw# mkdir -p /my/workarea
      smw# cd /var/opt/cray/imps/config/sets/p0/worksheets
      smw# cp *_worksheet.yaml /my/workarea
      
    3. Change to the new work area.
      smw# cd /my/workarea
      
  2. Edit the cray_storage configuration worksheet to add or change a storage profile.
    smw# vi cray_storage_worksheet.yaml
    
  3. If changing an existing storage profile, make the desired changes to the nonpersistent disk of that profile.
    Because the disk is nonpersistent, partitions can be added, removed, resized, reordered, or have their file system type changed. Make the desired reprovisioning changes now, bearing in mind the following requirements:
    • To function properly, all eLogin nodes must have all of the following partitions with these exact labels:
      • nonpersistent disk: GRUB, BOOT, WRITELAYER, TMP, and SWAP
      • persistent disk: CRASH and PERSISTENT
    • To enable the eLogin node to boot, the partition_flags list for the GRUB partition must be set to a list containing bios_grub instead of the empty list (the default value for that field).
    • The sum of the sizes of all of the volatile data partitions on the first disk (/dev/sda) must be less than the available storage on the first disk. Similarly, the sum of the sizes of all of the persistent data partitions on the second disk (/dev/sdb) must be less than the available storage on the second disk.
    • Two partitions have the following minimum size limits:
      • BOOT must be > 1 GiB (note binary value)
      • PERSISTENT must be > 200 GiB (note binary value)

    If it is necessary to change the configuration of virtual disk sda or sdb, see Configure the eLogin RAID Virtual Disks.

    For more information about binary values, see Prefixes for Binary and Decimal Multiples.

  4. If creating a new storage profile, copy elogin_default or another storage profile, then make the desired changes to the nonpersistent disk.
    1. Copy the storage profile.
      In the worksheet, copy the default storage profile and paste it below this line.
      # NOTE: Place additional 'storage_profiles' setting entries here, if desired.
      
    2. Replace the name (key) of the copied profile with the key for the new storage profile (new_elogin in this example).
      # NOTE: Place additional 'storage_profiles' setting entries here, if desired.
       
      cray_storage.settings.storage_profiles.data.name.new_elogin: null
      cray_storage.settings.storage_profiles.data.new_elogin.enabled: true
       
      cray_storage.settings.storage_profiles.data.new_elogin.layouts.device./dev/sda: null
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partition_type: gpt
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.persist_on_boot: false
       
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.label.GRUB: null
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.GRUB.type: ext3
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.GRUB.size: 1MiB 
       ... 
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.label.BOOT: null
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.BOOT.type: ext3
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.BOOT.size: 2GiB
       ...   
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.label.WRITELAYER: null
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.WRITELAYER.type: ext4
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.WRITELAYER.size: 20GiB
       ... 
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.label.TMP: null
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.TMP.type: xfs
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.TMP.size: 256GiB
       ...  
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.label.SWAP: null
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.SWAP.type: swap
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sda.partitions.SWAP.size: 128GiB
       ...  
      
      cray_storage.settings.storage_profiles.data.new_elogin.layouts.device./dev/sdb: null
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sdb.partition_type: gpt
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sdb.persist_on_boot: true
       
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sdb.partitions.label.CRASH: null
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sdb.partitions.CRASH.type: ext4
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sdb.partitions.CRASH.size: 10GiB
       ...  
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sdb.partitions.label.PERSISTENT: null
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sdb.partitions.PERSISTENT.type: xfs
      cray_storage.settings.storage_profiles.data.new_elogin.layouts./dev/sdb.partitions.PERSISTENT.size: ALL 
       ... 
      
    3. Make the desired changes to the nonpersistent disk of this new storage profile.
      Because the disk is nonpersistent, partitions can be added, removed, resized, reodered, or have their file system type changed. Make the desired reprovisioning changes now, bearing in mind the requirements listed at the beginning of this procedure.:
  5. Upload modified cray_storage worksheet to the config set.
    smw# cfgset update -w '/my/workarea/cray_storage_worksheet.yaml' p0
    
  6. Update the CLE config set.
    smw# cfgset update p0
    
    This update runs all pre-configuration and post-configuration scripts. It is good practice to update the config set when any config services have been changed by importing worksheets.
  7. Validate the config set.
    smw# cfgset validate p0
    
  8. (Conditional) If a new storage profile was created, assign the new storage profile to the eLogin node.
    smw# enode update --set-storage_profile new_elogin elogin1
    
  9. Reboot the eLogin node.
    This example reboots an eLogin node named elogin1.
    smw# enode reboot --pxe elogin1
    
  10. Verify the changes to the storage layout.
    1. On the SMW, determine if the node is finished booting.
      In this example, the eLogin node is elogin1.
      smw# enode status elogin1
      
      The eLogin node has finished booting if its status is node_up.
    2. On the eLogin node, verify that the desired partitions exist with the expected sizes.
      elogin# df