LVM: Removing a 'Zombie' (Unavailable) VG

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

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.