1834800 Members
2784 Online
110070 Solutions
New Discussion

lvextend on shared vg

 
SOLVED
Go to solution
Rui Marreiros
New Member

lvextend on shared vg

does anybody knows if, with the latest LVM versions&patches, is it possible to extend a logical volume on a shared vg.
The goal is to precreate a few lv??s with only one PE and when oracle OPS will need a new datafile I??ll extend the lv to the desired size and use it as a new datafile.
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: lvextend on shared vg

Hi:

Yes, this should work. Assuming that the logical volume has been declared appropriately to the package control scripts, and that the volume group has been made known to all MC/ServiceGuard nodes, then when the logical volume is mounted, the new size will be deduced. That is, you can 'lvextend' (and 'extendfs' or 'fsadm' appropriately the filesystem) on your primary node.

Regards!

...JRF...
Rui Marreiros
New Member

Re: lvextend on shared vg

let me clarify on what I pretend to do:
Oracle Parallel Server implies that I use raw-device data-files, i. e., the lv??s on the shared vg are not mounted. Oracle allows , as you problably know to write directly to the raw device files. But on the other hand if you want to create a new lv ( to use as a new data-file) all the nodes in the cluster must be aware of it so after the creation you need to export( in one) and then import the vg in all the other nodes, and to do this you must de-activacte the vg which implies down-time to the database.
If I could extend a lv in the shared vg will all the nodes be aware of it ? If not ,this will not work.
the procedure would be like this:
after creating the vg , some lv??s , with say 10 M each , and doing
vgchange -S y -c y /dev/vgops
vgchange -a s vgops
lvextend -L 1000 /dev/vgops/lvol1

will I see this ?
node1 > lvdisplay /dev/vgops/lvol1
..
..
LV Size (MBytes) 1000
..
..
node2 > lvdisplay /dev/vgops/lvol1
..
..
LV Size (MBytes) 1000
..
..
???????
The thing is that I can??t try it since I??ve no
T&D cluster.
thanks in advance
melvyn burnard
Honored Contributor

Re: lvextend on shared vg

There should be no problem doing this, as extending an LV just changes the LVM info for the LV size on the discs in the VG. As the VG gets activated on one of the nodes, this will enable the LVM code to read the sizes for each LV from the discs.
As you will already have created and shared the VG/LV's etc, ther eshoulde be no more to do.

HTH
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Rui Marreiros
New Member

Re: lvextend on shared vg

I??m only worried with this excert of the on-line hp-ux manual:

http://docs.hp.com/hpux/onlinedocs/B2355-90691/00/00/4-con.html


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

Would the latest versions support it ?

or at least will it work ?

by the way I was not clear enough in the last message, obviously the vg -a y is performed in all the nodes inthe cluster

thanks in advance
melvyn burnard
Honored Contributor
Solution

Re: lvextend on shared vg

Ah, missed th efact this was actually SG OPS Edition.
If this is the case and the VG's are activated in shared mode, vgchange -a s mode, then the simple answer is no, you cannot lvextend the lv's while the VG is activated.
sorry for the misunderstanding.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!