Failed to find logical volume \"raid/custom_default_data\""

Hi,

I tried upgrading from LXD 2.21, snap revision 5524, to LXD 4.9, snap revision 18775, today via “snap refresh lxd”. Now LXD fails with the error message “Failed to find logical volume “raid/custom_default_data””:

/var/snap/lxd/common/lxd/logs/lxd.log :

t=2020-12-27T01:31:24+0000 lvl=info msg="LXD 4.9 is starting in normal mode" path=/var/snap/lxd/common/lxd
t=2020-12-27T01:31:24+0000 lvl=info msg="Kernel uid/gid map:"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - u 0 0 4294967295"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - g 0 0 4294967295"
t=2020-12-27T01:31:24+0000 lvl=info msg="Configured LXD uid/gid map:"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - u 0 1000000 1000000000"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - g 0 1000000 1000000000"
t=2020-12-27T01:31:24+0000 lvl=warn msg="AppArmor support has been disabled because of lack of kernel support"
t=2020-12-27T01:31:24+0000 lvl=info msg="Kernel features:"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - closing multiple file descriptors efficiently: yes"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - netnsid-based network retrieval: yes"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - pidfds: yes"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - uevent injection: yes"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - seccomp listener: yes"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - seccomp listener continue syscalls: no"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - seccomp listener add file descriptors: no"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - attach to namespaces via pidfds: yes"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - safe native terminal allocation : yes"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - unprivileged file capabilities: yes"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - cgroup layout: hybrid"
t=2020-12-27T01:31:24+0000 lvl=warn msg=" - Couldn't find the CGroup blkio.weight, disk priority will be ignored"
t=2020-12-27T01:31:24+0000 lvl=warn msg=" - Couldn't find the CGroup CPUset controller, CPU pinning will be ignored"
t=2020-12-27T01:31:24+0000 lvl=warn msg=" - Couldn't find the CGroup hugetlb controller, hugepage limits will be ignored"
t=2020-12-27T01:31:24+0000 lvl=warn msg=" - Couldn't find the CGroup memory controller, memory limits will be ignored"
t=2020-12-27T01:31:24+0000 lvl=warn msg=" - Couldn't find the CGroup memory swap accounting, swap limits will be ignored"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - shiftfs support: disabled"
t=2020-12-27T01:31:24+0000 lvl=info msg="Initializing local database"
t=2020-12-27T01:31:24+0000 lvl=info msg="Starting /dev/lxd handler:"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - binding devlxd socket" socket=/var/snap/lxd/common/lxd/devlxd/sock
t=2020-12-27T01:31:24+0000 lvl=info msg="REST API daemon:"
t=2020-12-27T01:31:24+0000 lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket
t=2020-12-27T01:31:24+0000 lvl=info msg="Initializing global database"
t=2020-12-27T01:31:25+0000 lvl=info msg="Firewall loaded driver \"nftables\""
t=2020-12-27T01:31:25+0000 lvl=info msg="Initializing storage pools"
t=2020-12-27T01:31:25+0000 lvl=info msg="Applying patch \"storage_api_permissions\""
t=2020-12-27T01:31:26+0000 lvl=eror msg="Failed to start the daemon: Failed applying patch \"storage_api_permissions\": Failed to activate LVM logical volume \"/dev/raid/custom_default_data\": Failed to run: lvchange --activate y --ignoreactivationskip /dev/raid/custom_default_data: Failed to find logical volume \"raid/custom_default_data\""
t=2020-12-27T01:31:26+0000 lvl=info msg="Starting shutdown sequence"
t=2020-12-27T01:31:26+0000 lvl=info msg="Closing the database"
t=2020-12-27T01:31:26+0000 lvl=info msg="Stop database gateway"
t=2020-12-27T01:31:26+0000 lvl=info msg="Stopping REST API handler:"
t=2020-12-27T01:31:26+0000 lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket
t=2020-12-27T01:31:26+0000 lvl=info msg="Stopping /dev/lxd handler:"
t=2020-12-27T01:31:26+0000 lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/devlxd/sock
t=2020-12-27T01:31:26+0000 lvl=info msg="Unmounting temporary filesystems"
t=2020-12-27T01:31:26+0000 lvl=info msg="Done unmounting temporary filesystems"

Which I don’t have:

$ lvs | grep custom
  custom_data                                                             raid Vwi-a-tz--   1,00g lxc-pool                                                                          4,98                            
       
$ ls /dev/raid/
containers_debian
containers_seafile
custom_data
data.seafile
data.seafile-bak
images
images_af1e7209de8205b1670b85a68c620e5242465a002f3c6bef39c173aaba7851b0
vm.seafile

Did I mess something up? Or did something between these versions change which the update process did not anticipate?

Rename your custom_data LV to custom_default_data and see if that unblocks things.

1 Like

Oh, that solution was easier than I had expected :D. Thanks a lot, worked like a charm!