vledan
1 February 2021 11:02
1
Hi ,
i would like to create specific logical volume when i create a new server.
i can create specific LV and and mount in a specific mountpath in MAAS UI but i don’t find how create a logical volume and a mount this lv with maas cli , do you have example for make that
The process using the maas-cli it’s quite tedious.
Try this steps (sorry I can’t post the output now):
Get block-device id of yout hard drives:
maas $login block-devices read $system_id
(OPTIONAL) Create partition to allocate lvm:
maas $login partitions create $system_id $device_id size=$size
Create Volume Group (VG):
maas $login volume-groups create $system_id name=$name partitions=$id_partition
or
maas $login volume-groups create $system_id name=$name block_devices=$id_block-device
Create Logical Volume (LV):
maas $login volume-group create-logical-volume $system_id $vg_id name=$name size=$size
Format the LV:
maas $login block-device format $system_id $id_lv fstype=$fs
Mount the LV:
maas $login block-device mount $system_id $id_lv mount_point=$mp mount_options=$mo
Note: You can open the webui on the machine storage and see in realtime the changes of the commands.
system
Closed
8 February 2022 21:02
3
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.