* [linux-lvm] can't remove snapshot @ 2019-04-09 13:00 Lentes, Bernd 2019-04-09 13:24 ` Zdenek Kabelac 0 siblings, 1 reply; 10+ messages in thread From: Lentes, Bernd @ 2019-04-09 13:00 UTC (permalink / raw) To: LVM Mailingliste, (RedHat) Hello list, I have a two-node HA-cluster which uses local and cluster LVM. cLVM is currently stopped, I try to remove a snapshot from the root lv which is located on a local VG. I get this error: ha-idg-2:/mnt/spp # lvremove -fv vg_local/lv_snap_pre_sp4 connect() failed on local socket: No such file or directory Internal cluster locking initialisation failed. WARNING: Falling back to local file-based locking. Volume Groups with the clustered attribute will be inaccessible. Archiving volume group "vg_local" metadata (seqno 26). Removing snapshot volume vg_local/lv_snap_pre_sp4. Loading table for vg_local-lv_root (254:8). device-mapper: reload ioctl on (254:8) failed: Invalid argument Failed to refresh lv_root without snapshot. dmesg says: device-mapper: ioctl: can't change device type after initial table load My LV's: ... --- Logical volume --- LV Path /dev/vg_local/lv_root LV Name lv_root VG Name vg_local LV UUID t79QZ8-0zYm-Qrwd-di2B-BMOb-pN1g-LssjEF LV Write Access read/write LV Creation host, time ha-idg-2, 2018-08-06 16:52:56 +0200 LV snapshot status source of lv_snap_pre_sp4 [active] LV Status available # open 1 LV Size 100.00 GiB Current LE 3200 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 1024 Block device 254:8 --- Logical volume --- LV Path /dev/vg_local/lv_snap_pre_sp4 LV Name lv_snap_pre_sp4 VG Name vg_local LV UUID RANlNE-Yz9O-BICs-XXWf-DNtF-d1kQ-Covks3 LV Write Access read/write LV Creation host, time ha-idg-2, 2019-01-15 11:05:44 +0100 LV snapshot status active destination for lv_root LV Status available # open 0 LV Size 100.00 GiB Current LE 3200 COW-table size 50.00 GiB COW-table LE 1600 Allocated to snapshot 12.04% Snapshot chunk size 4.00 KiB Segments 1 Allocation inherit Read ahead sectors auto - currently set to 1024 Block device 254:10 I never experienced this before and don't have any clue what's going wrong. Help is much appreciated. Many thanks. Bernd -- Bernd Lentes Systemadministration Institut für Entwicklungsgenetik Gebäude 35.34 - Raum 208 HelmholtzZentrum münchen bernd.lentes@helmholtz-muenchen.de phone: +49 89 3187 1241 phone: +49 89 3187 3827 fax: +49 89 3187 2294 http://www.helmholtz-muenchen.de/idg wer Fehler macht kann etwas lernen wer nichts macht kann auch nichts lernen Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Stellv. Aufsichtsratsvorsitzender: MinDirig. Dr. Manfred Wolter Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Heinrich Bassler, Kerstin Guenther Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't remove snapshot 2019-04-09 13:00 [linux-lvm] can't remove snapshot Lentes, Bernd @ 2019-04-09 13:24 ` Zdenek Kabelac 2019-04-09 13:33 ` Lentes, Bernd 2019-04-10 13:36 ` Lentes, Bernd 0 siblings, 2 replies; 10+ messages in thread From: Zdenek Kabelac @ 2019-04-09 13:24 UTC (permalink / raw) To: LVM general discussion and development, Lentes, Bernd Dne 09. 04. 19 v 15:00 Lentes, Bernd napsal(a): > Hello list, > > I have a two-node HA-cluster which uses local and cluster LVM. > cLVM is currently stopped, I try to remove a snapshot from the root lv which > is located on a local VG. > I get this error: > ha-idg-2:/mnt/spp # lvremove -fv vg_local/lv_snap_pre_sp4 > connect() failed on local socket: No such file or directory > Internal cluster locking initialisation failed. > WARNING: Falling back to local file-based locking. > Volume Groups with the clustered attribute will be inaccessible. > Archiving volume group "vg_local" metadata (seqno 26). > Removing snapshot volume vg_local/lv_snap_pre_sp4. > Loading table for vg_local-lv_root (254:8). > device-mapper: reload ioctl on (254:8) failed: Invalid argument > Failed to refresh lv_root without snapshot. > Hi Have you tried to converted clustered VG to be a non-clustered one ? And use file locking to proceed with operation on local device? Zdenek ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't remove snapshot 2019-04-09 13:24 ` Zdenek Kabelac @ 2019-04-09 13:33 ` Lentes, Bernd 2019-04-10 13:36 ` Lentes, Bernd 1 sibling, 0 replies; 10+ messages in thread From: Lentes, Bernd @ 2019-04-09 13:33 UTC (permalink / raw) To: Zdenek Kabelac; +Cc: LVM Mailingliste, (RedHat) ----- On Apr 9, 2019, at 3:24 PM, Zdenek Kabelac zdenek.kabelac@gmail.com wrote: > Dne 09. 04. 19 v 15:00 Lentes, Bernd napsal(a): >> Hello list, >> >> I have a two-node HA-cluster which uses local and cluster LVM. >> cLVM is currently stopped, I try to remove a snapshot from the root lv which >> is located on a local VG. >> I get this error: >> ha-idg-2:/mnt/spp # lvremove -fv vg_local/lv_snap_pre_sp4 >> connect() failed on local socket: No such file or directory >> Internal cluster locking initialisation failed. >> WARNING: Falling back to local file-based locking. >> Volume Groups with the clustered attribute will be inaccessible. >> Archiving volume group "vg_local" metadata (seqno 26). >> Removing snapshot volume vg_local/lv_snap_pre_sp4. >> Loading table for vg_local-lv_root (254:8). >> device-mapper: reload ioctl on (254:8) failed: Invalid argument >> Failed to refresh lv_root without snapshot. >> > > Hi > > Have you tried to converted clustered VG to be a non-clustered one ? No. What would be the reason to do this ? > And use file locking to proceed with operation on local device? No. How can i do that ? Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Stellv. Aufsichtsratsvorsitzender: MinDirig. Dr. Manfred Wolter Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Heinrich Bassler, Kerstin Guenther Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't remove snapshot 2019-04-09 13:24 ` Zdenek Kabelac 2019-04-09 13:33 ` Lentes, Bernd @ 2019-04-10 13:36 ` Lentes, Bernd 2019-04-11 11:09 ` Zdenek Kabelac 1 sibling, 1 reply; 10+ messages in thread From: Lentes, Bernd @ 2019-04-10 13:36 UTC (permalink / raw) To: LVM Mailingliste, (RedHat); +Cc: Zdenek Kabelac ----- Am 9. Apr 2019 um 15:24 schrieb Zdenek Kabelac zdenek.kabelac@gmail.com: > Dne 09. 04. 19 v 15:00 Lentes, Bernd napsal(a): >> Hello list, >> >> I have a two-node HA-cluster which uses local and cluster LVM. >> cLVM is currently stopped, I try to remove a snapshot from the root lv which >> is located on a local VG. >> I get this error: >> ha-idg-2:/mnt/spp # lvremove -fv vg_local/lv_snap_pre_sp4 >> connect() failed on local socket: No such file or directory >> Internal cluster locking initialisation failed. >> WARNING: Falling back to local file-based locking. >> Volume Groups with the clustered attribute will be inaccessible. >> Archiving volume group "vg_local" metadata (seqno 26). >> Removing snapshot volume vg_local/lv_snap_pre_sp4. >> Loading table for vg_local-lv_root (254:8). >> device-mapper: reload ioctl on (254:8) failed: Invalid argument >> Failed to refresh lv_root without snapshot. >> > > Hi > > Have you tried to converted clustered VG to be a non-clustered one ? > And use file locking to proceed with operation on local device? > > Zdenek Hi, i tried all i found on the net. Stopping udev before lvremove, dmsetup remove before, lock the device with lockdev, tried to deactivate the snapshot before removing (which didn't work because then i also had to deactivate the root lv which is the source for the snapshot), stopped monitoring the snapshot, update of the complete system ... nothing succeeded. I have a SLES 12 SP4 with 4.12.14-95.13-default and lvm2-2.02.180-9.7.1.x86_64. I finally did a strace on the program: ... write(2, "Loading table for vg_local-lv_ro"..., 43Loading table for vg_local-lv_root (254:9).) = 43 write(2, "\n", 1 ) = 1 ioctl(3, DM_TABLE_STATUS, 0x563eacb00c80) = 0 ioctl(3, DM_TABLE_LOAD, 0x563eacb00c80) = -1 EINVAL (Invalid argument) <======================================================== write(2, " ", 2 ) = 2 write(2, "device-mapper: reload ioctl on "..., 64device-mapper: reload ioctl on (254:9) failed: Invalid argument) = 64 write(2, "\n", 1 ) = 1 brk(0x563eacf92000) = 0x563eacf92000 write(2, " ", 2 ) = 2 write(2, "Failed to refresh lv_root withou"..., 43Failed to refresh lv_root without snapshot.) = 43 write(2, "\n", 1 ) = 1 This seems to be the culprit: ioctl(3, DM_TABLE_LOAD, 0x563eacb00c80) = -1 EINVAL fd 3 seems to be /dev/mapper/control. DM_TABLE_LOAD is defined in include/uapi/linux/dm-ioctl.h: #define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl) And the memory adress is the same as the one used successfully one line before. Error -1 is, following man: EINVAL: request or argp is not valid In the manpage sys/ioctl.h is mentioned, but i don't find it in my sources. Any ideas ? Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Stellv. Aufsichtsratsvorsitzender: MinDirig. Dr. Manfred Wolter Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Heinrich Bassler, Kerstin Guenther Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't remove snapshot 2019-04-10 13:36 ` Lentes, Bernd @ 2019-04-11 11:09 ` Zdenek Kabelac 2019-04-11 12:32 ` Lentes, Bernd 0 siblings, 1 reply; 10+ messages in thread From: Zdenek Kabelac @ 2019-04-11 11:09 UTC (permalink / raw) To: LVM general discussion and development, Lentes, Bernd Dne 10. 04. 19 v 15:36 Lentes, Bernd napsal(a): > > ----- Am 9. Apr 2019 um 15:24 schrieb Zdenek Kabelac zdenek.kabelac@gmail.com: > >> Dne 09. 04. 19 v 15:00 Lentes, Bernd napsal(a): >>> Hello list, >>> >>> I have a two-node HA-cluster which uses local and cluster LVM. >>> cLVM is currently stopped, I try to remove a snapshot from the root lv which >>> is located on a local VG. >>> I get this error: >>> ha-idg-2:/mnt/spp # lvremove -fv vg_local/lv_snap_pre_sp4 >>> connect() failed on local socket: No such file or directory >>> Internal cluster locking initialisation failed. >>> WARNING: Falling back to local file-based locking. >>> Volume Groups with the clustered attribute will be inaccessible. >>> Archiving volume group "vg_local" metadata (seqno 26). >>> Removing snapshot volume vg_local/lv_snap_pre_sp4. >>> Loading table for vg_local-lv_root (254:8). >>> device-mapper: reload ioctl on (254:8) failed: Invalid argument >>> Failed to refresh lv_root without snapshot. >>> >> >> Hi >> >> Have you tried to converted clustered VG to be a non-clustered one ? >> And use file locking to proceed with operation on local device? >> >> Zdenek > > Hi, > > i tried all i found on the net. > Stopping udev before lvremove, dmsetup remove before, lock the device with lockdev, > tried to deactivate the snapshot before removing (which didn't work because then i also had > to deactivate the root lv which is the source for the snapshot), > stopped monitoring the snapshot, update of the complete system ... > nothing succeeded. > I have a SLES 12 SP4 with 4.12.14-95.13-default and lvm2-2.02.180-9.7.1.x86_64. > > I finally did a strace on the program: > ... > write(2, "Loading table for vg_local-lv_ro"..., 43Loading table for vg_local-lv_root (254:9).) = 43 > write(2, "\n", 1 > ) = 1 > ioctl(3, DM_TABLE_STATUS, 0x563eacb00c80) = 0 > ioctl(3, DM_TABLE_LOAD, 0x563eacb00c80) = -1 EINVAL (Invalid argument) <======================================================== > write(2, " ", 2 ) = 2 > write(2, "device-mapper: reload ioctl on "..., 64device-mapper: reload ioctl on (254:9) failed: Invalid argument) = 64 > write(2, "\n", 1 > ) = 1 > brk(0x563eacf92000) = 0x563eacf92000 > write(2, " ", 2 ) = 2 > write(2, "Failed to refresh lv_root withou"..., 43Failed to refresh lv_root without snapshot.) = 43 > write(2, "\n", 1 > ) = 1 > > This seems to be the culprit: > ioctl(3, DM_TABLE_LOAD, 0x563eacb00c80) = -1 EINVAL > > fd 3 seems to be /dev/mapper/control. DM_TABLE_LOAD is defined in include/uapi/linux/dm-ioctl.h: > #define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl) > And the memory adress is the same as the one used successfully one line before. > Error -1 is, following man: > EINVAL: request or argp is not valid > In the manpage sys/ioctl.h is mentioned, but i don't find it in my sources. > What is the related error message from kernel (IOCTL) - check and show dmesg messages. Eventually please supply 'dmsetup table' 'dmsetup status' 'dmsetup info -c' ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't remove snapshot 2019-04-11 11:09 ` Zdenek Kabelac @ 2019-04-11 12:32 ` Lentes, Bernd 2019-04-11 14:49 ` Lentes, Bernd 0 siblings, 1 reply; 10+ messages in thread From: Lentes, Bernd @ 2019-04-11 12:32 UTC (permalink / raw) To: Zdenek Kabelac; +Cc: LVM Mailingliste, (RedHat) ----- On Apr 11, 2019, at 1:09 PM, Zdenek Kabelac zkabelac@redhat.com wrote: >>>> Hello list, >>>> >>>> I have a two-node HA-cluster which uses local and cluster LVM. >>>> cLVM is currently stopped, I try to remove a snapshot from the root lv which >>>> is located on a local VG. >>>> I get this error: >>>> ha-idg-2:/mnt/spp # lvremove -fv vg_local/lv_snap_pre_sp4 >>>> connect() failed on local socket: No such file or directory >>>> Internal cluster locking initialisation failed. >>>> WARNING: Falling back to local file-based locking. >>>> Volume Groups with the clustered attribute will be inaccessible. >>>> Archiving volume group "vg_local" metadata (seqno 26). >>>> Removing snapshot volume vg_local/lv_snap_pre_sp4. >>>> Loading table for vg_local-lv_root (254:8). >>>> device-mapper: reload ioctl on (254:8) failed: Invalid argument >>>> Failed to refresh lv_root without snapshot. >>>> >>> >>> Hi >>> >>> Have you tried to converted clustered VG to be a non-clustered one ? >>> And use file locking to proceed with operation on local device? >>> >>> Zdenek >> >> Hi, >> >> i tried all i found on the net. >> Stopping udev before lvremove, dmsetup remove before, lock the device with >> lockdev, >> tried to deactivate the snapshot before removing (which didn't work because then >> i also had >> to deactivate the root lv which is the source for the snapshot), >> stopped monitoring the snapshot, update of the complete system ... >> nothing succeeded. >> I have a SLES 12 SP4 with 4.12.14-95.13-default and lvm2-2.02.180-9.7.1.x86_64. >> >> I finally did a strace on the program: >> ... >> write(2, "Loading table for vg_local-lv_ro"..., 43Loading table for >> vg_local-lv_root (254:9).) = 43 >> write(2, "\n", 1 >> ) = 1 >> ioctl(3, DM_TABLE_STATUS, 0x563eacb00c80) = 0 >> ioctl(3, DM_TABLE_LOAD, 0x563eacb00c80) = -1 EINVAL (Invalid argument) >> <======================================================== >> write(2, " ", 2 ) = 2 >> write(2, "device-mapper: reload ioctl on "..., 64device-mapper: reload ioctl on >> (254:9) failed: Invalid argument) = 64 >> write(2, "\n", 1 >> ) = 1 >> brk(0x563eacf92000) = 0x563eacf92000 >> write(2, " ", 2 ) = 2 >> write(2, "Failed to refresh lv_root withou"..., 43Failed to refresh lv_root >> without snapshot.) = 43 >> write(2, "\n", 1 >> ) = 1 >> >> This seems to be the culprit: >> ioctl(3, DM_TABLE_LOAD, 0x563eacb00c80) = -1 EINVAL >> >> fd 3 seems to be /dev/mapper/control. DM_TABLE_LOAD is defined in >> include/uapi/linux/dm-ioctl.h: >> #define DM_TABLE_LOAD _IOWR(DM_IOCTL, DM_TABLE_LOAD_CMD, struct dm_ioctl) >> And the memory adress is the same as the one used successfully one line before. >> Error -1 is, following man: >> EINVAL: request or argp is not valid >> In the manpage sys/ioctl.h is mentioned, but i don't find it in my sources. >> > > What is the related error message from kernel (IOCTL) - check and show dmesg > messages. Eventually please supply > > 'dmsetup table' > 'dmsetup status' > 'dmsetup info -c' Hi Zdenek, thanks for your support. I managed to delete the snapshot via "dmsetup remove", but in lvs and lvdisplay it still appears. And i'm still not able to remove it via lvremove: ha-idg-2:~ # lvremove -fv /dev/vg_local/lv_snap_pre_sp4 connect() failed on local socket: No such file or directory Internal cluster locking initialisation failed. WARNING: Falling back to local file-based locking. Volume Groups with the clustered attribute will be inaccessible. Archiving volume group "vg_local" metadata (seqno 26). Removing snapshot volume vg_local/lv_snap_pre_sp4. Loading table for vg_local-lv_root (254:9). device-mapper: reload ioctl on (254:9) failed: Invalid argument Failed to refresh lv_root without snapshot. dmesg: [88310.980351] device-mapper: ioctl: can't change device type after initial table load. dmsetup: ha-idg-2:~ # dmsetup -c table vg_local-lv_root-real: 0 209715200 linear 254:4 167774208 vg_local-lv_var: 0 83886080 linear 254:4 83888128 3600508b1001c5037520913a9b581d78d-part3: 0 2081866639 linear 254:0 262248448 3600508b1001c5037520913a9b581d78d-part2: 0 262144000 linear 254:0 104448 3600c0ff00012824b04af7a5201000000: 0 3738281088 multipath 1 queue_if_no_path 1 alua 2 1 service-time 0 1 2 8:32 1 1 service-time 0 1 2 8:16 1 1 3600508b1001c5037520913a9b581d78d-part1: 0 102400 linear 254:0 2048 3600c0ff00012824b04af7a5201000000-part3: 0 626951296 linear 254:1 3111329792 3600c0ff00012824b04af7a5201000000-part2: 0 999999744 linear 254:1 2111328256 vg_local-lv_tmp: 0 83886080 linear 254:4 2048 vg_local-lv_root: 0 209715200 snapshot-origin 254:8 3600c0ff00012824b04af7a5201000000-part1: 0 2111325952 linear 254:1 2048 3600508b1001c5037520913a9b581d78d: 0 2344115120 multipath 1 queue_if_no_path 0 1 1 service-time 0 1 2 8:0 1 1 ha-idg-2:~ # dmsetup -c status vg_local-lv_root-real: 0 209715200 linear vg_local-lv_var: 0 83886080 linear 3600508b1001c5037520913a9b581d78d-part3: 0 2081866639 linear 3600508b1001c5037520913a9b581d78d-part2: 0 262144000 linear 3600c0ff00012824b04af7a5201000000: 0 3738281088 multipath 2 0 1 0 2 1 A 0 1 2 8:32 A 0 0 1 E 0 1 2 8:16 A 0 0 1 3600508b1001c5037520913a9b581d78d-part1: 0 102400 linear 3600c0ff00012824b04af7a5201000000-part3: 0 626951296 linear 3600c0ff00012824b04af7a5201000000-part2: 0 999999744 linear vg_local-lv_tmp: 0 83886080 linear vg_local-lv_root: 0 209715200 snapshot-origin 3600c0ff00012824b04af7a5201000000-part1: 0 2111325952 linear 3600508b1001c5037520913a9b581d78d: 0 2344115120 multipath 2 0 0 0 1 1 A 0 1 2 8:0 A 0 0 1 ha-idg-2:~ # dmsetup -c info Name Maj Min Stat Open Targ Event UUID vg_local-lv_root-real 254 8 L--w 1 1 0 LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGt79QZ80zYmQrwddi2BBMObpN1gLssjEF-real vg_local-lv_var 254 13 L--w 1 1 0 LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGrKrEMyCOt3F1beHksmGkVybX8gjiHtCK 3600508b1001c5037520913a9b581d78d-part3 254 4 L--w 3 1 0 part3-mpath-3600508b1001c5037520913a9b581d78d 3600508b1001c5037520913a9b581d78d-part2 254 3 L--w 2 1 0 part2-mpath-3600508b1001c5037520913a9b581d78d 3600c0ff00012824b04af7a5201000000 254 1 L--w 3 1 0 mpath-3600c0ff00012824b04af7a5201000000 3600508b1001c5037520913a9b581d78d-part1 254 2 L--w 0 1 0 part1-mpath-3600508b1001c5037520913a9b581d78d 3600c0ff00012824b04af7a5201000000-part3 254 7 L--w 0 1 0 part3-mpath-3600c0ff00012824b04af7a5201000000 3600c0ff00012824b04af7a5201000000-part2 254 6 L--w 0 1 0 part2-mpath-3600c0ff00012824b04af7a5201000000 vg_local-lv_tmp 254 12 L--w 1 1 0 LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGjcHjj26T647y1Lh468NGS5GysMiYeG7v vg_local-lv_root 254 9 L--w 1 1 0 LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGt79QZ80zYmQrwddi2BBMObpN1gLssjEF 3600c0ff00012824b04af7a5201000000-part1 254 5 L--w 0 1 0 part1-mpath-3600c0ff00012824b04af7a5201000000 3600508b1001c5037520913a9b581d78d 254 0 L--w 3 1 0 mpath-3600508b1001c5037520913a9b581d78d Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Stellv. Aufsichtsratsvorsitzender: MinDirig. Dr. Manfred Wolter Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Heinrich Bassler, Kerstin Guenther Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't remove snapshot 2019-04-11 12:32 ` Lentes, Bernd @ 2019-04-11 14:49 ` Lentes, Bernd 2019-04-11 15:59 ` Zdenek Kabelac 0 siblings, 1 reply; 10+ messages in thread From: Lentes, Bernd @ 2019-04-11 14:49 UTC (permalink / raw) To: LVM Mailingliste, (RedHat); +Cc: Zdenek Kabelac ----- On Apr 11, 2019, at 2:32 PM, Bernd Lentes bernd.lentes@helmholtz-muenchen.de wrote: > ----- On Apr 11, 2019, at 1:09 PM, Zdenek Kabelac zkabelac@redhat.com wrote: > > >>>>> Hello list, >>>>> >>>>> I have a two-node HA-cluster which uses local and cluster LVM. >>>>> cLVM is currently stopped, I try to remove a snapshot from the root lv which >>>>> is located on a local VG. >>>>> I get this error: >>>>> ha-idg-2:/mnt/spp # lvremove -fv vg_local/lv_snap_pre_sp4 >>>>> connect() failed on local socket: No such file or directory >>>>> Internal cluster locking initialisation failed. >>>>> WARNING: Falling back to local file-based locking. >>>>> Volume Groups with the clustered attribute will be inaccessible. >>>>> Archiving volume group "vg_local" metadata (seqno 26). >>>>> Removing snapshot volume vg_local/lv_snap_pre_sp4. >>>>> Loading table for vg_local-lv_root (254:8). >>>>> device-mapper: reload ioctl on (254:8) failed: Invalid argument >>>>> Failed to refresh lv_root without snapshot. >>>>> >>>> >> >> What is the related error message from kernel (IOCTL) - check and show dmesg >> messages. Eventually please supply >> >> 'dmsetup table' >> 'dmsetup status' >> 'dmsetup info -c' > > Hi Zdenek, > > thanks for your support. I managed to delete the snapshot via "dmsetup remove", > but in lvs and lvdisplay it still appears. > And i'm still not able to remove it via lvremove: > > ha-idg-2:~ # lvremove -fv /dev/vg_local/lv_snap_pre_sp4 > connect() failed on local socket: No such file or directory > Internal cluster locking initialisation failed. > WARNING: Falling back to local file-based locking. > Volume Groups with the clustered attribute will be inaccessible. > Archiving volume group "vg_local" metadata (seqno 26). > Removing snapshot volume vg_local/lv_snap_pre_sp4. > Loading table for vg_local-lv_root (254:9). > device-mapper: reload ioctl on (254:9) failed: Invalid argument > Failed to refresh lv_root without snapshot. > > dmesg: > [88310.980351] device-mapper: ioctl: can't change device type after initial > table load. > > dmsetup: > ha-idg-2:~ # dmsetup -c table > vg_local-lv_root-real: 0 209715200 linear 254:4 167774208 > vg_local-lv_var: 0 83886080 linear 254:4 83888128 > 3600508b1001c5037520913a9b581d78d-part3: 0 2081866639 linear 254:0 262248448 > 3600508b1001c5037520913a9b581d78d-part2: 0 262144000 linear 254:0 104448 > 3600c0ff00012824b04af7a5201000000: 0 3738281088 multipath 1 queue_if_no_path 1 > alua 2 1 service-time 0 1 2 8:32 1 1 service-time 0 1 2 8:16 1 1 > 3600508b1001c5037520913a9b581d78d-part1: 0 102400 linear 254:0 2048 > 3600c0ff00012824b04af7a5201000000-part3: 0 626951296 linear 254:1 3111329792 > 3600c0ff00012824b04af7a5201000000-part2: 0 999999744 linear 254:1 2111328256 > vg_local-lv_tmp: 0 83886080 linear 254:4 2048 > vg_local-lv_root: 0 209715200 snapshot-origin 254:8 > 3600c0ff00012824b04af7a5201000000-part1: 0 2111325952 linear 254:1 2048 > 3600508b1001c5037520913a9b581d78d: 0 2344115120 multipath 1 queue_if_no_path 0 1 > 1 service-time 0 1 2 8:0 1 1 > > ha-idg-2:~ # dmsetup -c status > vg_local-lv_root-real: 0 209715200 linear > vg_local-lv_var: 0 83886080 linear > 3600508b1001c5037520913a9b581d78d-part3: 0 2081866639 linear > 3600508b1001c5037520913a9b581d78d-part2: 0 262144000 linear > 3600c0ff00012824b04af7a5201000000: 0 3738281088 multipath 2 0 1 0 2 1 A 0 1 2 > 8:32 A 0 0 1 E 0 1 2 8:16 A 0 0 1 > 3600508b1001c5037520913a9b581d78d-part1: 0 102400 linear > 3600c0ff00012824b04af7a5201000000-part3: 0 626951296 linear > 3600c0ff00012824b04af7a5201000000-part2: 0 999999744 linear > vg_local-lv_tmp: 0 83886080 linear > vg_local-lv_root: 0 209715200 snapshot-origin > 3600c0ff00012824b04af7a5201000000-part1: 0 2111325952 linear > 3600508b1001c5037520913a9b581d78d: 0 2344115120 multipath 2 0 0 0 1 1 A 0 1 2 > 8:0 A 0 0 1 > > ha-idg-2:~ # dmsetup -c info > Name Maj Min Stat Open Targ Event UUID > vg_local-lv_root-real 254 8 L--w 1 1 0 > LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGt79QZ80zYmQrwddi2BBMObpN1gLssjEF-real > vg_local-lv_var 254 13 L--w 1 1 0 > LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGrKrEMyCOt3F1beHksmGkVybX8gjiHtCK > 3600508b1001c5037520913a9b581d78d-part3 254 4 L--w 3 1 0 > part3-mpath-3600508b1001c5037520913a9b581d78d > 3600508b1001c5037520913a9b581d78d-part2 254 3 L--w 2 1 0 > part2-mpath-3600508b1001c5037520913a9b581d78d > 3600c0ff00012824b04af7a5201000000 254 1 L--w 3 1 0 > mpath-3600c0ff00012824b04af7a5201000000 > 3600508b1001c5037520913a9b581d78d-part1 254 2 L--w 0 1 0 > part1-mpath-3600508b1001c5037520913a9b581d78d > 3600c0ff00012824b04af7a5201000000-part3 254 7 L--w 0 1 0 > part3-mpath-3600c0ff00012824b04af7a5201000000 > 3600c0ff00012824b04af7a5201000000-part2 254 6 L--w 0 1 0 > part2-mpath-3600c0ff00012824b04af7a5201000000 > vg_local-lv_tmp 254 12 L--w 1 1 0 > LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGjcHjj26T647y1Lh468NGS5GysMiYeG7v > vg_local-lv_root 254 9 L--w 1 1 0 > LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGt79QZ80zYmQrwddi2BBMObpN1gLssjEF > 3600c0ff00012824b04af7a5201000000-part1 254 5 L--w 0 1 0 > part1-mpath-3600c0ff00012824b04af7a5201000000 > 3600508b1001c5037520913a9b581d78d 254 0 L--w 3 1 0 > mpath-3600508b1001c5037520913a9b581d78d > > Hi, some more information, maybe helpful: strace lvremove -fvvvv /dev/vg_local/lv_snap_pre_sp4 ... write(2, "#ioctl/libdm-iface.c:1857 "..., 35#ioctl/libdm-iface.c:1857 ) = 35 write(2, "dm reload (254:9) [ noopencoun"..., 56dm reload (254:9) [ noopencount flush ] [16384] (*1)) = 56 write(2, "\n", 1) = 1 ioctl(3, DM_TABLE_LOAD, 0x563c294d2c90) = -1 EINVAL (Invalid argument) <=========== write(2, "#ioctl/libdm-iface.c:1895 ", 29#ioctl/libdm-iface.c:1895 ) = 29 write(2, "device-mapper: reload ioctl on "..., 64device-mapper: reload ioctl on (254:9) failed: Invalid argument) = 64 write(2, "\n", 1) = 1 write(2, "#libdm-deptree.c:2846 ", 31#libdm-deptree.c:2846 ) = 31 write(2, "<backtrace>", 11<backtrace>) = 11 write(2, "\n", 1) = 1 write(2, "#activate/dev_manager.c:3291 "..., 38#activate/dev_manager.c:3291 ) = 38 write(2, "<backtrace>", 11<backtrace>) = 11 write(2, "\n", 1) = 1 write(2, "#activate/dev_manager.c:3346 "..., 38#activate/dev_manager.c:3346 ) = 38 write(2, "<backtrace>", 11<backtrace>) = 11 write(2, "\n", 1) = 1 write(2, "#activate/activate.c:1406 "..., 35#activate/activate.c:1406 ) = 35 write(2, "<backtrace>", 11<backtrace>) = 11 write(2, "\n", 1) = 1 Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Stellv. Aufsichtsratsvorsitzender: MinDirig. Dr. Manfred Wolter Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Heinrich Bassler, Kerstin Guenther Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't remove snapshot 2019-04-11 14:49 ` Lentes, Bernd @ 2019-04-11 15:59 ` Zdenek Kabelac 2019-04-11 17:25 ` Lentes, Bernd 0 siblings, 1 reply; 10+ messages in thread From: Zdenek Kabelac @ 2019-04-11 15:59 UTC (permalink / raw) To: LVM general discussion and development, Lentes, Bernd; +Cc: Zdenek Kabelac Dne 11. 04. 19 v 16:49 Lentes, Bernd napsal(a): > ----- On Apr 11, 2019, at 2:32 PM, Bernd Lentes bernd.lentes@helmholtz-muenchen.de wrote: > >> ----- On Apr 11, 2019, at 1:09 PM, Zdenek Kabelac zkabelac@redhat.com wrote: >> >> >>>>>> Hello list, >>>>>> >>>>>> I have a two-node HA-cluster which uses local and cluster LVM. >>>>>> cLVM is currently stopped, I try to remove a snapshot from the root lv which >>>>>> is located on a local VG. >>>>>> I get this error: >>>>>> ha-idg-2:/mnt/spp # lvremove -fv vg_local/lv_snap_pre_sp4 >>>>>> connect() failed on local socket: No such file or directory >>>>>> Internal cluster locking initialisation failed. >>>>>> WARNING: Falling back to local file-based locking. >>>>>> Volume Groups with the clustered attribute will be inaccessible. >>>>>> Archiving volume group "vg_local" metadata (seqno 26). >>>>>> Removing snapshot volume vg_local/lv_snap_pre_sp4. >>>>>> Loading table for vg_local-lv_root (254:8). >>>>>> device-mapper: reload ioctl on (254:8) failed: Invalid argument >>>>>> Failed to refresh lv_root without snapshot. >>>>>> >>>>> > > >>> >>> What is the related error message from kernel (IOCTL) - check and show dmesg >>> messages. Eventually please supply >>> >>> 'dmsetup table' >>> 'dmsetup status' >>> 'dmsetup info -c' >> >> Hi Zdenek, >> >> thanks for your support. I managed to delete the snapshot via "dmsetup remove", >> but in lvs and lvdisplay it still appears. >> And i'm still not able to remove it via lvremove: >> >> ha-idg-2:~ # lvremove -fv /dev/vg_local/lv_snap_pre_sp4 >> connect() failed on local socket: No such file or directory >> Internal cluster locking initialisation failed. >> WARNING: Falling back to local file-based locking. >> Volume Groups with the clustered attribute will be inaccessible. >> Archiving volume group "vg_local" metadata (seqno 26). >> Removing snapshot volume vg_local/lv_snap_pre_sp4. >> Loading table for vg_local-lv_root (254:9). >> device-mapper: reload ioctl on (254:9) failed: Invalid argument >> Failed to refresh lv_root without snapshot. >> >> dmesg: >> [88310.980351] device-mapper: ioctl: can't change device type after initial >> table load. >> >> dmsetup: >> ha-idg-2:~ # dmsetup -c table >> vg_local-lv_root-real: 0 209715200 linear 254:4 167774208 >> vg_local-lv_var: 0 83886080 linear 254:4 83888128 >> 3600508b1001c5037520913a9b581d78d-part3: 0 2081866639 linear 254:0 262248448 >> 3600508b1001c5037520913a9b581d78d-part2: 0 262144000 linear 254:0 104448 >> 3600c0ff00012824b04af7a5201000000: 0 3738281088 multipath 1 queue_if_no_path 1 >> alua 2 1 service-time 0 1 2 8:32 1 1 service-time 0 1 2 8:16 1 1 >> 3600508b1001c5037520913a9b581d78d-part1: 0 102400 linear 254:0 2048 >> 3600c0ff00012824b04af7a5201000000-part3: 0 626951296 linear 254:1 3111329792 >> 3600c0ff00012824b04af7a5201000000-part2: 0 999999744 linear 254:1 2111328256 >> vg_local-lv_tmp: 0 83886080 linear 254:4 2048 >> vg_local-lv_root: 0 209715200 snapshot-origin 254:8 >> 3600c0ff00012824b04af7a5201000000-part1: 0 2111325952 linear 254:1 2048 >> 3600508b1001c5037520913a9b581d78d: 0 2344115120 multipath 1 queue_if_no_path 0 1 >> 1 service-time 0 1 2 8:0 1 1 Hi So here is the reason: ioctl: can't change device type after initial table load. You already have snapshot-origin in the table - which likely is not what lvm2 would have expected - you could either try 'lvchange --refresh' to get the dm table into matching state - or reboot and start from beginning. Clearly you are not supposed to partial modify DM table targets yourself while lvm2 holds the metadata state for them - so ATM it looks like lvm2 cannot proceed with the command - as the content of DM node is different and transition is not allowed. lvm2 should probably detect the case sooner and report error about incompatible state of device for present metadata (but this will not help you to resolve the problem). So waht you can do is to probably restore to the metadata you had before you've took your snapshot and try change into this table - but looking into your current DM table - such transition might be untrivial. Is there a reason why you cannot reboot - as that's IMHO the simplest fix?? Regards Zdenek ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't remove snapshot 2019-04-11 15:59 ` Zdenek Kabelac @ 2019-04-11 17:25 ` Lentes, Bernd 2019-04-12 16:18 ` Lentes, Bernd 0 siblings, 1 reply; 10+ messages in thread From: Lentes, Bernd @ 2019-04-11 17:25 UTC (permalink / raw) To: Zdenek Kabelac; +Cc: LVM Mailingliste, (RedHat) ----- On Apr 11, 2019, at 5:59 PM, Zdenek Kabelac zkabelac@redhat.com wrote: >> >> >>>> >>>> What is the related error message from kernel (IOCTL) - check and show dmesg >>>> messages. Eventually please supply >>>> >>>> 'dmsetup table' >>>> 'dmsetup status' >>>> 'dmsetup info -c' >>> >>> Hi Zdenek, >>> >>> thanks for your support. I managed to delete the snapshot via "dmsetup remove", >>> but in lvs and lvdisplay it still appears. >>> And i'm still not able to remove it via lvremove: >>> >>> ha-idg-2:~ # lvremove -fv /dev/vg_local/lv_snap_pre_sp4 >>> connect() failed on local socket: No such file or directory >>> Internal cluster locking initialisation failed. >>> WARNING: Falling back to local file-based locking. >>> Volume Groups with the clustered attribute will be inaccessible. >>> Archiving volume group "vg_local" metadata (seqno 26). >>> Removing snapshot volume vg_local/lv_snap_pre_sp4. >>> Loading table for vg_local-lv_root (254:9). >>> device-mapper: reload ioctl on (254:9) failed: Invalid argument >>> Failed to refresh lv_root without snapshot. >>> >>> dmesg: >>> [88310.980351] device-mapper: ioctl: can't change device type after initial >>> table load. >>> >>> dmsetup: >>> ha-idg-2:~ # dmsetup -c table >>> vg_local-lv_root-real: 0 209715200 linear 254:4 167774208 >>> vg_local-lv_var: 0 83886080 linear 254:4 83888128 >>> 3600508b1001c5037520913a9b581d78d-part3: 0 2081866639 linear 254:0 262248448 >>> 3600508b1001c5037520913a9b581d78d-part2: 0 262144000 linear 254:0 104448 >>> 3600c0ff00012824b04af7a5201000000: 0 3738281088 multipath 1 queue_if_no_path 1 >>> alua 2 1 service-time 0 1 2 8:32 1 1 service-time 0 1 2 8:16 1 1 >>> 3600508b1001c5037520913a9b581d78d-part1: 0 102400 linear 254:0 2048 >>> 3600c0ff00012824b04af7a5201000000-part3: 0 626951296 linear 254:1 3111329792 >>> 3600c0ff00012824b04af7a5201000000-part2: 0 999999744 linear 254:1 2111328256 >>> vg_local-lv_tmp: 0 83886080 linear 254:4 2048 >>> vg_local-lv_root: 0 209715200 snapshot-origin 254:8 >>> 3600c0ff00012824b04af7a5201000000-part1: 0 2111325952 linear 254:1 2048 >>> 3600508b1001c5037520913a9b581d78d: 0 2344115120 multipath 1 queue_if_no_path 0 1 >>> 1 service-time 0 1 2 8:0 1 1 > > > Hi > > So here is the reason: > > ioctl: can't change device type after initial table load. > > You already have snapshot-origin in the table - which likely is not what lvm2 > would have expected - you could either try 'lvchange --refresh' to get the dm > table into matching state - or reboot and start from beginning. > > Clearly you are not supposed to partial modify DM table targets yourself while > lvm2 holds the metadata state for them - so ATM it looks like lvm2 cannot > proceed with the command - as the content of DM node is different and > transition is not allowed. > > lvm2 should probably detect the case sooner and report error about > incompatible state of device for present metadata (but this will not help > you to resolve the problem). > > So waht you can do is to probably restore to the metadata you had before > you've took your snapshot and try change into this table - but looking into > your current DM table - such transition might be untrivial. > > Is there a reason why you cannot reboot - as that's IMHO the simplest fix?? > > Regards > > Zdenek Hi Zdanek, it's just that i don't like to reboot a linux system when i have problems, i prefer to find the solution so that there is no need to reboot. Then i feel a bit as being in front of a windows system :-)). I rebooted, but problem persists: ha-idg-2:~ # lvremove -fv /dev/vg_local/lv_snap_pre_sp4 Logging initialised at Thu Apr 11 19:15:02 2019 Set umask from 0022 to 0077 lvremove connect() failed on local socket: No such file or directory lvremove Internal cluster locking initialisation failed. lvremove WARNING: Falling back to local file-based locking. lvremove Volume Groups with the clustered attribute will be inaccessible. lvremove Archiving volume group "vg_local" metadata (seqno 26). lvremove Removing snapshot volume vg_local/lv_snap_pre_sp4. lvremove Loading table for vg_local-lv_root (254:9). lvremove device-mapper: reload ioctl on (254:9) failed: Invalid argument lvremove Failed to refresh lv_root without snapshot. My current config: ha-idg-2:~ # dmsetup -vc info Name Maj Min Stat Open Targ Event UUID vg_local-lv_root-real 254 8 L--w 2 1 0 LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGt79QZ80zYmQrwddi2BBMObpN1gLssjEF-real vg_local-lv_var 254 13 L--w 1 1 0 LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGrKrEMyCOt3F1beHksmGkVybX8gjiHtCK vg_local-lv_snap_pre_sp4-cow 254 10 L--w 1 1 0 LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGRANlNEYz9OBICsXXWfDNtFd1kQCovks3-cow 3600508b1001c5037520913a9b581d78d-part3 254 4 L--w 4 1 0 part3-mpath-3600508b1001c5037520913a9b581d78d vg_local-lv_snap_pre_sp4 254 11 L--w 0 1 0 LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGRANlNEYz9OBICsXXWfDNtFd1kQCovks3 3600508b1001c5037520913a9b581d78d-part2 254 3 L--w 2 1 0 part2-mpath-3600508b1001c5037520913a9b581d78d 3600c0ff00012824b04af7a5201000000 254 1 L--w 3 1 0 mpath-3600c0ff00012824b04af7a5201000000 3600508b1001c5037520913a9b581d78d-part1 254 2 L--w 0 1 0 part1-mpath-3600508b1001c5037520913a9b581d78d 3600c0ff00012824b04af7a5201000000-part3 254 7 L--w 0 1 0 part3-mpath-3600c0ff00012824b04af7a5201000000 3600c0ff00012824b04af7a5201000000-part2 254 6 L--w 0 1 0 part2-mpath-3600c0ff00012824b04af7a5201000000 vg_local-lv_tmp 254 12 L--w 1 1 0 LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGjcHjj26T647y1Lh468NGS5GysMiYeG7v vg_local-lv_root 254 9 L--w 1 1 0 LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGt79QZ80zYmQrwddi2BBMObpN1gLssjEF 3600c0ff00012824b04af7a5201000000-part1 254 5 L--w 0 1 0 part1-mpath-3600c0ff00012824b04af7a5201000000 3600508b1001c5037520913a9b581d78d 254 0 L--w 3 1 0 mpath-3600508b1001c5037520913a9b581d78d ha-idg-2:~ # lvs Logging initialised at Thu Apr 11 19:17:58 2019 Set umask from 0022 to 0077 lvs connect() failed on local socket: No such file or directory lvs Internal cluster locking initialisation failed. lvs WARNING: Falling back to local file-based locking. lvs Volume Groups with the clustered attribute will be inaccessible. lvs Skipping clustered volume group vg_san lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert lvs lv_root vg_local owi-aos--- 100.00g lvs lv_snap_pre_sp4 vg_local swi-a-s--- 50.00g lv_root 15.12 lvs lv_tmp vg_local -wi-ao---- 40.00g lvs lv_var vg_local -wi-ao---- 40.00g output from dmesg: [ 309.203692] device-mapper: ioctl: can't change device type after initial table load. ha-idg-2:~ # dmsetup table vg_local-lv_root 0 209715200 snapshot-origin 254:8 AFAIK it seems that 254:9 (lv_root) is still snapshot-origin and lvremove can't change it to linear, right ? Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Stellv. Aufsichtsratsvorsitzender: MinDirig. Dr. Manfred Wolter Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Heinrich Bassler, Kerstin Guenther Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [linux-lvm] can't remove snapshot 2019-04-11 17:25 ` Lentes, Bernd @ 2019-04-12 16:18 ` Lentes, Bernd 0 siblings, 0 replies; 10+ messages in thread From: Lentes, Bernd @ 2019-04-12 16:18 UTC (permalink / raw) To: LVM Mailingliste, (RedHat); +Cc: Zdenek Kabelac wer nichts macht kann auch nichts lernen ----- On Apr 11, 2019, at 7:25 PM, Bernd Lentes bernd.lentes@helmholtz-muenchen.de wrote: > ----- On Apr 11, 2019, at 5:59 PM, Zdenek Kabelac zkabelac@redhat.com wrote: >> So here is the reason: >> >> ioctl: can't change device type after initial table load. >> >> You already have snapshot-origin in the table - which likely is not what lvm2 >> would have expected - you could either try 'lvchange --refresh' to get the dm >> table into matching state - or reboot and start from beginning. >> >> Clearly you are not supposed to partial modify DM table targets yourself while >> lvm2 holds the metadata state for them - so ATM it looks like lvm2 cannot >> proceed with the command - as the content of DM node is different and >> transition is not allowed. >> >> lvm2 should probably detect the case sooner and report error about >> incompatible state of device for present metadata (but this will not help >> you to resolve the problem). >> >> So waht you can do is to probably restore to the metadata you had before >> you've took your snapshot and try change into this table - but looking into >> your current DM table - such transition might be untrivial. >> >> Is there a reason why you cannot reboot - as that's IMHO the simplest fix?? >> >> Regards >> >> Zdenek > > Hi Zdanek, > > it's just that i don't like to reboot a linux system when i have problems, i > prefer to find the solution > so that there is no need to reboot. Then i feel a bit as being in front of a > windows system :-)). > > I rebooted, but problem persists: > > ha-idg-2:~ # lvremove -fv /dev/vg_local/lv_snap_pre_sp4 > Logging initialised at Thu Apr 11 19:15:02 2019 > Set umask from 0022 to 0077 > lvremove connect() failed on local socket: No such file or directory > lvremove Internal cluster locking initialisation failed. > lvremove WARNING: Falling back to local file-based locking. > lvremove Volume Groups with the clustered attribute will be inaccessible. > lvremove Archiving volume group "vg_local" metadata (seqno 26). > lvremove Removing snapshot volume vg_local/lv_snap_pre_sp4. > lvremove Loading table for vg_local-lv_root (254:9). > lvremove device-mapper: reload ioctl on (254:9) failed: Invalid argument > lvremove Failed to refresh lv_root without snapshot. > > My current config: > ha-idg-2:~ # dmsetup -vc info > Name Maj Min Stat Open Targ Event UUID > vg_local-lv_root-real 254 8 L--w 2 1 0 > LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGt79QZ80zYmQrwddi2BBMObpN1gLssjEF-real > vg_local-lv_var 254 13 L--w 1 1 0 > LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGrKrEMyCOt3F1beHksmGkVybX8gjiHtCK > vg_local-lv_snap_pre_sp4-cow 254 10 L--w 1 1 0 > LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGRANlNEYz9OBICsXXWfDNtFd1kQCovks3-cow > 3600508b1001c5037520913a9b581d78d-part3 254 4 L--w 4 1 0 > part3-mpath-3600508b1001c5037520913a9b581d78d > vg_local-lv_snap_pre_sp4 254 11 L--w 0 1 0 > LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGRANlNEYz9OBICsXXWfDNtFd1kQCovks3 > 3600508b1001c5037520913a9b581d78d-part2 254 3 L--w 2 1 0 > part2-mpath-3600508b1001c5037520913a9b581d78d > 3600c0ff00012824b04af7a5201000000 254 1 L--w 3 1 0 > mpath-3600c0ff00012824b04af7a5201000000 > 3600508b1001c5037520913a9b581d78d-part1 254 2 L--w 0 1 0 > part1-mpath-3600508b1001c5037520913a9b581d78d > 3600c0ff00012824b04af7a5201000000-part3 254 7 L--w 0 1 0 > part3-mpath-3600c0ff00012824b04af7a5201000000 > 3600c0ff00012824b04af7a5201000000-part2 254 6 L--w 0 1 0 > part2-mpath-3600c0ff00012824b04af7a5201000000 > vg_local-lv_tmp 254 12 L--w 1 1 0 > LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGjcHjj26T647y1Lh468NGS5GysMiYeG7v > vg_local-lv_root 254 9 L--w 1 1 0 > LVM-btzX70eAWIejM6K1bcQnKNmnIOYaTODGt79QZ80zYmQrwddi2BBMObpN1gLssjEF > 3600c0ff00012824b04af7a5201000000-part1 254 5 L--w 0 1 0 > part1-mpath-3600c0ff00012824b04af7a5201000000 > 3600508b1001c5037520913a9b581d78d 254 0 L--w 3 1 0 > mpath-3600508b1001c5037520913a9b581d78d > > ha-idg-2:~ # lvs > Logging initialised at Thu Apr 11 19:17:58 2019 > Set umask from 0022 to 0077 > lvs connect() failed on local socket: No such file or directory > lvs Internal cluster locking initialisation failed. > lvs WARNING: Falling back to local file-based locking. > lvs Volume Groups with the clustered attribute will be inaccessible. > lvs Skipping clustered volume group vg_san > lvs LV VG Attr LSize Pool Origin Data% Meta% Move > Log Cpy%Sync Convert > lvs lv_root vg_local owi-aos--- 100.00g > lvs lv_snap_pre_sp4 vg_local swi-a-s--- 50.00g lv_root 15.12 > lvs lv_tmp vg_local -wi-ao---- 40.00g > lvs lv_var vg_local -wi-ao---- 40.00g > > output from dmesg: > [ 309.203692] device-mapper: ioctl: can't change device type after initial > table load. > > ha-idg-2:~ # dmsetup table vg_local-lv_root > 0 209715200 snapshot-origin 254:8 > > AFAIK it seems that 254:9 (lv_root) is still snapshot-origin and lvremove > can't change it to linear, right ? > > Bernd > Hi, i finally managed it. I did a vgcfgrestore to the state just before creating the snapshot. Afterwards a reboot and now everything is fine. But how could that happen or what can i do to avoid that ? I had several snapshots. Do i have to follow an order to delete them ? I think they are all independent, aren't they ? Bernd Helmholtz Zentrum Muenchen Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Stellv. Aufsichtsratsvorsitzender: MinDirig. Dr. Manfred Wolter Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Heinrich Bassler, Kerstin Guenther Registergericht: Amtsgericht Muenchen HRB 6466 USt-IdNr: DE 129521671 ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2019-04-12 16:18 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-04-09 13:00 [linux-lvm] can't remove snapshot Lentes, Bernd 2019-04-09 13:24 ` Zdenek Kabelac 2019-04-09 13:33 ` Lentes, Bernd 2019-04-10 13:36 ` Lentes, Bernd 2019-04-11 11:09 ` Zdenek Kabelac 2019-04-11 12:32 ` Lentes, Bernd 2019-04-11 14:49 ` Lentes, Bernd 2019-04-11 15:59 ` Zdenek Kabelac 2019-04-11 17:25 ` Lentes, Bernd 2019-04-12 16:18 ` Lentes, Bernd
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).