Skip to main content

Adding Additional Storage Disks

Before

When installing PVE, you have the option to create a LVM Thin pool or a ZFS Pool, which both support Thin Provisioning and Snapshots.

In the case of the node below, it was created with a ZFS Pool which is labeled as local-zfs. This is where VM and LXC disks / mounts are stored (as well as snapshots).

image.png

  • local - This is the same as local on LVM backed installations, and where the core operating system files live
  • local-zfs - This is the equivalent to local-lvm on LVM backed installations. ZFS supports snapshotting and comes with performance enhancements, but tends to require more resources

image.png

PVE Node > Disks > Shows single disk installation

After

Two SSDs have been installed in previously empty disk bays on this PVE node

image.png

/dev/sda and /dev/sdb are newly added disks in previously empty disk bays

I have already clicked the Initialize Disk with GPT button on both of them.

Creating a ZFS Pool

I want to be able to migrate VMs and LXCs between my Proxmox VE nodes. Therefore, I'll need to ensure my storage configurations are equal between them (since I'm not using network-backed storage, like a NAS).

I am going to be following along with my documentation here: https://notes.benheater.com/books/proxmox/page/clustering-same-zfs-pool-on-all-nodes

Because, I am running a Proxmox cluster and I want to be able to migrate VMs and LXCs between them. So, I need to create identical storage conditions between them by:

  • Creating a ZFS pool with the same name and mountpoint (impossible in the GUI)
  • Then, assigning the Guest_Disks ZFS volume to map to the ZFS pool
zpool create -m /rackdrives-tmp -o ashift=12 rackdrives mirror \
/dev/disk/by-id/ata-Samsung_SSD_870_EVO_1TB_REDACTED1 \
/dev/disk/by-id/ata-Samsung_SSD_870_EVO_1TB_REDACTED2

Create the ZFS pool with the target disks on a placeholder mountpoint

Since this is a two-disk ZFS configuration, mirror works best in this scenario, as it will afford me the largest amount of available storage and offer the best performance for VMs. Look at ZFS RAID configurations if you have more than two disks.

zfs set mountpoint=/rackdrives rackdrives

Change the mountpoint from /rackdrives-tmp to /rackdrives (to match other nodes)

zfs set compression=lz4 rackdrives

Enable compression on the ZFS pool

rm -rf /rackdrives-tmp

Remove the placeholder mountpoint

Change Storage Settings in Datacenter

As shown in the documentation linked above, I need to map the Guest_Disks ZFS volume and the directories mapped to /rackdrives/ with node that was just configured with the new ZFS pool.