Vhtforums
AI Assistant
Add NVMe Thin Provi...
 
Notifications
Clear all

Add NVMe Thin Provisioned storage in Proxmox

1 Posts
1 Users
0 Reactions
1,544 Views
Brandon Lee
Posts: 690
Admin
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@brandon-lee)
Member
Joined: 16 years ago
[#458]

I have a blog post where I walk through how to add NVMe storage in Proxmox using a directory-based storage. You can read that post here: Proxmox add disk storage space - NVMe drive.

However, when you add your storage using directory-based storage, you need to keep in mind it isn't thin-provisioned by default. You will need to rely on thin provisioning at the file level using QCOW2 format for your VMs. However, there is another way to have thin provisioned storage for your NVMe drive and that is by creating a thin-provisioned NVMe pool using your single NVMe drive. 

Here are the steps to do this.

1. Find your NVMe drive

 

lsblk

Find your NVMe device. It will look like /dev/nvme0n1.
If it has existing partitions or filesystems, you’ll need to wipe it.

2. Wipe existing data (Make sure you have backups if needed!)

wipefs -a /dev/nvme0n1 

sgdisk --zap-all /dev/nvme0n1

3. Create the LVM thin pool

# Create your physical volume
pvcreate /dev/nvme0n1

# Create a volume group (VG) 
vgcreate nvme-vg /dev/nvme0n1

# Create a thin pool inside the VG and use all space
lvcreate -l 100%FREE -T nvme-vg/nvme-thin

4. Add it to Proxmox

  1. In the Proxmox web UI, go to: Datacenter > Storage > Add > LVM-Thin

  2. ID: nvme-thin (or whatever you want it to be)

  3. Volume group: nvme-vg

  4. Thin pool: nvme-thin

  5. Content: Disk image

  6. Save

Your LVM-thin storage should appear as soon as you save the add storage dialog box. It may have a question mark on it for a few seconds afterwards as it synchronizes and finishes setting things up. However, after that, you should be good to go to use your new thin storage. Let me know if this is what you usually use for NVMe storage or do you use ZFS?