Operating System - HP-UX
1832233 Members
2646 Online
110041 Solutions
New Discussion

Changing Minor number of VG

 
SOLVED
Go to solution
Shibin_2
Honored Contributor

Changing Minor number of VG

Hi,

Can we change the minor number of VG, without removing the VG ?

Scenario is, I have created a VG of 400GB size in a cluster environemnt. When try to import it on another node, the same minor number, which I used for this VG, is using by another VG in that node.

If possible to change the Minor number without removing, that would be greatful. Otherwise, I have to recreate the whole thing.

Thanks in advance
Regards
Shibin
16 REPLIES 16
Shrikant Lavhate
Esteemed Contributor

Re: Changing Minor number of VG

Hi,

Yes you can do it bu renaming VG. Whole procedure goes this way:


1) Umount file systems
2) vgchange -a n ----to deactivate vg
3) vgexport -m -s -----export configs

4) mkdir /dev/vgNEW
5) mknod /dev/vgNEW/group c 64 0x020000 ----- chk minor numbers r in (Here you can use other minor number)
use or not bu ll /dev/vg*/group
5) vgimport -m -s /dev/ ----- with new name
6) vgchange -a y
7) mount FS

-=ShRi=-
Will it remain a personal, if I broadcast it here!
Robert-Jan Goossens_1
Honored Contributor

Re: Changing Minor number of VG

Hi,

I'm not sure I understand your question. Would you like to change the minor online, while the VG is active?Then the answer in NO, you will need to vgexport/vgimport the VG.

# vgchange -a n /dev/vgxx
# vgexport -m /tmp/vgxx.map /dev/vgxx
# rm /dev/vgxx/group
# mknod /dev/vgxx/group c 64 0x0z0000
change the z
# vgimport -m /tmp/vgxx.map /dev/vgxx
# vgchange -a y /dev/vgxx

Hope this helps,
Robert-Jan
Shibin_2
Honored Contributor

Re: Changing Minor number of VG

Hi Shri,

Thanks for the quick response.

What if, I don't want to change the name of the VG ? Because, we have some standards and to keep this standard.

The pain is, I don't want to recreate, as it has total 16disks with it's PV Links.
Regards
Shibin
Shibin_2
Honored Contributor

Re: Changing Minor number of VG

Hi Robert,

I will try this option.

I just created the VG. There is no data in it. But, the FS to be in cluster, so I need to replicate the same to other node. For the replication, I need to export this VG from this node and import it to another. When the importing stage, I found, the same minor number is using by some other VG and those are not part of cluster. Only local usage.

Anyway, I will try this option and come back to you guys.
Regards
Shibin
Shrikant Lavhate
Esteemed Contributor

Re: Changing Minor number of VG

Interesting!
You are asking to bypass main thing for which whole thing meant for.....

Anyways I never tried like this as you said. But it should work I guess.

-=ShRi=-
Will it remain a personal, if I broadcast it here!
Shibin_2
Honored Contributor

Re: Changing Minor number of VG

One more question, if I use the command

#rm /dev/vgxx/group

as said by Robert, will it remove the Minor number ??

Then, the Robert's option would be successful.
Regards
Shibin
Shrikant Lavhate
Esteemed Contributor

Re: Changing Minor number of VG

yes.
Infact if you see same method is explained in both replies !!!
Will it remain a personal, if I broadcast it here!
Shibin_2
Honored Contributor

Re: Changing Minor number of VG

Sorry to ask one more question.

Can I change the Max LV parameter, if the VG is not active ?
Regards
Shibin
Shibin_2
Honored Contributor

Re: Changing Minor number of VG

Sorry to ask one more question.

Can I change the Max PV parameter, if the VG is not active ?
Regards
Shibin
Robert-Jan Goossens_1
Honored Contributor
Solution

Re: Changing Minor number of VG

Hi again,

not sure what OS version you are running, bute have a look at this doc (11i v2 + v3 )

http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01920387/c01920387.pdf (BSC link updated by admin)

Regards,
Robert-Jan
Shibin_2
Honored Contributor

Re: Changing Minor number of VG

Hi Robert,

Many thanks. I will do the changes and give you all the details, what I have done and how done. That may useful to anybody for future reference.


Cheers
Shibin
Regards
Shibin
Sajjad Sahir
Honored Contributor

Re: Changing Minor number of VG

# vgchange -a n /dev/vg03
# vgexport -m /tmp/vg03.map /dev/vg03
# rm /dev/vg03/group
# mknod /dev/vg03/group c 64 0x030000

# vgimport -m /tmp/vg03.map /dev/vg03
# vgchange -a y /dev/vg03
I put 03 instead of xx
adn 03 for volume number

ok
dear Robert
i am asking u then what is the new minor number here ???????
Sajjad Sahir
Honored Contributor

Re: Changing Minor number of VG

# vgchange -a n /dev/vg03
# vgexport -m /tmp/vg03.map /dev/vg03
# rm /dev/vg03/group
# mknod /dev/vg03/group c 64 0x030000

# vgimport -m /tmp/vg03.map /dev/vg03
# vgchange -a y /dev/vg03
I put 03 instead of xx
adn 03 for volume number

ok
dear Robert
i am asking u then what is the new minor number here ???????

Sajjad Sahir
Honored Contributor

Re: Changing Minor number of VG

shibin
u are working on clustering environment u have two nodes also don't change minor number it is a wrong procedure.

what do u want to do actullay please give
complete details
i think u need to make some changes on slvm
am i right
then i can give u complete procedure how to do it
sajjad

Shibin_2
Honored Contributor

Re: Changing Minor number of VG

Hi Shri and Robert,

Many thanks to you guys... Unfortunately, in my box, the patches for Vgmodify was not installed. So, I had to delete LV, VG and recreated it.

The document, which Robert given was very good. I had tested it on my test server (version 11iv3) and successfully worked.

Sajjad,

You may go through the querry, you can understand, what I really needed.

Guys, thanks for the help and sorry for the delayed response and closure.
Regards
Shibin
Sajjad Sahir
Honored Contributor

Re: Changing Minor number of VG

I went thorough
u understand one thing, if u are going to change u minro number, in order that u exporting u volume group also
that means u removing u volume and creating new one i mean wiht new name which i meant.