Operating System - HP-UX
1753522 Members
6722 Online
108795 Solutions
New Discussion юеВ

Re: Add logical volume to VG in cluster

 
SOLVED
Go to solution
Weertman
Frequent Advisor

Re: Add logical volume to VG in cluster

Also vg02

Re: Add logical volume to VG in cluster

you only run "vgchange -a s ..." if this is a SHARED logical volume used with SLVM (usually as part of a RAC cluster). If this is just a standard Serviceguard cluster where a logical volume is only ever active on one node in the cluster at any one time, you can omit this step.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Ganesan R
Honored Contributor

Re: Add logical volume to VG in cluster

Hi,

Follow this steps. Assuming you are creating lv on VG02 and it is currently activated on node1

on node1

Create the logical volume as per LVM commands. After creation,
#vgexport -p -v -m /tmp/vg02.map vg02
It will just create a map file /tmp/vg02.map

Copy this map file to second node.(node2)

on node2. (Assuming VG02 is not activated here)

Note down the minor number of vg02
#vgexport /dev/vg02
#mkdir /dev/vg02
#mknod /dev/vg02/group c 64 0x020000
#vgimport -v -m /tmp/vg02.map vg02

Now the necessary devices files will be created on node2 as well. So when the package moves here all the lv's including new lv get mounted.

Not that these steps doesn't include the modifications of package control file. you need take care of that seperately.
Best wishes,

Ganesh.
Sharma Sanjeev
Respected Contributor

Re: Add logical volume to VG in cluster

Hi

If still u want to see your VG on another node than u can activate it as readonly.

vgchange -a r /dev/vg02

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Weertman
Frequent Advisor

Re: Add logical volume to VG in cluster

shouldn't it be:
vgimport -v -m /tmp/vg02.map vg02 /dev/dsk/c16t0d5

There is no hw info in the map file.

that works ok
Sharma Sanjeev
Respected Contributor

Re: Add logical volume to VG in cluster

Hi

Best way is

on 1st node
vgexport -p -m /tmp/mapfile -f /tmp/diskfile /dev/vg00

than copy mapfile and disk file to another node

than on 2nd node
vgexport vg02
mknod ( minor number should be same as 1st node vg02 )
vgimport -m /tmp/mapfile -f /tmp/diskfile /dev/vg02

if u want to activate VG on 2nd node as read only

vgchange -a r /dev/vg02

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Weertman
Frequent Advisor

Re: Add logical volume to VG in cluster

What is the destination node has a different device name?
Sharma Sanjeev
Respected Contributor

Re: Add logical volume to VG in cluster

Hi Again

Than u need to import with device name.

But generally The nodes in Cluster having same device name

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE

Re: Add logical volume to VG in cluster

...seems to be a lot of poor advice being handed out on this thread...

first off, when you are running the vgexport on your primary node to generate the map file, you need to make nsure you include the "-s" option on the vgexport. This will ensure that as well as the lvol names, the volume group ID is also writrten to the map file (think of the volume group ID or VGID as like a disk signature)

Then when importing the volume group on the other node use the "-s" option on the vgimport and the vgimport command will scan all the disks visible to the system and look for that VGID - that way it knows what disks need to be part of the volume group and you don't have to list them on the command line.

As for the point about device files being the same on all cluster nodes. In my experience they are different as often as they are the same. Serviceguard really doesn't care if a LUN is seen as c3t5d0 on one node and c7t5d0 on another node - it can cope with that without a problem.

HTH

Duncan

I am an HPE Employee
Accept or Kudo

Re: Add logical volume to VG in cluster

Ganesan's post was closest to correct - I've altered it slightly (I don't know what your VG is called or what VG minor numbers you use so you'll need to adjust those for your own system):

on node1

Create the logical volume as per LVM commands. After creation,
#vgexport -p -s -v -m /tmp/vg02.map vg02
It will just create a map file /tmp/vg02.map

Copy this map file to second node.(node2)

on node2. (Assuming VG02 is not activated here)

Note down the minor number of vg02
#vgexport /dev/vg02
#mkdir /dev/vg02
#mknod /dev/vg02/group c 64 0x020000
#vgimport -v -s -m /tmp/vg02.map vg02


It will take a little longer as it has to scan all the disks on the system, but should work.


HTH

Duncan

I am an HPE Employee
Accept or Kudo