Operating System - HP-UX
1748227 Members
4132 Online
108759 Solutions
New Discussion юеВ

Re: VG in shared mode. ??

 
SOLVED
Go to solution
rveri
Super Advisor

VG in shared mode. ??

All,

How to know if a volume group is activated in shared mode. Any command anything is there,

VG Name /dev/vg14
VG Write Access read/write
VG Status available, exclusive
...
--------------------------------------


Thanks,
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: VG in shared mode. ??

Shalom,

I believe the VG status will be different in shared mode.

Based on this, I do not believe your volume group is activated in shared mode.

There is nothing stopping you from activating a volume group in shared mode to see what it looks like. Just don't do it on a production system.

mylab1:/# vgdisplay /dev/vgemmg
--- Volume groups ---
VG Name /dev/vgemmg
VG Write Access read/write
VG Status available, exclusive
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 8683
VGDA 2
PE Size (Mbytes) 4
Total PE 8681
Alloc PE 8681
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0


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
Victor Fridyev
Honored Contributor

Re: VG in shared mode. ??

Hi,

It's not so clear what "shared mode" means.
In any case, in order to see vg status, run:

#>vgdisplay vgname |grep Status

Status "exclusive" means the vg may be used in SG cluster as a shared vg, but can not be used simultaneously by more than one computer. (vgchange -c y vgname).

Status available means that the vg may be shared and used by more than one machine, as for ORACLE RAC.

HTH
Entities are not to be multiplied beyond necessity - RTFM
Mridul Shrivastava
Honored Contributor

Re: VG in shared mode. ??

If status is exclusive it can't be used on other node as this vg is exclusively for this node.

I am not sure but it should show shared if it is being activated in shared mode, you van try deactivating it and then activate it in shared mode using -a s option.

e Activate each specified volume
group and all associated physical
and logical volumes for exclusive
read-write access. The volume
group must be marked as part of a
high availability cluster, and the
availability software must be
running on the system; otherwise,
the volume group is not activated.

s Activate each specified volume
group and all associated physical
and logical volume for shared
read-write access. The volume
group must be marked as part of a
high availability cluster and
marked sharable; otherwise, the
volume group is not activated.

If any of the logical volumes in
the volume group are mirrored, and
if there are more than two systems
in the high availability cluster,
this volume group will not be
activated because HP MirrorDisk/UX
software is only supported in a
clustered environment with a
maximum of two nodes configured.
Time has a wonderful way of weeding out the trivial
rveri
Super Advisor

Re: VG in shared mode. ??

Hi,

I just wanted to reduce size of one LV and create another LV ,on that vg with the free PE/size.

While going through the man page of lvreduce found this :

# man lvreduce

...
"lvreduce cannot be performed if the volume group is activated in shared mode. "


Hence my question raised for shared mode option. Any more idea!

Thanks,

Chauhan Amit
Respected Contributor
Solution

Re: VG in shared mode. ??

Hello,

Reply is inline:

I just wanted to reduce size of one LV and create another LV ,on that vg with the free PE/size. While going through the man page of lvreduce found this :
# man lvreduce ..
"lvreduce cannot be performed if the volume group is activated in shared mode. "
Hence my question raised for shared mode option. Any more idea!

A) Looking at the above output I believe the vg14 is part of High Availability Cluster, that means a shared VG.

For a Normal VG , the output looks like
VG Status available

In your case it is showing VG Status available, exclusive

My Suggestion would be :
a)Take a downtime if it is a production system.
b) Take Backup of the LV which you want to change
c) Stop Application
c) Deactivate the Volume group from the Cluster Nodes:
#vgchange -a n /dev/vg14
d)Remove volume group from membership in the high availability cluster.
#vgchange -c n /dev/vg14
e)On this node give following command to activate VG
#vgchange -a y /dev/vg14
f)Change the LV Size
g)Deactivate VG
#vgchange -a n /dev/vg14
h)Mark volume group to be a member in the high availability cluster.
#vgchange -c y /dev/vg14

No additional Serviceguard specific steps are needed. The change is only done in the
LVM structures contained on the shared disks. Other nodes see the change
automatically, when they activate the VG.

Hope this helps.

-Amit
If you are not a part of solution , then you are a part of problem
Matthew Ghofrani
Regular Advisor

Re: VG in shared mode. ??

I know for certain that you can increase the LV size dynamicaly even in a ServiceGuard mode on the fly (because I have done so) but you can't do lvreduce.

Please correct me if I am wrong.

Matthew from Boston
Life is full of bugs

Re: VG in shared mode. ??

# vgdisplay -v vgora
--- Volume groups ---
VG Name /dev/vgora
VG Write Access read/write
VG Status available, shared, client
John Hall
Frequent Advisor

Re: VG in shared mode. ??

If a Volume Group (VG) is in shared mode a vgdisplay will look something like (notice the word "shared" on the VG Status line):

# vgdisplay vg05
--- Volume groups ---
VG Name /dev/vg05
VG Write Access read/write
VG Status available, shared, server
Max LV 255
Cur LV 212
...


When the "RAC extension" to MC/Serviceguard is installed the "-a s" option becomes available to activate the VG is shared mode:

vgchange -a s vg05
jhingoor
Frequent Advisor

Re: VG in shared mode. ??

Hi guys,

do you mean if there are 2 nodes in a cluster then both their volume groups i.e. vg00 should be shared right ? i.e. the status should be shared.....