To ensure you start from a formatted disk, the first step is to wipe any existing partition tables and data headers. Then, you’ll proceed with the LVM steps.
Assuming your new 3TB disk is identified as /dev/sdb (you must verify this with lsblk before proceeding), here is the complete, start-to-finish list of commands.
Complete Storage Setup for /dev/sdb
These commands will wipe the disk, set up the LVM structure, split the space into a 2.5TB LVM-Thin pool for VMs, and use the remaining space for a mounted Directory store.
Phase 1: Prepare the Disk and Create the Volume Group
| Step | Command | Description |
| 1. Wipe Disk | sudo wipefs -a /dev/sdb | Clears all existing signatures (partitions, filesystems, LVM) from the disk. Double-check the device name (/dev/sdb) first! |
| 2. Create PV | sudo pvcreate /dev/sdb | Initializes the whole disk as a Physical Volume (PV) for LVM. |
| 3. Create VG | sudo vgcreate newvg /dev/sdb | Creates a Volume Group (VG) named newvg using the entire new PV. |
Phase 2: Create Logical Volumes (LV)
We now divide the space in the newvg pool.
| Step | Command | Description |
| 4. Create LVM-Thin Pool | sudo lvcreate -L 2.5T -T -n vm_thin_pool newvg | Creates the 2.5TB LVM-Thin Pool for your VM disk images. |
| 5. Create Directory LV | sudo lvcreate -l 98%FREE -n dir_store_lv newvg | Creates a standard LV using 98% of the remaining free space (approx. 500GB) for file storage. |
Phase 3: Prepare Directory Storage for Proxmox
The standard LV needs a filesystem and a permanent mount point.
| Step | Command | Description |
| 6. Format LV | sudo mkfs.xfs /dev/newvg/dir_store_lv | Formats the Directory LV with the XFS filesystem. |
| 7. Create Mount Point | sudo mkdir -p /mnt/directory_store | Creates the specific location where the LV will be accessed on the Proxmox host. |
| 8. Mount LV | sudo mount /dev/newvg/dir_store_lv /mnt/directory_store | Mounts the newly formatted LV. |
| 9. Add to Fstab | `echo “/dev/newvg/dir_store_lv /mnt/directory_store xfs defaults 0 2” | sudo tee -a /etc/fstab` |
Final Step: Configure in Proxmox GUI
After running the commands above, you must configure the storage pools in the Proxmox web interface:
- Go to Datacenter > Storage.
- Add the LVM-Thin Pool (Block Storage):
- ID:
New-VM-Storage - Volume Group:
newvg - Thinpool:
vm_thin_pool - Content: Check Disk image and Container.
- ID:
- Add the Directory Storage (File Storage):
- ID:
File-Store - Directory:
/mnt/directory_store(the mount point you created) - Content: Check ISO image, VZDump backup file, and Container template.
- ID:






Leave a Reply