Operating System - HP-UX
1753290 Members
5548 Online
108792 Solutions
New Discussion юеВ

Re: Creation of Logical Volume fails. Lv inactive.

 
SOLVED
Go to solution
Ivan Ferreira
Honored Contributor

Re: Creation of Logical Volume fails. Lv inactive.

Recently, I had the same problem, but with a Red Hat Cluster.

I was able to create and activate the volume by running:

lvmconf --disable-cluster
lvcreate...
lvmconf --enable-cluster
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Serviceguard for Linux
Honored Contributor

Re: Creation of Logical Volume fails. Lv inactive.

The "enable-cluster" won't work (or do anything) with SGLX
Brem Belguebli
Regular Advisor

Re: Creation of Logical Volume fails. Lv inactive.

Hi,

If hosttags are activated, you need to create an additionnal file /etc/lvm/lvm_`hostname`.conf in which you must enter something like what follows:

activation { volume_list = ["VolGroup00", "@yourhostname" ] }

Replace yourhostname by your real hostname ;-)
That will make LVM able to activate VolGroup00 and all the VG's under cluster control that are implicitely tagged with the hostname on which the VG's are supposed to be activated.

Of course, if you need to add local VG's that will not be part of the cluster, let's say VolGroup01, you'll need to add it in the same file with the same syntax as Volgroup00 (without the @).
Serviceguard for Linux
Honored Contributor

Re: Creation of Logical Volume fails. Lv inactive.

If you have not done so already, please review the installation white paper http://docs.hp.com/en/14117/sglx.deployment.guide.pdf This has an example of the use of hosttags.
estonolose
Advisor

Re: Creation of Logical Volume fails. Lv inactive.

The file /etc/lvm/lvm_`hostname`.conf already existed. This is the file.

nodo2:/etc/lvm> more lvm_nodo2.conf
activation { volume_list=["@nodo2"] }

This node have an Oracle database running. Can I add the the VolGroup01 with the cluster (and database) running?.

Is it necessary to add VolGroup00 (system volume) if I don't want to create logical volumes in VolGroup00?

This is the line to add

activation { volume_list = ["VolGroup01", "@nodo2" ] }

Is it ok?


Thanks.
Serviceguard for Linux
Honored Contributor

Re: Creation of Logical Volume fails. Lv inactive.

If you are using exclusive activation with SGLX you should NOT be activating volumes yourself except for development purposes. SGLX does the activation and deactivation when packages are started and stopped.

Also, what version of RH4 are you using. I cannot remember when hosttags was added to RH4 and when it became fully supported.
Brem Belguebli
Regular Advisor

Re: Creation of Logical Volume fails. Lv inactive.

Hi,
As long as VolGroup00 or whatever doesn't belong to a clustered VG, VolGroup00 looking as a default installation system VG, you can add them in the activation list.

Be carefull never to add a clustered VG in the activation list, as they are supposed to be managed thru tags by ServiceGuard, thus managed thru the @`hostname`directive.

Tags were added in 4u4 if I remember well.
estonolose
Advisor

Re: Creation of Logical Volume fails. Lv inactive.


The OS is Red Hat Enterprise Linux AS release 4 Update 4.


The vg that I want to activate is on a new disk of 30Gb that I have configured with lvm.

pvcreate /dev/emcpowerh1
vgextend VolGroup01 /dev/emcpowerh1
lvcreate VolGroup01 -n LogVol10 -L 2G

If I understand that you say I can add the line

activation { volume_list = ["VolGroup01", "@nodo2" ] }

to the file /etc/lvm/lvm_`hostname`.conf without problems (the disk is new).

Can I change this file with the cluster working or I have to stop it. (This is a production system with an Oracle database working, and I have to be very careful)

Thanks.

Brem Belguebli
Regular Advisor
Solution

Re: Creation of Logical Volume fails. Lv inactive.

Hi,

The question is :

Is VolGroup01 part of any package hosted by the cluster ?
If so, you must not add it this way in the lvm_`hostname`.conf.

You have to add it into the package configuration (control file if legacy package, ascii file if modular) and elt serviceguard manage it.

If the package to which it belongs is already running and you cannot wait, you must manually tag it, activate it and mount it (mount in case you want to use it as a FS):
# vgchange --addtag `hostname` VolGroup01
# vgchange -a y VolGroup01
# mkfs.ext3 /dev/VolGroup01/LogVol10
# mount /dev/VolGroup01/LogVol01 /yourmountpoint.

In case the VG is not part of any package, so not managed by serviceguard (local use only), you can add it as mentionned in my previous post (activation { volume_list = ["VolGroup01", "@nodo2" ] } )

Is it clear ?
estonolose
Advisor

Re: Creation of Logical Volume fails. Lv inactive.


Very clear. The Vg is not part of any package. This VG will be part of swap of the node. I want to add more swap to the existent.

Only one important question. I can't to make the change without this confirmation. Can I change this file with the cluster working or I have to stop it. (This is a production system with an Oracle database working, and I have to be very careful).

Thanks