Did I extend LVM-Thin correctly?

Dondochaka

Member
Feb 22, 2021
8
0
6
39
Basically, I borrowed these instructions from serverfault.com.
LVM physical volume to extend the default pve-data LVM logical volume and /var/lib/vz filesystem:
  • partition your device and set the LVM (8e) flag
  • create a new physical volume with pvcreate /dev/<DEVNAME>
  • extend default VG with vgextend pve /dev/<DEVNAME>
  • extend data logical volume with lvextend /dev/mapper/pve-data /dev/<DEVNAME>
  • verify your FS is clean with fsck -nv /dev/mapper/pve-data
  • resize your FS with resize2fs -F /dev/mapper/pve-data
But once I got to the fsck step I started getting errors like `ext2fs_open2: Bad magic number in super-block`. Are these steps necessary for the thin pool? There's no filesystem for it to resize, is there? It shows the correct size in the GUI.
 
Correct, thin pools don't have a file system directly on them.
However, I believe resizing this way may have only resized the data portion of the thin volume, not the metadata.
This may become a problem in the future, so you need to monitor the `Meta%` value in the `lvs` output, or extend the metadata pool proportionally (if your VG still has some space you can use `lvextend --poolmetadatasize +amount pve/data`, note that reducing the data pool now to make space for the metadata pool will likely break existing volumes, so that's not really an option)