To create an LVM (Logical Volume Manager) volume in Linux, you can follow these steps:
- Open the terminal and type the following command to list the available disks:
sudo fdisk -l
- Identify the disk that you want to use for the LVM volume, and create a new partition using the fdisk utility:
sudo fdisk /dev/sdX
Note: Replace “sdX” with the appropriate drive identifier for your disk, such as “sda” or “sdb”.
- In the fdisk utility, type the following command to create a new partition:
Note: You can press “d” to delete any existing partitions beforehand
- Follow the on-screen prompts to configure the new partition. When prompted for the partition type, select “Linux LVM”.
- After creating the partition, type the following command to write the changes to the disk:
- Create a new physical volume on the new partition using the following command:
sudo pvcreate /dev/sdXN
Note: Replace “sdXN” with the appropriate partition identifier for the new partition, such as “sda1” or “sdb2”.
Go ahead and repeat these steps for every disk you want to add to the volume group.
- Create a new volume group using the following command, where “myvolume” is a name you choose for the new volume group.
sudo vgcreate myvolume /dev/sdXN /dev/sdYN <keep_chaining_physical volumes_you_want_to_add>
- List your existing volume groups with:
You should see the group you just created.
- Open up Proxmox Web GUI and click on “Datacenter” > “Storage” > “Add” > “LVM”. Then select the volume group, and give your new storage volume a name (a.k.a. “ID”).
Now you have created a virtual group of physical disks that Proxmox can read as a single storage volume. Any disks you add to the group will be essentially RAID0, no redundancy with data striped across disks.
Leave a Reply