Articles in this section

How to setup LVM for use with SolusVM 2

Question:

How to setup LVM for use with SolusVM 2 ?
 

Answer:

  • Group one or more Physical Volume's into a storage pool:

# sudo vgcreate my_vg /dev/sdb1

Note: To combine multiple disks:
# sudo vgcreate my_vg /dev/sdb1 /dev/sdc1
then use vgs or vgdisplay to verify

  • Allocate space from the VG:

# sudo lvcreate -n my_lv -L 20G my_vg

Or use 100% of available space:

# sudo lvcreate -n data_lv -l 100%FREE my_vg

This creates /dev/my_vg/my_lv

  • Format the LV:

# sudo mkfs.ext4 /dev/my_vg/my_lv

  • Create a mount point, e.g. /mnt/data:

# sudo mkdir /mnt/data 
# sudo mount /dev/my_vg/my_lv /mnt/data

  • To auto-mount on reboot, add to /etc/fstab:

# /dev/my_vg/my_lv /mnt/data ext4 defaults 0 2

 

Then you can proceed with the final steps to add the created LVM inside SolusVM 2 UI.

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.