🧰 SolusVM 2.0 – Create and Manage LVM Storage on AlmaLinux 9

This guide helps you set up a Logical Volume (LV) using LVM for use in SolusVM 2.0. It’s intended for system administrators setting up a Compute Resource node where disk space will be used to provision virtual machines (KVM).


Goal

Prepare a storage device (e.g., /dev/sdb) using LVM, format and mount it, and make it available in SolusVM 2.0 > Compute Resources > Storage.


🧾 Assumptions

  • SolusVM 2.0 is installed.
  • AlmaLinux 9 (or RHEL 9/CloudLinux 9) is in use.
  • You want to use a secondary disk (e.g., /dev/sdb) for VM storage.
  • You want to mount the new volume under /var/lib/solusvm2/storage/ssd01 (adjust as needed).

🔧 Step-by-Step Instructions

Step 1: Check Available Devices

lsblk

Look for unpartitioned drives like /dev/sdb.


Step 2: Create Physical Volume

pvcreate /dev/sdb

Step 3: Create Volume Group

vgcreate solusvg /dev/sdb

solusvg is an example name – choose a descriptive name like vg_storage1.


Step 4: Create Logical Volume

lvcreate -L 500G -n lv01 solusvg
  • Replace 500G with the desired size or use -l 100%FREE to use all free space.
  • lv01 is the logical volume name.

Step 5: Format the Logical Volume

mkfs.xfs /dev/solusvg/lv01

Step 6: Mount the Volume

Create a mount point where SolusVM expects storage directories:

mkdir -p /var/lib/solusvm2/storage/ssd01

Mount the LV:

mount /dev/solusvg/lv01 /var/lib/solusvm2/storage/ssd01

Step 7: Make the Mount Persistent

Find the UUID:

blkid /dev/solusvg/lv01

Example output:

UUID="abc12345-6789-4def-1234-56789abcdef0"

Edit /etc/fstab:

nano /etc/fstab

Add:

UUID=abc12345-6789-4def-1234-56789abcdef0 /var/lib/solusvm2/storage/ssd01 xfs defaults 0 0

Then test:

mount -a

Step 8: Set Storage Path in SolusVM 2.0

  1. Login to SolusVM 2.0 Admin Panel
  2. Go to Compute Resources
  3. Select your node → Storage
  4. Click Add Storage
  5. Fill in:
    • Storage Path: /var/lib/solusvm2/storage/ssd01
    • Storage Type: Default (or Thin LVM, if you’re using LVM Thin Pools)
  6. Save.

SolusVM will now use this mounted path for provisioning VMs.


📌 Additional Commands

  • View volume group info: vgdisplay
  • View logical volume info: lvdisplay
  • Unmount a volume: umount /var/lib/solusvm2/storage/ssd01

🛡️ Safety Notes

  • Backup all data before removing or resizing LVMs.
  • Don’t use /dev/sda if it contains your OS.
  • Avoid using partitions mounted under /boot, / or /home for VM storage.

📚 Resources

Scroll to Top