Duplicate pv, vg, lv after copying disk
Dominic Raferd <[email protected]> Sun, 30 Mar 2025 17:28:09 +0100
| Newsgroups | gmane.linux.lvm.general |
|---|---|
| Message-ID | <[email protected]> |
My LVM is working great but lvm utilities show - only, when using -o devices, that I have multiple copies of the same pv, vg and lvs. See below, the first invocation is what I would expect (one PV 'nvme0n1p2', one VG 'vg1', four LVs 'home' 'log' 'rootfs' and 'swap') but in each case the second invocation (i.e. with -o +devices) shows multiple versions of the same thing. This may be because I copied my disk to another using clonezilla and subsequently copied the new disk back to the original using dd. I'm now only using the original disk. Although I am also seeing (not shown below) duplicate devices for a 2nd PV and VG and LVs which are on a second disk on the same machine - and this second disk was unchanged throughout the process. # pvs|grep -F nvme /dev/nvme0n1p2 vg1 lvm2 a-- <928.09g <268.09g # pvs -o +devices|grep -F nvme /dev/nvme0n1p2 vg1 lvm2 a-- <928.09g <268.09g /dev/nvme0n1p2 vg1 lvm2 a-- <928.09g <268.09g /dev/nvme0n1p2(1024) /dev/nvme0n1p2 vg1 lvm2 a-- <928.09g <268.09g /dev/nvme0n1p2(2048) /dev/nvme0n1p2 vg1 lvm2 a-- <928.09g <268.09g /dev/nvme0n1p2(78848) /dev/nvme0n1p2 vg1 lvm2 a-- <928.09g <268.09g /dev/nvme0n1p2(82944) /dev/nvme0n1p2 vg1 lvm2 a-- <928.09g <268.09g /dev/nvme0n1p2(91136) /dev/nvme0n1p2 vg1 lvm2 a-- <928.09g <268.09g /dev/nvme0n1p2 vg1 lvm2 a-- <928.09g <268.09g /dev/nvme0n1p2(173056) /dev/nvme0n1p2 vg1 lvm2 a-- <928.09g <268.09g # vgs|grep -F vg1 vg1 1 4 0 wz--n- <928.09g <268.09g # vgs -o +devices|grep -F vg1 vg1 1 4 0 wz--n- <928.09g <268.09g /dev/nvme0n1p2(1024) vg1 1 4 0 wz--n- <928.09g <268.09g /dev/nvme0n1p2(2048) vg1 1 4 0 wz--n- <928.09g <268.09g /dev/nvme0n1p2(91136) vg1 1 4 0 wz--n- <928.09g <268.09g /dev/nvme0n1p2(78848) vg1 1 4 0 wz--n- <928.09g <268.09g /dev/nvme0n1p2(173056) vg1 1 4 0 wz--n- <928.09g <268.09g /dev/nvme0n1p2(82944) # lvs|grep -F vg1 home vg1 -wi-ao---- 600.00g log vg1 -wi-ao---- 4.00g rootfs vg1 -wi-ao---- 24.00g swap vg1 -wc-ao---- 32.00g # lvs -o +devices|grep -F vg1 home vg1 -wi-ao---- 600.00g /dev/nvme0n1p2(2048) home vg1 -wi-ao---- 600.00g /dev/nvme0n1p2(91136) log vg1 -wi-ao---- 4.00g /dev/nvme0n1p2(1024) rootfs vg1 -wi-ao---- 24.00g /dev/nvme0n1p2(78848) rootfs vg1 -wi-ao---- 24.00g /dev/nvme0n1p2(173056) swap vg1 -wc-ao---- 32.00g /dev/nvme0n1p2(82944) As I say, this has not caused a problem so far, but it is certainly ugly and looks like it might cause problems in the future. Should I ignore it or any ideas how I can fix it?