How do I create and add a secondary partition to my NVMe drive?

bawjaws

New Member
Apr 27, 2023
10
0
1
I've installed Proxmox on a 1TB NVME drive, and used the advanced settings to tell the installer that I only wanted to use 256GB for Proxmox. Now I'd like to create an LVM-Thin partition on the remaining 750GB(ish) to be used for storing VM disk files.

I can't seem to find out how to do this. I can see in the GUI that I can add various forms of storage, but I can't see a way of telling it to create the storage on what remains of the NVMe.

Please can anyone point me in the right direction?
 
Please can anyone point me in the right direction?
you are looking for the following search : "linux create partition unused space"
Once you manually created partition on the remaining free space, you should be able to use GUI to create an LVM VG https://pve.proxmox.com/wiki/Logical_Volume_Manager_(LVM)

Make sure you understand the commands you run, a wrong command can wipe out your disk.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Post fdisk -l /dev/nvme0n1


fdisk -l nvme0n1
Festplatte nvme0n1: 1000 MiB, 1048576000 Bytes, 2048000 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: ECAA1B0C-F120-B44F-BB84-809DADDB6561

Gerät Anfang Ende Sektoren Größe Typ
nvme0n1p1 2048 411647 409600 200M Linux-Dateisystem


fdisk /dev/nvme0n1

n (new)
Partition Number
First Sector: (enter for default)
Last sector: +500M

t (Partition Type)
L (show Types)
43 (LVM)
w (write)

fdisk -l nvme0n1
Festplatte nvme0n1: 1000 MiB, 1048576000 Bytes, 2048000 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: gpt
Festplattenbezeichner: ECAA1B0C-F120-B44F-BB84-809DADDB6561

Gerät Anfang Ende Sektoren Größe Typ
nvme0n1p1 2048 411647 409600 200M Linux-Dateisystem
nvme0n1p2 411648 1435647 1024000 500M Linux LVM

pvcreate /dev/nvme0n1p2

vgcreate VolGroup /dev/nvme0n1p2



the rest you can do with the webgui i think, add as proxmox storage

------------------------------------------------------------------------

But maybe think about using zfs

create partition like above

zpool create rpool /dev/nvme0n1p2

Add as proxmox storage
 
Thanks guys - very helpful! I think I've succeeded in creating a ZFS pool on the partition. I take it I don't need to edit the fstab file for it to be persistent between reboots?
 
be careful, remember zfs will wearout quickly not datacenter ssd drive !

if install is new, it's better to reinstall pve,
"max root" size to 64 GB (it's the PVE/Debian OS + the iso datastore, so larger if you need store many iso )
"maxvz" will be the lvmthin datastore for VM, will be named (local-lvm)
edit: "pve-root" lvm volume need extend to use all the "maxroot" size :
lvextend -L63G /dev/pve/root ; resize2fs /dev/mapper/pve-root
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!