Operating System - HP-UX
1748255 Members
3879 Online
108760 Solutions
New Discussion юеВ

Re: error when running vgchid

 
Reinhardt
Occasional Advisor

error when running vgchid

Hello,

Using Hitachi ShadowImage, I created a snapshot consisting of 12 disks that I am trying to import on a different server.

The first thing I do is run the vgchgid command like this:

vgchgid /dev/rdsk/c12t6d1 /dev/rdsk/c12t6d2 /dev/rdsk/c12t6d3 /dev/rdsk/c12t6d4 /dev/rdsk/c12t6d5 /dev/rdsk/c12t6d6 /dev/rdsk/c12t6d7 /dev/rdsk/c12t7d0 /dev/rdsk/c12t7d1 /dev/rdsk/c12t7d2 /dev/rdsk/c12t7d3 /dev/rdsk/c12t7d4

but I get the following error: physical volume "/dev/rdsk/c12t6d1" and "/dev/rdsk/c12t7d1" do not belong to the same volume group.

I have confirmed that the disks that these were mirrored from were, in fact, part of the same volume group.

Any ideas on how to resolve this error?

Thanks.
6 REPLIES 6
Rita C Workman
Honored Contributor

Re: error when running vgchid

Well, it is possible that the following applies:

"If a disk is newly added to an existing volume group and no subsequent LVM operations has been performed to alter the structures (in other words, operations which perform an automated vgcfgbackup); then it is possible a subsequent vgchgid will fail. It will report that the disk does not belong to the volume group...."

Got that from the handy manpage.

It also says:"...This may be overcome by performing a structue changing operation on the volume group (for example, using lvcreate)."

Now I probably wouldn't do lvcreate, but I might, on that separate server run vgchange -a n /dev/vg and vgchange -a e /dev/vg, and then maybe even throw in a vgcfgbackup for the heck of it...then give it a shot.
BUT....if it's on a different server and these disks will never mount on the primary server I might NOT even change the vgid. I might just go ahead and import them using the -f (use this file with the /dev/dsk/c-t-d- listing them in one continual line) like this:

vgimport -v -m /etc/lvmconf/vgmapfile -f /path/file-with-ctd /dev/vgname

Just a thought,
Rita
Reinhardt
Occasional Advisor

Re: error when running vgchid

Thanks for the reply.

The disk that I am working with is not being added to an existing volume group. It is effectively new disk that will be imported to a newly created VG on the new server.

This is procedure I am following and it has worked on two different test servers:

snapshot the disk from the original server
vgchid the disks
create a volume group
vgimport the disks into the VG using a map file from the original server
vgchange the VG
fsck the VG
mount the LVs

In this case changing the IDs fails.

I also tried skipping the vgchid and went right to creating the VG and importing the disk and that didn't work either. Again the error was that the physical volumes are not part of the same VG.
Rita C Workman
Honored Contributor

Re: error when running vgchid

I do similar when I mirror/split disk using EMC technology. But when I go to mount them I don't bother with vgchid. As I said I just create the vg and import using the -f option.

Attached is a quick script that you could run against each disk to confirm if in fact the vgid is the same. Possibly something didn't mirror/sync properly.

Hope this helps,
Rita
Reinhardt
Occasional Advisor

Re: error when running vgchid

Thanks, I was wasn't sure how to designate the disk, but I don't think I got it right.

Here's what I tried and the results:


#./test.sh /dev/dsk/c12t7d1
/dev/dsk/c12t7d1 pvid = vgid =
venetian:/home/roote
#./test.sh /dev/rdsk/c12t6d4
/dev/rdsk/c12t6d4 pvid = vgid =

chris huys_4
Honored Contributor

Re: error when running vgchid

Hi Reinhardt,

Are you sure hp-ux supports hitachi's shadowimage ?

If it is log a call with HP support. (and get HP supports "lvminfo" tool, which is able to read out the complete lvm header of a certain disk in "ascii" version.)

Greetz,
Chris
Reinhardt
Occasional Advisor

Re: error when running vgchid

Thanks, Chris. I'm pretty sure it's supported because we're using the HP-UX version of ShadowImage.

Contacting HP support is my next step.

Also, thanks for the info on the "lvminfo" tool.