Home » How To Change Thin LVM to Directory Storage in Proxmox 5.x 6.x

How To Change Thin LVM to Directory Storage in Proxmox 5.x 6.x

In Proxmox 5.x-7.x LVM thin is the default local storage for VMs, However I prefer the old method of directory based storage for local storage, this article will show you How To Change Thin LVM to Directory Storage in Proxmox 5.x 6.x. You can find this information in the proxmox wiki. These are my terse notes to get the job done

To restore to old style storage like proxmox 4.2 and below. Please follow the steps below.

Change configuration settings on /etc/pve/storage.cfg

remove this line below:

dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content rootdir,images


dir: local
        path /var/lib/vz
        maxfiles 0
        content backup,iso,vztmpl,rootdir,images

Recreate /var/lib/vz

Type the following to set everything up

lvremove pve/data
lvcreate –name data -l +100%FREE pve
mkfs.ext4 /var/lib/vz


[email protected] ~ > lvs
  LV   VG   Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data pve  twi-a-tz-- 16.38g             0.00   0.49
  root pve  -wi-ao----  7.75g
  swap pve  -wi-ao----  3.88g

[email protected] ~ > lvremove pve/data
Do you really want to remove active logical volume data? [y/n]: y
  Logical volume "data" successfully removed

[email protected] ~ > lvcreate --name data -l +100%FREE pve
  Logical volume "data" created.

[email protected] ~ > mkfs.ext4 /dev/pve/data
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: done
Creating filesystem with 5307392 4k blocks and 1327104 inodes
Filesystem UUID: 310d346a-de4e-48ae-83d0-4119088af2e3
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

Edit fstab

In order for the hard drive to auto mount, make the fstab first in the file /etc/fstab

/var/lib/vz /var/lib/vz ext4 defaults 0 1

Restart proxmox host. Thats it.

Reference: Proxmox Wiki


Leave a Reply

Your email address will not be published.

1 + two =