LVM stoarge container doesn't start

Yes its on my-lvm stoarge . After an unexpected shutdown then the lvm disk container doesn’t start. but default storage container Ok!

What was the result of:

sudo lvchange -an /dev/my-lvm/LXDThinPool
sudo lvconvert --repair /dev/my-lvm/LXDThinPool

root@lxd1:~# sudo lvchange -an /dev/vg1/LXDThinPool
WARNING: Not using lvmetad because a repair command was run.
WARNING: /dev/my-lvm/containers_Smart–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/custom_vdisk01: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_EID–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_Smart–DB-nSmart–DB–backup: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_EID–DB-14122020: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_EID–DB-NID–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_Smart–DB-nSmart–DB: Thin’s thin-pool needs inspection.
Failed to find logical volume “vg1/LXDThinPool”

I don’t think the vol1 volume or vg1 volume group is the issue though, all the errors are about the my-lvm volume group, which is where the LXDThinPool volume is.

Try

sudo lvchange -an /dev/my-lvm/LXDThinPool
sudo lvconvert --repair /dev/my-lvm/LXDThinPool

So you had an unexpected server stop that caused this?

root@lxd1:~# sudo lvchange -an /dev/my-lvm/LXDThinPool
WARNING: Not using lvmetad because a repair command was run.
WARNING: /dev/my-lvm/containers_Smart–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/custom_vdisk01: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_EID–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_Smart–DB-nSmart–DB–backup: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_EID–DB-14122020: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_EID–DB-NID–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_Smart–DB-nSmart–DB: Thin’s thin-pool needs inspection.

root@lxd1:~# sudo lvconvert --repair /dev/my-lvm/LXDThinPool
WARNING: Disabling lvmetad cache for repair command.
WARNING: Not using lvmetad because of repair.
WARNING: /dev/my-lvm/containers_Smart–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/custom_vdisk01: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_EID–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_Smart–DB-nSmart–DB–backup: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_EID–DB-14122020: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_EID–DB-NID–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_Smart–DB-nSmart–DB: Thin’s thin-pool needs inspection.
Active pools cannot be repaired. Use lvchange -an first.

What version of LXD are you using?

And what OS and version?

OS : Ubuntu 18.04
LXD: 3.0.3

I am also trying to export import this container but it shows below error

root@lxd1:~# lxc publish EID-DB --alias EIDimage
Error: Mount /dev/my-lvm/containers_EID–DB onto /var/lib/lxd/storage-pools/my-lvm/containers/NID-DB: input/output error

You didn’t answer this part ^?

Oh Yes!!

@tomp anything found about this? :pensive:

I suspect your LVM pool is corrupt.

Is it possible to create a new pool and restore from backups?

Here is the problem! I have no backup for this lvm. When I am collect a new server for backup unluckily my lvm container doesn’t work! :pensive: Even other contaner who has used default storage the also cannot move in new server. Coz new server doesn’t add as remote. Is it possible to check log and identify what is the issue for lvm and remote host add? Thnx

What does dmesg show you?

Mostly interested to know whether the issue is directly from LVM or from the underlying drive. LVM itself isn’t all that complex, it’s just a block mapping mechanism. There are ways to revert to older versions of that mapping (/etc/lvm/archives) but that won’t do you any good if the issue is the underlying storage.

The lvmthin manpage is the main source of information on how to repair such issues but I believe all the steps have been followed above…

@tomp
root@lxd1:~# e2fsck -yf /dev/my-lvm/containers_Smart–DB
e2fsck 1.44.1 (24-Mar-2018)
/dev/my-lvm/containers_nSmart–DB: recovering journal
e2fsck: Unknown code ____ 251 while recovering journal of /dev/my-lvm/containers_Smart–DB
e2fsck: unable to set superblock flags on /dev/my-lvm/containers_Smart–DB

@hafijaa please stop opening new topics for every single LVM question you have.
I deleted your two most recent posts as spam. Let’s keep things in one topic for one broken system please.

@stgraber Sorry actually I am stuck that’s why asking for help :pensive:

Please can you provide any relevant output from sudo dmesg when you try to start the container as was requested. Thanks