Hi,
Is it possible to mount my storage using Label instead of UUID, using maas?
so far I was able to format my device using the ff maas admin block-device format $SYSTEM_ID sda fstype=xfs label=MINIODRIVE1
but I can’t figure out how or what options is needed(checked docs/–help) to mount it using the label I’ve specified in the format.
I’ve tried the ff but it defaults to UUID maas admin block-device mount $SYSTEM_ID sda mount_point=/mnt/drive-1 mount_options="defaults,noatime"
The main source of the documentation for MAAS CLI comes from the CLI itself. However, since MAAS CLI is generated directly from the API you can also use the API documentation where is easier to navigate. Specifically, the Block device/Block devices sections.
There is also the guide about How to manage block devices that describes all the actions that can be used with block devices.
Being said that, for what I see you are formatting and mounting the storage correctly. I do not think there is any other option to mount it. Could you provide an example (CLI output, screenshot…) about what you mean about the defaulting to UUID?
hi Javier,
Good day, thanks for the doc links. I’ve checked the api for mounting and looks like only mount_options and mount_point are available. At the moment when doing the mount command
maas admin block-device mount $SYSTEM_ID sda mount_point=/mnt/drive-1 mount_options="defaults,noatime"
In case its not possible via maas-cli/api atm and before doing the mounting in cloud-init scripts, is there some kind “deploy script” like commissioning/test scripts I can use within maas?
I am afraid it is not possible to use the CLI or API to achieve what you proposed.
Mounting devices is handled in MAAS by using curtin. Actually, mount_options is not directly used by MAAS but used to replace the default values in curtin.
I do not think curtin allows to configure that option. According to the documentation of the mount command:
When entries are created in /etc/fstab , curtin will use the most reliable method available to identify each device. For regular partitions, curtin will use the UUID of the filesystem present on the partition. For special devices, such as RAID arrays, or LVM logical volumes, curtin will use their normal path in /dev.
Thus, if you are using a regular partition curtin will use UUID.