Примечание
Примечание
/etc/lvm/lvm.conf, например:
filter = [ "a|/dev/mapper/|", "a|/dev/sda.*|", "r|.*|" ]В данном примере принимаются только multipath-устройства и
/dev/sda.*, все остальные устройства отклоняются:
/dev/mapper;
/dev/sda;
# fdisk -l /dev/mapper/mpatha
Disk /dev/mapper/mpatha: 931.32 GiB, 999999995904 bytes, 1953124992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes
Disklabel type: dos
Disk identifier: 0x2221951e
Device Boot Start End Sectors Size Id Type
/dev/mapper/mpatha-part1 2048 1953124991 1953122944 931.3G 83 Linux
# pvcreate /dev/mapper/mpatha-part1
Physical volume "/dev/mapper/mpatha-part1" successfully created.
# vgcreate VG1 /dev/mapper/mpatha-part1
Volume group "VG1" successfully created
# pvs
PV VG Fmt Attr PSize PFree
/dev/mapper/mpatha-part1 VG1 lvm2 a-- 931.32g 931.32g
# pvesm lvmscan
VG1

# pvesm add lvm mpath-lvm --vgname VG1 --content images,rootdir

# pvs
PV VG Fmt Attr PSize PFree
/dev/mapper/mpatha-part1 VG1 lvm2 a-- 931.32g 931.32g
# vgs
VG #PV #LV #SN Attr VSize VFree
VG1 1 0 0 wz--n- 931.32g 931.32g
# lvcreate -L 100G -T -n vmstore VG1
Logical volume "vmstore" created.
# pvesm lvmthinscan VG1
vmstore

# pvesm add lvmthin mpath-lvmthin --thinpool vmstore --vgname VG1 --nodes pve01
