meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
vm:proxmox:storage:lvm [2023/11/26 19:07] – created niziakvm:proxmox:storage:lvm [2025/03/06 09:49] (current) niziak
Line 9: Line 9:
   * check with ''pvdisplay'' that new size is correct   * check with ''pvdisplay'' that new size is correct
   * ''lvextend -l 100%FREE pve/data'' or ''lvextend -L +20G pve/data''   * ''lvextend -l 100%FREE pve/data'' or ''lvextend -L +20G pve/data''
 +
 +
 +==== local-lvm on ZFS ====
 +
 +When Proxmox cluster is used it is good to have 
 +the same storages on all nodes. It is needed for migration of LXC.
 +
 +To add ''local-lvm'' storage to ZFS based node:
 +
 +<code bash>
 +# create 50GB thin volume:
 +zfs create -s -V 50G hddpool/lvm
 +
 +readlink /dev/zvol/hddpool/lvm
 +../../zd32
 +</code>
 +
 +By default Proxmox adds global filter rule to lvm.conf to exclude all zvol and rbd devices
 +So add our ''/dev/zd32'' to accept list:
 +
 +<file ini /etc/lvm/lvm.conf>
 +devices {
 +     # added by pve-manager to avoid scanning ZFS zvols and Ceph rbds
 +     global_filter=["a|/dev/zd32|","r|/dev/zd.*|","r|/dev/rbd.*|"]
 +}
 +
 +</file>
 +
 +<code bash>
 +pvcreate /dev/zvol/hddpool/lvm
 +
 +vgcreate pve /dev/zd32
 +
 +# Create thin pool data volume
 +lvcreate -l 100%FREE --type thin-pool --name data pve
 +</code>
 +
 +And disable nodes restriction in ''Datacenter'' --> ''Storage'' --> ''local-lvm'' to have ''local-lvm'' visible on all cluster nodes.
 +
 +==== growing lvm volume ====
 +
 +<code bash>
 +zfs set volsize=200GB hddpool/lvm
 +pvresize /dev/zd32
 +pvs
 +lvresize -l 100%PVS pve/data
 +lvs
 +</code>