LVM stoarge container doesn't start

I am trying to start lxd container By lxc start EID-DB but it shows
Error: Common start logic: Mount /dev/my-lvm/containers_EID–DB onto /var/lib/lxd/storage-pools/my-lvm/containers/EID-DB: input/output error
Try lxc info --show-log EID-DB for more info

root@lxd1:~# lxc info --show-log EID-DB
Name: EID-DB
Remote: unix://
Architecture: x86_64
Created: 2019/12/11 05:40 UTC
Status: Stopped
Type: persistent
Profiles: default
Snapshots:
14122020 (taken at 2020/12/14 07:42 UTC) (stateless)
EID-DB (taken at 2021/03/09 11:33 UTC) (stateless)

Log:

I am trying to this

root@lxd1:~# vgscan --cache
WARNING: /dev/my-lvm/containers_Smart–DB: 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-EID–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_Smart–DB-nSmart–DB: Thin’s thin-pool needs inspection.
Reading volume groups from cache.
Found volume group “vg1” using metadata type lvm2
Found volume group “my-lvm” using metadata type lvm2
Found volume group “ubuntu-vg” using metadata type lvm2
root@lxd1:~# lvchange -ay /dev/vg1/vo

Plz tell me what is the problem and give a solution plz.

@stgraber plz help

@tomp could you help plz?

@simos could you help plz?

I’ve not encountered that error myself before, but a quick search suggests using the command:

sudo lvconvert --repair <thinpool>

Please can you show the output of sudo lvs?

root@lxd1:~# lvs

LV                                       VG        Attr       LSize     Pool        Origin                Data%  Meta%  Move Log Cpy%Sync Convert
  LXDThinPool                              my-lvm    twi-cotzM-  1021.99g                                   16.95  10.91        
  containers_EID--DB                       my-lvm    Vwi-a-tz--    60.05g LXDThinPool                       35.56               
  containers_EID--DB-14122020              my-lvm    Vri-a-tz--    60.05g LXDThinPool containers_NID--DB    36.99               
  containers_EID--DB-EID--DB               my-lvm    Vri-a-tz--    60.05g LXDThinPool containers_EID--DB    35.31               
  containers_Smart--DB                    my-lvm    Vwi-a-tz--   500.00g LXDThinPool                       11.07               
  containers_Smart--DB-Smart--DB         my-lvm    Vri-a-tz--   500.00g LXDThinPool containers_nSmart--DB 9.97                
  containers_Smart--DB-Smart--DB--backup my-lvm    Vri-a-tz--   500.00g LXDThinPool containers_Smart--DB 19.96               
  custom_vdisk01                           my-lvm    Vwi-a-tz--   150.00g LXDThinPool                       2.24                
  ubuntu-lv                                ubuntu-vg -wi-ao----  <248.50g                                                       
  vol1                                     vg1       -wi-ao---- <1024.00g

root@lxd1:~# lvconvert --repair /dev/vg1/vol1
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.
Command on LV vg1/vol1 does not accept LV type linear.
Command not permitted on LV vg1/vol1.

The thin pool is /dev/vg1/LXDThinPool (indicated by the t in the Attr col). Try running it on that.

So:

sudo lvconvert --repair /dev/vg1/LXDThinPool

lvconvert --repair /dev/vg1/LXDThinPool

that means by run this command?

You’ll also need to deactivate it by the looks of it:

sudo lvchange -an /dev/vg1/LXDThinPool

Plz give me the sequence command. I don’t know which one will 1st

I don’t know the sequence of commands, we are exploring this problem together :slight_smile:

  1. sudo lvchange -an /dev/vg1/LXDThinPool
  2. lvconvert --repair /dev/vg1/LXDThinPool

OR

1.lvconvert --repair /dev/vg1/LXDThinPool
2. sudo lvchange -an /dev/vg1/LXDThinPool

My thinking was:

sudo lvchange -an /dev/vg1/LXDThinPool
sudo lvconvert --repair /dev/vg1/LXDThinPool

Although I just tried this now on one of my test boxes and it complains about lack of disk space.

Please can you show output of sudo pvs for me too.

root@lxd1:~# pvs
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-Smart–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-EID–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_Smart–DB-Smart–DB: Thin’s thin-pool needs inspection.
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-Smart–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-EID–DB: Thin’s thin-pool needs inspection.
WARNING: /dev/my-lvm/containers_Smart–DB-Smart–DB: Thin’s thin-pool needs inspection.
PV VG Fmt Attr PSize PFree
/dev/sde3 ubuntu-vg lvm2 a-- <248.50g 0
/dev/vg1/vol1 my-lvm lvm2 a-- 1023.99g 0
/dev/zd0 vg1 lvm2 a-- <1024.00g 0

And what were you doing immediately before this issue started occurring?

vgscan --cache
lvchange -ay /dev/vg1/vol1

Alaways I have run those command then start container but lasta from yesterday after run those command container doesn’t start

And what is vol1 in relation to your LXD containers?

My container get storage from lvm.

You mean its attached as a custom volume? Because your container’s root disks are on /dev/my-lvm/ volume group. Just wondering why you needed to keep scanning the volume and then activating it.