Operating System - HP-UX
1834640 Members
2969 Online
110069 Solutions
New Discussion

Lost vg02 after swapping servers

 
SOLVED
Go to solution
Trevor McLachlan
Occasional Contributor

Lost vg02 after swapping servers


I have lost a volume group after swapping servers. I basically swapped out an L1000 server with a L2000 server, by plainly taking the disks out of one and putting into the other. This worked fine as in everything booted up ok, all the disks are known to the server etc, but I cannot see volume group vg02 for some reason. This is what I get when trying to display it -

# vgdisplay -v vg02
vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "vg02".

Why did this not come back up and what do I do to activate it again.

Thanks
Trev

8 REPLIES 8
Nigel Green
Advisor

Re: Lost vg02 after swapping servers

Have you tried activation the volume group

vgchange -a y /dev/vg02

Hilary
James R. Ferguson
Acclaimed Contributor

Re: Lost vg02 after swapping servers

Hi Trevor:

You haven't lost anything. Simply 'vgimport' the volume group:

# mkdir /dev/vg02
# mknod /dev/vg02/group c 64 0x020000
# vgimport vg02
# vgchange -a y vg02

Have a look at the man pages for 'vgexport' and 'vgimport' for more information.

Regards!

...JRF...
Luc Bussieres_1
Trusted Contributor
Solution

Re: Lost vg02 after swapping servers

From what you have done I suspect that the instance number of your disks could have changed. I would suggest that you execute: "strings /etc/lvmtab" to find which disks where part of vg02. And then try to find them in the output of "ioscan -fnC disk" you will probably not find them anymore.

To solve the problem you need to export and reimport your VG using the VGID (parameter -s) so during the import the system will scan all the disks attach to it to retrieve the correct disks:


ll /dev/vg02/group
====> note the minor number (could be 0x020000)
vgexport -s -m /tmp/vg02 vg02
mkdir /dev/vg02
mknod /dev/vg02/group c 64 0x020000
====> use the minor number that you have noted instead of 0x020000
vgimport -s -m /tmp/vg02 vg02
vgchange -a y vg02

regards
James R. Ferguson
Acclaimed Contributor

Re: Lost vg02 after swapping servers

Hi (again) Trevor:

Sorry, I forgot to add the pv_path to the 'vgimport', for example:

# vgimport -v /dev/vg02 /dev/dsk/cXtYdZ

Note that I also enabled the 'v'erbose messages. I presume that you never did a 'vgexport' from the old server and therefor do not have mapfiles, so I have not used this syntax. In the absence of 'mapfiles', logical volume names are created using the default naming convention 'lvolNN' where 'NN' us the logical volume minor number.

Regards!

...JRF...
Trevor McLachlan
Occasional Contributor

Re: Lost vg02 after swapping servers


Hi All,

Thanks for your responses. I still have the device link to vg02, so I don't think I have to do the mkdir, mknod and vgimport commands or do I ???? I am thinking just the vgchange command will fix it ?

# ls -lad /dev/vg02
drwxrwxrwx 2 root sys 1024 Apr 26 16:13 /dev/vg02

Will just the vgchange command work here ?

Thanks
Trev

James R. Ferguson
Acclaimed Contributor

Re: Lost vg02 after swapping servers

Hi (again) Trevor:

If you physically moved the disk(s) from one server to another, it is quite likely that the physical path changed. In that case, you need to 'vgimport' as indicated, using the new path.

If you have the appropriate directory and group files, then yes, you may skip that part.

If a 'strings /etc/lvmtab/' does, in fact show your vg02 associated with the correct physical path(s), then, yes, try 'vgchange -a y vg02'.

Regards!

...JRF...
Luc Bussieres_1
Trusted Contributor

Re: Lost vg02 after swapping servers

Trevor,

If the instance number of your disks have changed.. this will impact the device name of your disks: /dev/dsk/c?t?d?. So you could try the vgchange if you want it won't hurt you but look at the output of the command and if your disks are not present you have to follow the previous set of commands I have given to you.

These commands will first remove the current definition that your dsystem knows for vg02 (vgexport) then will reimport correctly these informartion using the new device names.

Regards
Trevor McLachlan
Occasional Contributor

Re: Lost vg02 after swapping servers

Thanks everyone for your help. Problem now solved :)

I did everything that Luc mentioned from the vgexport down, just to make sure, and /dev/vg02 is again activated.

Thanks alot all
Trev