xcat-core icon indicating copy to clipboard operation
xcat-core copied to clipboard

partition script, more than one disk

Open aaronhcarr opened this issue 4 years ago • 4 comments
trafficstars

Followed the guide at https://xcat-docs.readthedocs.io/en/stable/guides/admin-guides/manage_clusters/ppc64le/diskful/customize_image/cfg_partition.html

Created a custom partition script. /install/custom/xdgpu-partition.sh

The guide doesn't mention how to specify multiple disks.

In the example, it shows instdisk="/dev/sda"

How do I tell it that I expect to use both /dev/nvme0n1 and /dev/nvme1n1?

I need to use this script to create software RAID0 on 2 nvme disks on each node.

aaronhcarr avatar Feb 14 '21 23:02 aaronhcarr

xCAT provides a mechanism for the user to pass advanced partitioning directions through to the OS install process, but the details of how to accomplish your desired partitioning are OS specific. The example script referenced in the documentation only expects a single disk to be specified via instdisk. In your script, xdgu-partition.sh, you can modify the logic to expect multiple disks to be specified via instdisk.

It might be easier to write a custom partition file rather than a custom partition script if all of your nodes have the same set of disks installed.

Here is an example of how to create a RAID0 on 2 disks using Anaconda: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-examples

To pass the information through to Anacoda (or your OS installer of choice), place the commands you need into a custom disk partition file and then associate that file with your osimage partitionfile attribute.

besawn avatar Feb 15 '21 19:02 besawn

How does instdisk expect that input though?

Is it instdisk="/dev/nvme0,/dev/nvme1", or some other format?

aaronhcarr avatar Feb 15 '21 19:02 aaronhcarr

In the example script, instdisk can only be set to a single disk. If you want it to support two disks like instdisk="/dev/nvme0,/dev/nvme1", you need to write the logic to support more than one disk into the logic of your script xdgu-partition.sh.

besawn avatar Feb 15 '21 20:02 besawn

Right. I was considering using part to create RAID.

But it's also just good to know for future reference.

I might have a storage server presenting 2 mounts. /dev/sda and /dev/sdb, where I can define both via the script, and tell it to install the OS partitions to sda, and create a /data mount to sdb.

aaronhcarr avatar Feb 15 '21 20:02 aaronhcarr