LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   LVM2 (non-root) lv's won't mount at boot time (http://www.linuxquestions.org/questions/linux-general-1/lvm2-non-root-lvs-wont-mount-at-boot-time-298453/)

jbanafato 03-06-2005 05:09 PM

LVM2 (non-root) lv's won't mount at boot time
 
Hey everyone...

I've got LVM2 set up and working. My only problem is that the volumes will not activate at boot time. I have a 20GB volume named homevol (/dev/vg0/homevol). When I manually do 'lvchange -ay /dev/vg0/homevol' all is well.

I though simply adding the appropriate vgchange and lvchange commands to /etc/rc would activate everything at boot time, but no luck. I will make an initrd if I must, but I don't see why I would have to. Anybody have a similar experience?

Applicable info:
linux 2.6.6
devfs (daemon and kernel protocol rev 5), mounts at boot
lvm 2.00.33

Thanks...

nonzero 03-06-2005 09:09 PM

My /etc/fstab, give you any ideas?

[nonzero@blacky ~]$ cat /etc/fstab
LABEL=/1 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
/dev/VolGroup00/LogVol01 /home ext3 defaults 1 2
/dev/VolGroup01/LogVol01 /opt ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/VolGroup01/LogVol00 /usr ext3 defaults 1 2
/dev/VolGroup00/LogVol00 /var ext3 defaults 1 2
LABEL=SWAP-ida/c0d0p2 swap swap defaults 0 0
/dev/hda /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0

nz

EDIT: This machine is running FC3.

jbanafato 03-06-2005 11:04 PM

Thanks for the reply. My fstab is good. For instance, I have the following entry:

/dev/vg0/homevol /home reiserfs defaults 0 0

If I were to log in after a reboot, however, /home won't be mounted. So,

#mount /home
mount: special device /dev/vg0/homevol does not exist

Wow, that's weird...

#lvdisplay
LV Name /dev/vg0/homevol
VG Name vg0
LV Write Access read/write
LV Status NOT available
...

There's the culprit. homevol's not active.

#lvchange -ay /dev/vg0/homevol
#mount /home

Homes are back.

But when I put the vgchange and lvchange commands in my rc scripts, they just don't seem to do anything. No logs, nothing. I'm running out of ideas. Maybe you could grep -R "\(lv\|vg\)change" /etc/* for me?

Thanks again...

nonzero 03-06-2005 11:29 PM

Here ya go.

[root@blacky nonzero]# grep -R "\(lv\|vg\)change" /etc/*
grep: /etc/httpd/run/dbus/system_bus_socket: No such device or address
grep: /etc/rc0.d/K90bluetooth: No such file or directory
grep: /etc/rc0.d/K74apmd: No such file or directory
grep: /etc/rc1.d/K90bluetooth: No such file or directory
grep: /etc/rc1.d/K74apmd: No such file or directory
grep: /etc/rc2.d/K90bluetooth: No such file or directory
grep: /etc/rc2.d/S26apmd: No such file or directory
grep: /etc/rc3.d/K90bluetooth: No such file or directory
grep: /etc/rc3.d/S26apmd: No such file or directory
grep: /etc/rc4.d/K90bluetooth: No such file or directory
grep: /etc/rc4.d/S26apmd: No such file or directory
grep: /etc/rc5.d/K90bluetooth: No such file or directory
grep: /etc/rc5.d/S26apmd: No such file or directory
grep: /etc/rc6.d/K90bluetooth: No such file or directory
grep: /etc/rc6.d/K74apmd: No such file or directory
grep: /etc/rc.d/rc6.d/K90bluetooth: No such file or directory
grep: /etc/rc.d/rc6.d/K74apmd: No such file or directory
grep: /etc/rc.d/rc1.d/K90bluetooth: No such file or directory
grep: /etc/rc.d/rc1.d/K74apmd: No such file or directory
grep: /etc/rc.d/rc3.d/K90bluetooth: No such file or directory
grep: /etc/rc.d/rc3.d/S26apmd: No such file or directory
grep: /etc/rc.d/rc5.d/K90bluetooth: No such file or directory
grep: /etc/rc.d/rc5.d/S26apmd: No such file or directory
/etc/rc.d/rc.sysinit: action $"Setting up Logical Volume Management:" /sbi n/lvm.static vgchange -a y --ignorelockingfailure
/etc/rc.d/rc.sysinit: if [ -e /proc/lvm -a -x /sbin/vgchange ]; then
/etc/rc.d/rc.sysinit: action $"Setting up Logical Volume Management:" /sbin/vg scan && /sbin/vgchange -a y
/etc/rc.d/rc.sysinit: action $"Setting up Logical Volume Manag ement:" /sbin/lvm.static vgscan --mknodes --ignorelockingfailure && /sbin/lvm.st atic vgchange -a y --ignorelockingfailure
/etc/rc.d/rc.sysinit: if [ -e /proc/lvm -a -x /sbin/vgchange -a -f /etc/lvmtab ]; then
/etc/rc.d/rc.sysinit: action $"Setting up Logical Volume Management:" /sbin/vgscan && /sbin/vgchange -a y
grep: /etc/rc.d/rc2.d/K90bluetooth: No such file or directory
grep: /etc/rc.d/rc2.d/S26apmd: No such file or directory
grep: /etc/rc.d/rc0.d/K90bluetooth: No such file or directory
grep: /etc/rc.d/rc0.d/K74apmd: No such file or directory
grep: /etc/rc.d/rc4.d/K90bluetooth: No such file or directory
grep: /etc/rc.d/rc4.d/S26apmd: No such file or directory
/etc/rc.sysinit: action $"Setting up Logical Volume Management:" /sbi n/lvm.static vgchange -a y --ignorelockingfailure
/etc/rc.sysinit: if [ -e /proc/lvm -a -x /sbin/vgchange ]; then
/etc/rc.sysinit: action $"Setting up Logical Volume Management:" /sbin/vg scan && /sbin/vgchange -a y
/etc/rc.sysinit: action $"Setting up Logical Volume Manag ement:" /sbin/lvm.static vgscan --mknodes --ignorelockingfailure && /sbin/lvm.st atic vgchange -a y --ignorelockingfailure
/etc/rc.sysinit: if [ -e /proc/lvm -a -x /sbin/vgchange -a -f /etc/lvmtab ]; then
/etc/rc.sysinit: action $"Setting up Logical Volume Management:" /sbin/vgscan && /sbin/vgchange -a y

nz


All times are GMT -5. The time now is 03:57 AM.