NOTE: UAS is deprecated in CSM 1.5.2 and will be removed in CSM 1.6.
This procedure registers and configures a volume in UAS so that the volume can be mounted in UAIs.
See List Volumes Registered in UAS for examples of valid volume configurations. Refer to Elements of a UAI for descriptions of the volume configuration fields and values.
Note the following caveats about adding volumes to UAS:
mount_path
.
UAS cannot create a UAI if that UAI has more than one volume specified for a given mount_path
.
If multiple volumes with the same mount_path
exist in the UAS configuration all UAIs must be created using UAI classes that specify a workable subset of volumes.
A UAI created without a UAI Class under such a UAS configuration will try to use all configured volumes and creation will fail.volumename
is a string that can describe or name the volume. It must be composed of only lowercase letters, numbers, and dashes (’-’). The volumename
also must begin and end with an alphanumeric character.Waiting
until the underlying issue is resolved.cray
command) installed on the above hostcray init
command) to reach the HPE Cray EX System API Gatewaycray auth login
command)To create a volume, follow this procedure.
Use the cray
CLI to create the volume, specifying volumename
, mount_path
, and volume_description
.
Note difference between the UAS name for the volume type and the Kubernetes name for that type. Kubernetes uses camelCase
for its type names, while UAS uses lower_case_with_underscores
.
ncn-m001-cray uas admin config volumes create --mount-path <path in UAI> --volume-description '{"<volume-kind>": <k8s-volume-description>}' --volumename '<string>'
For example:
ncn-m001-cray uas admin config volumes create --mount-path /host_files/host_passwd --volume-description '{"host_path": {"path": "/etc/passwd", "type": "FileOrCreate"}}' --volumename 'my-volume-with-passwd-from-the-host-node'
The example above will create a directory /host_files
in every UAI configured to use this volume and mount the file /etc/passwd
from the host node into that directory as a file named host_passwd
.
Notice the form of the --volume-description
argument. It is a JSON string encapsulating an entire volume_description
field as shown in the JSON output in the previous section.
Perform List Volumes Registered in UAS to verify that the new volume is configured.
The new volume appears in the output of the cray uas admin config volumes list
command.