After snap migration LXD doesn't start

Hi there,

in the morning we migrate from deb package to snap, the migration ends fine and the containers works well for a couple of hours, in a revision of services lxc info command get stucked without response, the snap was “restarted” and after that we can’t use lxc
Error: Failed to connect to local LXD: Get http://unix.socket/1.0: EO

We use the lxd --debug --group lxd and have the error EROR[03-09|23:20:09] Failed to start the daemon: Failed initializing storage pool “local”: Failed to run: vgchange -ay local:

The syslog shows LVM error: Mar 9 23:25:28 LXD-Server kernel: [ 569.117212] Code: 7e 58 48 83 c6 48 85 d2 48 0f 44 fe 48 8b 33 48 85 f6 74 16 e8 91 c6 fe ff 48 89 03 48 85 c0 74 19 48 8b 40 10 5b c3 0f 1f 00 1b c6 fe ff 48 89 03 eb e8 66 0f 1f 44 00 00 31 c0 5b c3 66 90
Mar 9 23:25:29 LXD-Server kernel: [ 569.781730] vgchange[39923]: segfault at 7ffebcd74ff8 ip 00007f04517f0a90 sp 00007ffebcd74f80 error 6 in libdevmapper.so.1.02.1[7f04517d1000+55000]

Any idea?

Regards,

Hmm, I don’t think we’ve seen that particular one before.
Is that a shared VG? Do you have anything else from the host interacting with LVM?

Could you show us the output of the following commands:

lvs
vgs

Hi Stéphane,

the disk and LVM are only for the LXD.

Regards,

Hi Thomas,

root@LXD-Server:~# lvs
  LV                                                                      VG    Attr       LSize    Pool        Origin                                                                  Data%  Meta%  Move Log Cpy%Sync Convert
  LXDThinPool                                                             local twi---tz-- <126.00g                                                                                                                            
  containers_debian--test                                                 local Vwi---tz--   12.00g LXDThinPool                                                                                                                
  containers_proxy                                                        local Vwi---tz--   10.00g LXDThinPool                                                                                                                
  containers_reportes--guaymas                                            local Vwi---tz--   10.00g LXDThinPool images_8c4e87e53c024e0449003350f0b0626b124b68060b73c0a7ad9547670e00d4b3                                        
  images_8c4e87e53c024e0449003350f0b0626b124b68060b73c0a7ad9547670e00d4b3 local Vwi---tz--   10.00g LXDThinPool                                                                                                                
  images_9439da5fce94075689319557ce6fde0d584d0befe5392d20eafabcd5c4661842 local Vwi---tz--   10.00g LXDThinPool                     

root@LXD-Server:~# vgs
  VG    #PV #LV #SN Attr   VSize    VFree
  local   1   6   0 wz--n- <128.00g    0 

Regards,

Thanks please can you give output of uname -a and vgs --version.

Also, can you run vgchange -ay local as root, does it give the same error?

Hi,

root@LXD-Server:~# uname -a 
Linux LXD-Server 5.0.0-1032-azure #34-Ubuntu SMP Mon Feb 10 19:37:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

root@LXD-Server:~# vgs --version
  LVM version:     2.02.176(2) (2017-11-03)
  Library version: 1.02.145 (2017-11-03)
  Driver version:  4.39.0
  Configuration:   ./configure --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --libexecdir=${prefix}/lib/x86_64-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking --exec-prefix= --bindir=/bin --libdir=/lib/x86_64-linux-gnu --sbindir=/sbin --with-usrlibdir=/usr/lib/x86_64-linux-gnu --with-optimisation=-O2 --with-cache=internal --with-clvmd=corosync --with-cluster=internal --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --with-default-pid-dir=/run --with-default-run-dir=/run/lvm --with-default-locking-dir=/run/lock/lvm --with-thin=internal --with-thin-check=/usr/sbin/thin_check --with-thin-dump=/usr/sbin/thin_dump --with-thin-repair=/usr/sbin/thin_repair --enable-applib --enable-blkid_wiping --enable-cmdlib --enable-cmirrord --enable-dmeventd --enable-dbus-service --enable-lvmetad --enable-lvmlockd-dlm --enable-lvmlockd-sanlock --enable-lvmpolld --enable-notify-dbus --enable-pkgconfig --enable-readline --enable-udev_rules --enable-udev_sync

root@LXD-Server:~# vgchange -ay local
  Check of pool local/LXDThinPool failed (status:1). Manual repair required!
  0 logical volume(s) in volume group "local" now active

Greetings,

So that doesn’t look good, suggests there is something wrong with the underlying volume group.

It’s correct, I’m trying to use tools of LVM for check but failed too. I think we can clouse close this thread because I’m going to mount a new LXD server with a backup.

Thanks for all @tomp @stgraber