I'm using Debian squeeze, and running LVM on top of software RAID 1.
I just accidentally just discovered that most of the links under /dev/mapper
are missing,
though my system seems to be still functioning correctly.
I'm not sure what happened.
The only thing I can imagine that caused it was my failed attempt to get a LXC fedora container to work.
I ended up deleting a directory /cgroup/laughlin
, corresponding to the container,
but I can't imagine why that should have caused the problem.
/dev/mapper
looked (I made some changes, see below) approximately like
orwell:/dev/mapper# ls -la
total 0
drwxr-xr-x 2 root root 540 Apr 12 05:08 .
drwxr-xr-x 22 root root 4500 Apr 12 05:08 ..
crw------- 1 root root 10, 59 Apr 8 10:32 control
lrwxrwxrwx 1 root root 7 Mar 29 08:28 debian-root -> ../dm-0
lrwxrwxrwx 1 root root 8 Apr 12 03:32 debian-video -> ../dm-23
debian-video corresponds to a LV I had just created.
However, I have quite a number of VGs on my system, corresponding to 4 VGs spread across 4 disks. vgs
gives
orwell:/dev/mapper# vgs
VG #PV #LV #SN Attr VSize VFree
backup 1 2 0 wz--n- 186.26g 96.26g
debian 1 7 0 wz--n- 465.76g 151.41g
olddebian 1 12 0 wz--n- 186.26g 21.26g
testdebian 1 3 0 wz--n- 111.75g 34.22g
I tried running
/dev/mapper# vgscan --mknodes
and some devices were created (see output below), but they aren't symbolic links to the dm devices as they should be, so I'm not sure if this is useless or worse. Would they get in the way of recreation of the correct links? Should I delete these devices again?
I believe that udev creates these links, so would a reboot fix this problem, or would I get an unbootable system? What should I do to fix this? Are there any diagnostics/sanity checks I should run to make sure there aren't other problems I haven't noticed? Thanks in advance for any assistance.
orwell:/dev/mapper# ls -la
total 0
drwxr-xr-x 2 root root 540 Apr 12 05:08 .
drwxr-xr-x 22 root root 4500 Apr 12 05:08 ..
brw-rw---- 1 root disk 253, 1 Apr 12 05:08 backup-local_src
brw-rw---- 1 root disk 253, 2 Apr 12 05:08 backup-video
crw------- 1 root root 10, 59 Apr 8 10:32 control
brw-rw---- 1 root disk 253, 15 Apr 12 05:08 debian-boot
brw-rw---- 1 root disk 253, 16 Apr 12 05:08 debian-home
brw-rw---- 1 root disk 253, 22 Apr 12 05:08 debian-lxc_laughlin
brw-rw---- 1 root disk 253, 21 Apr 12 05:08 debian-lxc_squeeze
lrwxrwxrwx 1 root root 7 Mar 29 08:28 debian-root -> ../dm-0
brw-rw---- 1 root disk 253, 17 Apr 12 05:08 debian-swap
lrwxrwxrwx 1 root root 8 Apr 12 03:32 debian-video -> ../dm-23
brw-rw---- 1 root disk 253, 10 Apr 12 05:08 olddebian-etch_template
brw-rw---- 1 root disk 253, 13 Apr 12 05:08 olddebian-fedora
brw-rw---- 1 root disk 253, 8 Apr 12 05:08 olddebian-feisty
brw-rw---- 1 root disk 253, 9 Apr 12 05:08 olddebian-gutsy
brw-rw---- 1 root disk 253, 4 Apr 12 05:08 olddebian-home
brw-rw---- 1 root disk 253, 11 Apr 12 05:08 olddebian-lenny
brw-rw---- 1 root disk 253, 7 Apr 12 05:08 olddebian-msi
brw-rw---- 1 root disk 253, 5 Apr 12 05:08 olddebian-oldchresto
brw-rw---- 1 root disk 253, 3 Apr 12 05:08 olddebian-root
brw-rw---- 1 root disk 253, 14 Apr 12 05:08 olddebian-suse
brw-rw---- 1 root disk 253, 6 Apr 12 05:08 olddebian-vgentoo
brw-rw---- 1 root disk 253, 12 Apr 12 05:08 olddebian-wsgi
brw-rw---- 1 root disk 253, 20 Apr 12 05:08 testdebian-boot
brw-rw---- 1 root disk 253, 18 Apr 12 05:08 testdebian-home
brw-rw---- 1 root disk 253, 19 Apr 12 05:08 testdebian-root
/etc/init.d/lvm2 start
. It did the trick for me (but I was not exactly in your situation).