LV Device Missing
I'm fairly new to LVM, but I've been having an intermittant problem that
I hope someone can help me with.
Every few (2-10ish) reboots of my machine, my LV fails to be recognised.
I'm running Debian Sid with:
=== 8< ===
ian@lexx:~$ wajig status-match lvm
Package Installed Previous Now State
=======================-===============-===============-===============-=====
lvm-common 1.5.20 1.5.20 1.5.20 install
lvm2 2.01.04-5 2.01.04-5 2.01.04-5 install
[... not-installed-stuff deleted ...]
=== >8 ===
My /home partition is set up as the logical volume. It is on the same
physical disk as my root partition, so it is not a problem with the disk
being recognised.
Here is a transcript of a session where the LV /home does not mount:
=== 8< ===
root@lexx:~# mount
/dev/hda5 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw,errors=remount-ro)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
root@lexx:~# pvs
PV VG Fmt Attr PSize PFree
/dev/hda4 vg lvm2 a- 57.94G 7.94G
/dev/hda6 vg lvm2 a- 37.27G 37.27G
root@lexx:~# lvs
LV VG Attr LSize Origin Snap% Move Copy%
vol1 vg -wi--- 50.00G
root@lexx:~# mount /home
mount: you must specify the filesystem type
root@lexx:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda5 / ext3 defaults,errors=remount-ro 0 1
/dev/hda1 /boot ext3 defaults,errors=remount-ro 0 1
/dev/vg/vol1 /home auto defaults 0 0
/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hdd /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
/dev/hda3 none swap sw 0 0
/dev/sda /media/flash auto rw,user,noauto 0 0
root@lexx:~# mount -t reiserfs /dev/vg/vol1 /home
mount: special device /dev/vg/vol1 does not exist
root@lexx:~# ls -l /dev/vg
ls: /dev/vg: No such file or directory
root@lexx:~# ls -l /dev/vg*
crw-rw---- 1 root root 7, 0 2006-04-27 17:29 /dev/vcs
crw-rw---- 1 root root 7, 1 2006-04-27 17:30 /dev/vcs1
crw-rw---- 1 root root 7, 2 2006-04-27 17:30 /dev/vcs2
crw-rw---- 1 root root 7, 3 2006-04-27 17:30 /dev/vcs3
crw-rw---- 1 root root 7, 4 2006-04-27 17:30 /dev/vcs4
crw-rw---- 1 root root 7, 5 2006-04-27 17:30 /dev/vcs5
crw-rw---- 1 root root 7, 6 2006-04-27 17:30 /dev/vcs6
crw-rw---- 1 root root 7, 7 2006-04-27 17:30 /dev/vcs7
crw-rw---- 1 root root 7, 128 2006-04-27 17:29 /dev/vcsa
crw-rw---- 1 root root 7, 129 2006-04-27 17:30 /dev/vcsa1
crw-rw---- 1 root root 7, 130 2006-04-27 17:30 /dev/vcsa2
crw-rw---- 1 root root 7, 131 2006-04-27 17:30 /dev/vcsa3
crw-rw---- 1 root root 7, 132 2006-04-27 17:30 /dev/vcsa4
crw-rw---- 1 root root 7, 133 2006-04-27 17:30 /dev/vcsa5
crw-rw---- 1 root root 7, 134 2006-04-27 17:30 /dev/vcsa6
crw-rw---- 1 root root 7, 135 2006-04-27 17:30 /dev/vcsa7
root@lexx:~# vgscan
Reading all physical volumes. This may take a while...
/dev/hdc: open failed: No medium found
Found volume group "vg" using metadata type lvm2
=== >8 ===
So it seems the device is missing. If I now reboot however:
=== 8< ===
root@lexx:~# shutdown -r now
[... stuff deleted ...]
root@lexx:~# mount
/dev/hda5 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw,errors=remount-ro)
/dev/mapper/vg-vol1 on /home type reiserfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
root@lexx:~# pvs
PV VG Fmt Attr PSize PFree
/dev/hda4 vg lvm2 a- 57.94G 7.94G
/dev/hda6 vg lvm2 a- 37.27G 37.27G
root@lexx:~# lvs
LV VG Attr LSize Origin Snap% Move Copy%
vol1 vg -wi-ao 50.00G
root@lexx:~# ls -l /dev/vg*
total 0
lrwxrwxrwx 1 root root 19 2006-04-27 18:01 vol1 -> /dev/mapper/vg-vol1
root@lexx:~# ls -l /dev/mapper/
total 0
crw-rw---- 1 root root 10, 63 2006-04-27 18:01 control
brw------- 1 root root 254, 0 2006-04-27 18:01 vg-vol1
root@lexx:~# vgscan
Reading all physical volumes. This may take a while...
/dev/hdc: open failed: No medium found
Found volume group "vg" using metadata type lvm2
=== >8 ===
/home is back. I then checked dmesg and compared a good and bad session:
=== 8< ===
root@lexx:~# diff dmesg.ok dmesg.bad
25c25
< Detected 551.481 MHz processor.
---
> Detected 551.217 MHz processor.
50,51c50,51
< ..... CPU clock speed is 551.0155 MHz.
< ..... host bus clock speed is 100.0209 MHz.
---
> ..... CPU clock speed is 551.0185 MHz.
> ..... host bus clock speed is 100.0215 MHz.
132d131
< cdrom: open failed.
136,140d134
< ReiserFS: dm-0: found reiserfs format "3.6" with standard journal
< ReiserFS: dm-0: using ordered data mode
< ReiserFS: dm-0: journal params: device dm-0, size 8192, journal first block
18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
< ReiserFS: dm-0: checking transaction log (dm-0)
< ReiserFS: dm-0: Using r5 hash to sort names
=== >8 ===
I've spent a fair bit of time Googling for an answer or at least someone
else with the same problem, but so far have not found anything that
looks similar.
Can someone please assisst, or point me to an appropriate resource to
get this fixed?
Thanks,
Ian.
Reply to: