meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| vm:proxmox:storage:lvm [2023/11/26 19:07] – created niziak | vm:proxmox:storage:lvm [2025/03/06 09:49] (current) – niziak | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| * check with '' | * check with '' | ||
| * '' | * '' | ||
| + | |||
| + | |||
| + | ==== 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 '' | ||
| + | |||
| + | <code bash> | ||
| + | # create 50GB thin volume: | ||
| + | zfs create -s -V 50G hddpool/lvm | ||
| + | |||
| + | readlink / | ||
| + | ../../zd32 | ||
| + | </ | ||
| + | |||
| + | By default Proxmox adds global filter rule to lvm.conf to exclude all zvol and rbd devices | ||
| + | So add our ''/ | ||
| + | |||
| + | <file ini / | ||
| + | devices { | ||
| + | # added by pve-manager to avoid scanning ZFS zvols and Ceph rbds | ||
| + | | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | pvcreate / | ||
| + | |||
| + | vgcreate pve /dev/zd32 | ||
| + | |||
| + | # Create thin pool data volume | ||
| + | lvcreate -l 100%FREE --type thin-pool --name data pve | ||
| + | </ | ||
| + | |||
| + | And disable nodes restriction in '' | ||
| + | |||
| + | ==== growing lvm volume ==== | ||
| + | |||
| + | <code bash> | ||
| + | zfs set volsize=200GB hddpool/lvm | ||
| + | pvresize /dev/zd32 | ||
| + | pvs | ||
| + | lvresize -l 100%PVS pve/data | ||
| + | lvs | ||
| + | </ | ||