1833750 Members
2884 Online
110063 Solutions
New Discussion

vgchange -a y hangs

 
Mick Hellstrom
Advisor

vgchange -a y hangs

I'm trying to move a disk from box A to box B. On A I did:

vgchange -a n /dev/vg01
vgexport /dev/vg01

shutdown, remove disk from A
add disk to B (hot-swap HA unit)

Then, on B:

ioscan -fC disk (new disk is visible)
mkdir /dev/vg08
mknod /dev/vg08/group c 64 0x080000
vgimport /dev/vg08 /dev/rdsk/c0t9d0
vgchange -a y /dev/vg08

And the vgchange never returns. Ever. The vgimport worked OK. It's created device files for all the logical volumes OK.

Any ideas?
6 REPLIES 6
Carsten Krege
Honored Contributor

Re: vgchange -a y hangs

The "vgchange -a y" is probably blocked on I/O (vgchange will try to read the LVM header of the disk). You can check this with glance (select process and check the wait state). In this case the process would not return until the I/O is completed and is waked up again. You also won't be able to kill the process.

You should install the latest LVM and SCSI kernel patches (+ their dependent patches), check your h/w (check syslog for SCSI bus resets, check termination and unique SCSI IDs) and retry.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Bill McNAMARA_1
Honored Contributor

Re: vgchange -a y hangs

I'm not sure, but I believe you use block device file for the vgimport. ie: /dev/dsk/

strings /etc/lvmtab
to ensure the vgimport worked okay.
you should see vg08 with the /dev/dsk/ of the disk you added.

ll /dev/*/group to ensure that the group maj no is unique.. and install the patches mentioned above.

It is strange seeing as the vgimport worked.
I would be suspicious of a wio and tend to finger an lvm bug before hw.. ioscan works, vgimport works.

To boot your system again, you may have to boot in maintenance mode, hpux -lm and then bring the vg's and filesystems up one by one until you get vg08 up and running..

Have a look around in /etc/lvmconf/ for anything on vg08 and list the contents of the conf file with vgcfgrestore -l

Later,
Bill
It works for me (tm)
Volker Borowski
Honored Contributor

Re: vgchange -a y hangs

I go with bill, and suspect a duplicate VG group id. Did you check

ls -l /dev/*/group

Somtimes VGs are not numbered (like vgdb, vgsap or some other names, which might even not begin with "vg"), so if you only checked vg you might have missed something.

Volker
Mick Hellstrom
Advisor

Re: vgchange -a y hangs

Carsten: It's not blocked on I/O, it's blocked on Socket. I can kill the process however.

There are some SCSI timeouts in the syslog, but they don't coincide with running the vgchange command.

The disk was hot-swapped into a jbod HA unit (can't remember part #). The previous disk worked fine so there's no scsi ID problem. If it was a termination problem, I'd expect to see problems with all the other disks on the bus - but there aren't any.

I'll check for the patches...

Bill: yep, it should have been /dev/rdsk. My typo. /etc/lvmtab shows the vgimport succeeding. The group id is unique.

There is a vg08 config file in /etc/lvmconf with old incorrect info. I don't think this is a problem because I also tried importing the disk into a new vgtmp, which did not have any data in /etc/lvmconf and it behaved the same.
Ovidiu D. Raita
Valued Contributor

Re: vgchange -a y hangs

Hi,

The procedure for moving a VG from one system to another is right. No doubt about it. It looks like a SCSI/hardware problem:
1. you have the same SCSI ID on two disks ( check the switches and make sure that they are fine).
2. the slot is bad. IF you have another empty one, try it.

Ovidiu
Simple solutions to complex problems
Mick Hellstrom
Advisor

Re: vgchange -a y hangs

Ovidiu, I think the slots are OK. I tried the disk in a couple of other unused slots and had the same problems. The machine in question is heavily loaded and when I tried putting the disk into a lighter loaded machine it worked fine.

Thanks for all your suggestions!