Operating System - Linux
1752585 Members
4093 Online
108788 Solutions
New Discussion юеВ

Re: LVM Problem vg01 will not auto activate

 
Ivan Ferreira
Honored Contributor

Re: LVM Problem vg01 will not auto activate

There are some things that are not pretty whell documented.

Fist, ensure that you used lvmconf to enable cluster locking.

lvmconf --enable-cluster

Then, ensure that the volume group has the "clusted" attribute:

vgchange -cy

Let me know if it helps.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: LVM Problem vg01 will not auto activate

Shalom,

Thank's Ivan.

There is disk on both servers but none of the storage is actually shared. We use rsync to keep the two nodes up to date.

I'm going to try to debug the startup.

If I find nothing, I'm looking for ideas on where the best place to put the kludge is.

Yes, a shell script, activated at startup that does one little thing:
vgchange -a y vg01

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ralph Grothe
Honored Contributor

Re: LVM Problem vg01 will not auto activate

If you haven't compiled a custom kernel whith built-in support for LVM and MD meta devices
then most likely the driver is loaded as a module and VGs get activated early at system boot from within your initial RAM disk.
You can easily check by inspecting the init script of your initrd.

# zcat /boot/initrd-$(uname -r).img|cpio -ivt init
-rwxr-xr-x 1 root root 1369 Jan 18 2007 init
4544 blocks

Copy this file in somewhere and open it in a pager or editor.
But usually it contains an activation of all VGs.

# grep insmod init
insmod /lib/scsi_mod.ko
insmod /lib/sd_mod.ko
insmod /lib/mptbase.ko
insmod /lib/mptscsih.ko
insmod /lib/dm-mod.ko
insmod /lib/jbd.ko
insmod /lib/ext3.ko
insmod /lib/dm-mirror.ko
insmod /lib/dm-zero.ko
insmod /lib/dm-snapshot.ko

# grep lvm init
lvm vgscan
lvm vgchange -ay
lvm vgmknodes
Madness, thy name is system administration
Steven E. Protter
Exalted Contributor

Re: LVM Problem vg01 will not auto activate

Thanks Ralph,

I've been backed up with functionity issues the past few days.

I will get back to this and assign points.

I'm guessing we'll find that the initrd is fine, but maybe not. I know how to create a new one if necessary.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: LVM Problem vg01 will not auto activate

Shalom,

Performed

zcat /boot/initrd-2.6.9-55.EL.img | cpio -ivt > init

[root@rosh ~]# grep insmod init
-rwxr-xr-x 1 root root 388320 Aug 6 08:46 bin/insmod
[root@rosh ~]# grep lvm init
-r-xr-xr-x 1 root root 1261836 Aug 6 08:46 bin/lvm
drwxr-xr-x 2 root root 0 Aug 6 08:46 etc/lvm
-rw-r--r-- 1 root root 14654 Aug 6 08:46 etc/lvm/lvm.conf

The results are the same on both system.

Nothing in the boot.log

Performing a boot with a couple of set -x/set +x bracked around cricial lvm code.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: LVM Problem vg01 will not auto activate

Shalom,

I hacked it.

/etc/rc.sysinit


at the bottom.

/sbin/vgchange -a y vg01
/bin/mount /dev/vg01/share2 /storage

I wonder if there is not a better way or place to do this.

If I set up an NFS share on /storage, I'm wondering if it will work. My assumption based on the RHCE and such is that sysinit runs runs before the nfs service so my hack is reasonable.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: LVM Problem vg01 will not auto activate

Shalom,

When this happened on a private system, being ethical, I never considered checking with Red Hat Support via the service agreements with our office. That would be unethical.

However a week ago, we had the exact same problem at work. I have filed a case with Red Hat and they believe the problem is a bug. The work systems were pure RH, not CentOS, but a RH bug is a CentOS bug and vice versa.

I shall report further results and any fixes they provide when it happens.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: LVM Problem vg01 will not auto activate

Solution on a SAN environment at work.



in /etc/modprobe.conf
Change:
alias scsi_hostadapter2 qla2322

to

alias scsi_hostadapter2 qla2400

mkinitrd -f initrd-$(uname -r).img $(uname -r)

reboot

I need to configure remote serial console on the system before I even think about trying this on the two Centos systems that inspired this thread.

Wondering If I'd change modprobe.conf or merely mkinitrd and see what happens.

Shmuel
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com