Operating System - HP-UX
1833176 Members
2844 Online
110051 Solutions
New Discussion

Re: How to make volume group accessible from both the nodes in a high availability server.

 
Mahesh Taluru
Occasional Advisor

How to make volume group accessible from both the nodes in a high availability server.

I want to create a volume group and tht should be accessible from both the nodes.(Note :- i have not formed any cluster any packages)

i have created a volume group /dev/vgclus in one node rx26-154 and exported the vg in preview mode to rx26-153.i am able to activate the vg in rx26-153 but when i tried to actovate the vg in rx26-154 ia m getting the below error

vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "/dev/vgexport".
VG Name /dev/vgclus
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 1023
VGDA 4
PE Size (Mbytes) 4
Total PE 2046
Alloc PE 256
Free PE 1790
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0



Can someone help me on this..
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: How to make volume group accessible from both the nodes in a high availability server.

Shalom,

For simultaneous access to a volume group on two nodes, you need two things.

1) An application that is aware of this and won't corrupt the data.
2) Activate the volume group in shared mode.

vgchange -a y -S vg##

# Use a real volume group name.

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
Mahesh Taluru
Occasional Advisor

Re: How to make volume group accessible from both the nodes in a high availability server.

I have activated the VG in shared mode in both the nodes.

I have created one Lv in tht vg from one node but i am not able to view tht LV from the other node..

Below is the vgdisplay output in rx26-153
# vgdisplay -v /dev/vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 2303
VGDA 4
PE Size (Mbytes) 4
Total PE 3326
Alloc PE 256
Free PE 3070
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/mahesh
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 256
Allocated PE 256
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c18t1d0
PV Status available
Total PE 1023
Free PE 767
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c18t1d1
PV Status available
Total PE 2303
Free PE 2303
Autoswitch On
Proactive Polling On
Below is the vgdisplay output in rx26-154
# vgdisplay -v /dev/vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 2303
VGDA 4
PE Size (Mbytes) 4
Total PE 3326
Alloc PE 0
Free PE 3326
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


--- Physical volumes ---
PV Name /dev/dsk/c18t1d0
PV Status available
Total PE 1023
Free PE 1023
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c18t1d1
PV Status available
Total PE 2303
Free PE 2303
Autoswitch On
Proactive Polling On

I want to view tht Lv from rx26-154 with out exporting and importing the vg .

I also shud be able to write the data to tht LV from both the nodes.

Suraj K Sankari
Honored Contributor

Re: How to make volume group accessible from both the nodes in a high availability server.

HI,
VG related examples are here
vgchange examples

# vgchange -a n /dev/vg03 # Deactivate volume group
# vgchange -c y /dev/vg03 # Enable volume group for HA cluster
# vgchange -c y -S y /dev/vg03 # Enable volume group for HA cluster and mark as sharable
# vgchange -a e /dev/vg03 # Activate volume group in exclusive mode
# vgchange -a s /dev/vg03 # Activate volume group in shared mode

Activate all volume groups; activate marked for membership in a HA cluster in exclusive mode:

# vgchange -a y

Activate all volumes, marked for membership in a HA cluster in exclusive mode:
# vgchange -a e

Suraj
SoorajCleris
Honored Contributor

Re: How to make volume group accessible from both the nodes in a high availability server.

Hi Mahesh,

===> I have activated the VG in shared mode in both the nodes.

===> I have created one Lv in tht vg from one node but i am not able to view tht LV from the other node.

===> want to view tht Lv from rx26-154 with out exporting and importing the vg .


THIS IS NOT POSSIBLE !!!!

The database is maintained separatly..

export and import the VG first then you can do what ever your want..

===> also shud be able to write the data to tht LV from both the nodes.

If you want to do it same time you may need CFS ..

Regards,
Sooraj



"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Stephen Doud
Honored Contributor

Re: How to make volume group accessible from both the nodes in a high availability server.

It is pointless to activate a VG on both servers at the same time unless you intend to use it with Serviceguard extension for RAC.
This is because the HPUX kernel does not communicate inode changes between nodes, so any modification to a file system on the VG/lvol on one node will NOT be communicated to the other nodes' in-core inode table, so it immediately becomes outdated and therefore unreliable, possibly leading to a kernel panic! If you don't want a system to panic, use NFS or Cluster File System.

If you intend to use this VG for SGeRAC (raw volume access), you need to install SGeRAC software to enable the 'shared' VG activation mode. The vgdisplays you presented did NOT show 'shared' Status, only 'available' Status.
If using SGeRAC, you create a VG with it's Lvols on one node, you must vgimport it into the other node's /etc/lvmtab. All /dev// should appear on the 2nd node.
At this point, start Serviceguard, then perform 'vgchange -c y -S y /dev/' to mark the VG for 'shared' activation. Then you will be able to activate the VG in shared mode: 'vgchange -a s '
However, it cannot be used with file systems for the reason I stated before.
If you want a cluster file system, you must install one of the Storage Management Suite products that incorporate the CFS features.
See http://docs.hp.com/en/ha.html#HP%20Serviceguard%20Storage%20Management%20Suite
Mahesh Taluru
Occasional Advisor

Re: How to make volume group accessible from both the nodes in a high availability server.

i thank evryone for your suggestions.