What is the difference between “local” and “local-lvm” on Proxmox VE (PVE)? Which to use? Why use local/local-lvm?

By default, after installation, PVE is configured with local and local-lvm storage locations for storing iso, vztmpl, backup, images etc.

As described on Proxmox wiki:

dir: localpath /var/lib/vzcontent iso,vztmpl,backup# default image store on LVM based installation
lvmthin: local-lvmthinpool datavgname pvecontent rootdir,images# default image store on ZFS based installation
zfspool: local-zfspool rpool/datasparsecontent images,rootdir

local

The path is /var/lib/vz
Note: vz is a folder

Available in PVE web gui as local

This is actually an folder on the filsystem which the PVE is installed on

local-lvm

The path is /dev/pve/data
Note: data is a file

Available in PVE web gui as local-lvm

This is actually a lvm-thin volume (lvm-thin volume is like a virtual disk in Windows e.g. VHD or VHDX in thin mode)

We can configure it to have 500GB of storage, though in fact it only takes the size of actual data it contains

Which one to use?

If we have dedicate data disk or NFS, it probably does not matter much.

If we do not have dedicated data disk or NFS and we are going to use the drive which PVE is installed on for our Containers (CT) and VMs, then here is the tips

If PVE is installed on EXT4 filesystem which does not have snapshot ability like ZFS etc. but we still want to use snapshot features from PVE for those VMs, use lvm-thin

If we have installed PVE on ZFS then this does not matter much as ZFS has built-in snapshot features and PVE supports that.

Other differences?

Since local is a folder on the filesystem, we can easily access it

local-lvm is a LVM volume just like VHD and VHDX, so there will be an extra mounting step before we can use/read/write the volume

If we hook the same hard drive on other devices to read/write data, to visualize the differences, the steps will be

local: 1.Connect the physical hard drive -> 2.Mount the physical hard drive -> 3.Begin to use

local-lvm: 1.Connect the physical hard drive -> 2.Mount the physical hard drive -> 3.Mount the LVM volume -> 4.Begin to use

Leave a Reply