User Tools

Site Tools


docs:tips_n_tricks:lvm.html

This is an old revision of the document!


LVM

Get rid of left over /dev/dm-XXX nodes

After removing a LVM physical device without unounting and deactivating the volumes first, you see this kind of error:

~ # pvs
/dev/vg_foo/lv_bar: read failed after 0 of 4096 at 53687025664: Input/output error
/dev/vg_foo/lv_bar: read failed after 0 of 4096 at 53687083008: Input/output error
/dev/vg_foo/lv_bar: read failed after 0 of 4096 at 0: Input/output error
/dev/vg_foo/lv_bar: read failed after 0 of 4096 at 4096: Input/output error
PV         VG         Fmt  Attr PSize   PFree
/dev/md127 vg_fnords lvm2 a--  742.96g 177.71g
:
:

To get rid of them, you have to check for /dev/dm-XX device corresponding to the logical volume(s) in question:

~ # ls -la /dev/disk/by-label
total 0
drwxr-xr-x 2 root root 840 Jul 12 16:40 ./
drwxr-xr-x 8 root root 160 Jul 12 16:40 ../
:
lrwxrwxrwx 1 root root  11 Jul 12 16:22 foobar -> ../../dm-37
:

(assuming the filesystem label of the logical volume in question has been “foobar”)

No you can remove that device mapper device from the system by

~ # dmsetup remove /dev/dm-37

… and your lvm commands are quiet again :-)

Linux LVM

docs/tips_n_tricks/lvm.html.1405178650.txt.gz · Last modified: 12.07.2014 17:24 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki