[linux-lvm] Can't remove the snap LV of root volume on multipath disk PV

Gang He GHe at suse.com
Mon Jul 1 06:31:52 UTC 2019


Hello List,

I am using lvm2-2.02.180 on SLES12SP4, I cannot remove the snap LV of root volume, which is based on multipath disk PV.
e.g. 
linux-kkay:/ # lvremove /dev/system/snap_root
  WARNING: Reading VG system from disk because lvmetad metadata is invalid.
Do you really want to remove active logical volume system/snap_root? [y/n]: y
  device-mapper: reload ioctl on  (254:3) failed: Invalid argument
  Failed to refresh root without snapshot.

But, I can remove the snap LV of data volume successfully, e.g.
linux-kkay:/ # lvremove /dev/system/data_snap
  WARNING: Reading VG system from disk because lvmetad metadata is invalid.
Do you really want to remove active logical volume system/data_snap? [y/n]: y
  Logical volume "data_snap" successfully removed

If I use the ordinary disk as PV (rather than multipath disk), I cannot encounter this problem (both snap LVs can be removed).

The disk layout is as below,
linux-kkay:/ # lsblk
NAME                       MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sda                          8:0    0   30G  0 disk
├─sda1                       8:1    0   30G  0 part
└─mpd_root                 254:0    0   30G  0 mpath
  └─mpd_root-part1         254:1    0   30G  0 part
    ├─system-root-real     254:2    0   10G  0 lvm
    │ ├─system-root        254:3    0   10G  0 lvm   /
    │ └─system-snap_root   254:5    0   10G  0 lvm
    ├─system-snap_root-cow 254:4    0    5G  0 lvm
    │ └─system-snap_root   254:5    0   10G  0 lvm
    ├─system-swap          254:6    0    2G  0 lvm   [SWAP]
    ├─system-data-real     254:8    0    4G  0 lvm
    │ ├─system-data        254:7    0    4G  0 lvm   /data
    │ └─system-data_snap   254:10   0    4G  0 lvm
    └─system-data_snap-cow 254:9    0  840M  0 lvm
      └─system-data_snap   254:10   0    4G  0 lvm
sdb                          8:16   0   30G  0 disk
├─sdb1                       8:17   0   30G  0 part
└─mpd_root                 254:0    0   30G  0 mpath
  └─mpd_root-part1         254:1    0   30G  0 part
    ├─system-root-real     254:2    0   10G  0 lvm
    │ ├─system-root        254:3    0   10G  0 lvm   /
    │ └─system-snap_root   254:5    0   10G  0 lvm
    ├─system-snap_root-cow 254:4    0    5G  0 lvm
    │ └─system-snap_root   254:5    0   10G  0 lvm
    ├─system-swap          254:6    0    2G  0 lvm   [SWAP]
    ├─system-data-real     254:8    0    4G  0 lvm
    │ ├─system-data        254:7    0    4G  0 lvm   /data
    │ └─system-data_snap   254:10   0    4G  0 lvm
    └─system-data_snap-cow 254:9    0  840M  0 lvm
      └─system-data_snap   254:10   0    4G  0 lvm

Thanks
Gang




More information about the linux-lvm mailing list