LVM: Removing a 'Zombie' (Unavailable) VG

12,705

The solution for removing ghost LVM-volumes is 'dmsetup'. Do something like:

# dmsetup remove --force /dev/VolGroup01/LogVol00

After that your 'vgs'-command does not display the read errors.

Share:
12,705

Related videos on Youtube

AndiW
Author by

AndiW

Updated on September 18, 2022

Comments

  • AndiW
    AndiW almost 2 years

    I have an LVM related problem. We have a server that 'learned' about a foreign volume group through a hard drive that was briefly attached. Now, with that hard drive gone again, all LVM utilities complain about lots of IO errors (read failed) for this missing volume group.

    root@coruscant:~# vgs
    /dev/mapper/vg_old-lv1: read failed after 0 of 4096 at 2147418112: Input/output error
    /dev/mapper/vg_old-lv2: read failed after 0 of 4096 at 0: Input/output error
    [...]
    /dev/mapper/vg_old-lvn: read failed after 0 of 4096 at 0: Input/output error
    VG        #PV #LV #SN Attr   VSize   VFree
    real_vg_1     1  36   1 wz--n-   1.73T  1.04T
    real_vg_2     1   3   0 wz--n- 111.66G 61.66G
    

    As you can see from the output of vgs, the 'missing' zombie VG is not actually listed in the output of the utilities. I can also not disable it with 'vgchange' or remove it with 'vgremove' -- These tools just return 'volume group not found'.

    Any hints on how to remove this 'zombie' VG from the system without rebooting?

    System:

    • Ubuntu 8.04LTS, x64, 2.6.24-29-xen,
    • LVM version: 2.02.26 (2007-06-15)
    • Library version: 1.02.20 (2007-06-15)
    • Driver version: 4.12.0
  • krlmlr
    krlmlr over 9 years
    Spot on! Worked for me without using --force.
  • Christian Wolf
    Christian Wolf over 8 years
    The --force was not needed in my case but the command removed the stale LV.
  • Michel
    Michel almost 8 years
    Worked without --force on 14.04 LTS (which still has this problem)