Operating System - HP-UX
1755560 Members
4142 Online
108835 Solutions
New Discussion юеВ

Re: creating lvol on a clustered vg

 
SOLVED
Go to solution
rvent
Frequent Advisor

creating lvol on a clustered vg

I am also trying find out how to create a lvol in a clustered vg.

EX: vg01 has lvol1, lvol2 and i want to add lvol3, lvol4, lvoln+1

What are the steps involved...?

Would i have to:
vgchange -a e /dev/vg01
lvextend -L 200 -m 1 /dev/vg01
vgexport -p -v -s -m vg01.map /dev/vg01
rcp vg01.map server2:/root/vg01.map

??

then on the second node (which the vg01 already exists with lvol1 and lvol2):
i am stock here...?

vgimport wont work since it complaints that vg01 already exist on lvmtab

Would i have to recreate vg01..? i know it is practical to do this, but would it work...?


Thanks
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: creating lvol on a clustered vg

First, you don't use lvextend to create LVOL's; you use lvcreate. Essentially, you run lvcreate on your active node to make your new LVOL's. If you want to mirror the LVOL's or extend an existing LVOL then you run lvextend. Next on your active node, do a vgexport -m /tmp/vg01.map -p -s /dev/vg01.
Next vgchange -a n your VG on the active and copy /tmp/vg01.map to the other node. Next, on the other node, vgexport /dev/vg01, mkdir /dev/vg01, mknod /dev/vg01/group c 64 0x010000 (assuming that minor device number 0x010000 is unique on the other node) and vgimport -s /tmp/vg01.map -s -v /dev/vg01. You can now activate the VG on the other node using -a e.
If it ain't broke, I can fix that.
rvent
Frequent Advisor

Re: creating lvol on a clustered vg

yeha i meant lvcreate... :)

But the vg01 already exist on the second node...? Would that make a difference...?

the mkdir and mknod wont work since they are already there, correct..?

Thanks
A. Clay Stephenson
Acclaimed Contributor

Re: creating lvol on a clustered vg

Notice that I said do a vgexport before I ever mentioned mkdir/mknod. Vgexport not only removes the lvmtab entries but also removes the /dev/vgxx directory and everything below it.
If it ain't broke, I can fix that.
nanan
Trusted Contributor

Re: creating lvol on a clustered vg

Hi rvent

you have to vgexport after then vgimport again with changed lvol map of the first node.

did you complete cluster compile?
could you let me know what was the root cause ?

Regards
nanan
freddy_21
Respected Contributor

Re: creating lvol on a clustered vg

Helo,

Your step already correct.
vgchange -a e /dev/vg01
lvextend -L 200 -m 1 /dev/vg01
vgexport -p -v -s -m vg01.map /dev/vg01
rcp vg01.map server2:/root/vg01.map

at server 2, you must export/remove all configuration at vg01.
1.deactivate vg01 at server2
2. vgexport vg01 ( remove conf vg01 from lvmtab )
3. mkdir /dev/vg01
4. mknod /dev/vg01/group c 64 0x010000
5. vgimport -v -s -m /root/vg01.map vg01

it will work. you cant change vg configuration if you not remove first

but dont forget add your new lv at package control file.

Thanks
freddy


rvent
Frequent Advisor

Re: creating lvol on a clustered vg

Thanks for your help...

nanan the cluster works fine, but i am unable to apply any new configurations, it comes back with the error on my other post.. So to answer your question i havent been able to get it to work..

On this topic ( lvol )

i am getting a unable to deactivate vg01. Device busy when i do vgchange -a n vg01

so i read that i had to mark it unshareable and mark not cluster aware so i do:
vgchange -S n vg01 = it says i need to deactiva it first

vgchange -c n vg01 = Unable to complete because of how it is configured....



Thanks for all your help
siva baskaran
Regular Advisor

Re: creating lvol on a clustered vg

hi
to all
if it is clustered vg all u means M/C service gaurd clustering correct if am i correct? how will it work i mean how can u vgexport unless by use clust.conf file

my point is wrong?.........

thanks
siva
nanan
Trusted Contributor

Re: creating lvol on a clustered vg

Hi
you seem to be confused of the meanig of vgexport.
It is posible for you to be in that but you can do vgexport on deactive vgs even cluster vg, don't you?

Really If the cluster vg is in shared mode. it is not allow to export vgs but in exclusive mode it is different thing because the vgs are just active status on a side node and deactive statuse on the other side node.
so we can headle the lvextend remove on cluster vgs in active mode exclusivly.
and then we can export the vgs to import changed information into the other node.

Regards
nanan