Operating System - HP-UX
1826440 Members
3807 Online
109692 Solutions
New Discussion

Can't create vg02 after make_net_recovery clone to new server

 
SOLVED
Go to solution
Eric Bakken
Regular Advisor

Can't create vg02 after make_net_recovery clone to new server

Hello All,

I just cloned vg00 from one machine to another using make_net_recovery and Ignite.

Now that I'm trying to create vg02, It's finding old vg02 config data from the previous system. How do I get rid of that entry so I can recreate vg02 for the new system?

I believe the error was that the physical disk was not the same. I'd just like to delete these entries so I can start over. Thanks,

-Eric
14 REPLIES 14
James R. Ferguson
Acclaimed Contributor
Solution

Re: Can't create vg02 after make_net_recovery clone to new server

Hi Eric:

Given that you have freshly ignited the server, simply do:

# rm -r /dev/vg0[1-9]

Regards!

...JRF...
Eric Bakken
Regular Advisor

Re: Can't create vg02 after make_net_recovery clone to new server

Interesting... Before I do that, I notice that vg has all the filesystems still in there. Is there any way I can save that and just get vg02 to point to the new physical disk? Then activate vg02?
James R. Ferguson
Acclaimed Contributor

Re: Can't create vg02 after make_net_recovery clone to new server

Hi (again) Eric:

> Is there any way I can save that and just get vg02 to point to the new physical disk? Then activate vg02?

Well, yes. You said that you wanted to "...get rid of that entry so I can recreate vg02..." so I assumed that you wanted to begin from scratch.

If you want to take ownership of vg02 as it existed (or exists) on another server, use 'vgexport' the volume from the old server and 'vgimport' it into the new one.

Does vg02 still exist on the old server?

Regards!

...JRF...
Eric Bakken
Regular Advisor

Re: Can't create vg02 after make_net_recovery clone to new server

Yeah, This is actually a Disaster Recovery server so I want everything the same. The only differenct in hardware is that the sb40c storage blade has bigger disks in it. So the physical volume is bigger. I guess I'm not sure how vgexport works. I'll look into it now.
Eric Bakken
Regular Advisor

Re: Can't create vg02 after make_net_recovery clone to new server

Here is the Error when trying to activate vg02 without making any changes.

The command used to activate a volume group, /sbin/vgchange, has â â
â â failed while trying to activate vg02. The stderr error output from â â
â â â â the command is shown below. â â â â â
â Voâ â tedâ
â â â â vgchange: Warning: Couldn't attach to the volume group physical â â â â â
â â volume "/dev/dsk/c1t0d0": â â
â â Cross-device link â â
â â â â vgchange: Warning: couldn't query physical volume "/dev/dsk/c1t0d0": â â â â
â â â The specified path does not correspond to physical volume attached to â ^ â
â â â â â
â â â this volume group â â
â â â vgchange: Warning: couldn't query all of the physical volumes. â â
â â â vgchange: Couldn't activate volume group "vg02": â â
â â â Quorum not present, or some physical volume(s) are missing. â â
â â â â â
â â â â â
â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â
â â â [[ OK ]] â v â
â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â â
James R. Ferguson
Acclaimed Contributor

Re: Can't create vg02 after make_net_recovery clone to new server

Hi (again) Eric:

> This is actually a Disaster Recovery server so I want everything the same.

Well, you can't have a physical disk on two servers at once. You use 'vgexport' when you want to either permanently remove a volume group from a server; or you want to move it to another. You use 'vgimport' to gain ownership of a volume group that has been 'vgexport'ed.

Both 'vgexport' and 'vgimport' update the '/etc/lvmtab'. You must first 'vgchange -a n' to 'vgexport' and you must 'vgchange -a y' after a 'vgimport'.

Regards!

...JRF...
Eric Bakken
Regular Advisor

Re: Can't create vg02 after make_net_recovery clone to new server

Ok, well rather than complicate things, I'm just going to start from scratch.

I deleted /dev/vg02 however when I try to recreate vg02 I get this error:

pvcreate: The physical "/dev/dsk/c1t0d0" is already recorded in the "/etc/lvmtab" file.

Creation of the volume group vg02 failed.
James R. Ferguson
Acclaimed Contributor

Re: Can't create vg02 after make_net_recovery clone to new server

Hi (again) Eric:

> Ok, well rather than complicate things, I'm just going to start from scratch.

OK, to clean up, do:

# mkdir /dev/vg02
# mknod /dev/vg02/group c 64 0x020000
# vgchange -a n /dev/vg02
# vgexport /dev/vg02

This should cleanup the '/etc/lvmtab' and allow you to begin with a 'pvcreate', 'vgcreate', 'lvcreate', etc.

Regards!

...JRF...
Eric Bakken
Regular Advisor

Re: Can't create vg02 after make_net_recovery clone to new server

I think I just need to remove vg02 info from lvmtab.
James R. Ferguson
Acclaimed Contributor

Re: Can't create vg02 after make_net_recovery clone to new server

Hi Eric:

> I think I just need to remove vg02 info from lvmtab.

You do, BUT you can't edit a binary file, of which '/etc/lvmtab' is. See my last post.

Regards!

...JRF...
Roopesh Francis_1
Trusted Contributor

Re: Can't create vg02 after make_net_recovery clone to new server

check for any other unwanted VG in /etc/lvmtab.
#strings /etc/lvmtab.
otherwise you may face this same for other Vgs also.
Eric Bakken
Regular Advisor

Re: Can't create vg02 after make_net_recovery clone to new server

Ok, so I did as recommended and I was able to successfully create my vg02. Thanks for the help and I'll assign points shortly.

While I'm at it, is there any way to copy the config from my old server for filesystems and volumes to my new server or will I have to take the time to create them all manually? Thanks,

-Eric
James R. Ferguson
Acclaimed Contributor

Re: Can't create vg02 after make_net_recovery clone to new server

Hi (again) Eric:

> While I'm at it, is there any way to copy the config from my old server for filesystems and volumes to my new server or will I have to take the time to create them all manually?

Create the necessary logical volumes and filesystems. This is what is done during disaster recovery exercises where we Ignite servers. You can script the whole process ('pvcreate', 'vgcreate', 'lvcreate' and 'newfs') and having done so retain the script for reuse and/or as a template.

Regards!

...JRF...
Eric Bakken
Regular Advisor

Re: Can't create vg02 after make_net_recovery clone to new server

Ok, Done. Thanks for your Prompt Help. have a good weekend,

-Eric