While this isn’t directly supported by Flight Compute Solo, you can achieve what you’re wanting to do manually after your cluster has started up.
- add your EBS volume to the login node using the “Volumes” settings in the EC2 console
- log in to your cluster and mount the volume somewhere appropriate, for e.g.:
sudo mkdir /opt/data
sudo mount /dev/xvdb1 /opt/data
- a. If you have existing nodes, you’ll need to configure the mounted volume to be exported over NFS (modify the options as you see fit, or use a standard set as follows):
sudo exportfs -o "rw,no_root_squash,no_subtree_check,sync" 10.75.0.0/16:/opt/data
- b. Mount the volume on existing nodes, using
module load services/pdsh
pdsh -g compute mkdir -p /opt/data
pdsh -g compute mount login1:/opt/data /opt/data
- If you’ve not started any nodes yet (or for future nodes) you can add configuration so that this process happens automatically (i.e. when new compute nodes are booted via autoscaling to meet demand). Add a new configuration file in
/opt/clusterware/etc/cluster-nfs.d, for e.g.
With this configuration file in place, new nodes will mount
/opt/data from the login node.
If this is something you’d like to automate on a regular basis, you could consider writing a customization profile script that will perform the following during the
initialize event that happens the login node is started but before any compute nodes are joined to the cluster:
- attach your EBS volume using the
aws CLI tool
- create the mountpoint and mount the volume
- create the
cluster-nfs configuration file
You can find out about customization in the Cluster customization section of the Flight docs.