1753288 Members
5465 Online
108792 Solutions
New Discussion юеВ

vgchgid missed one disk

 
aruns_s
Frequent Advisor

vgchgid missed one disk

Hi,

Suppose I have 3 disks c0t0d0, c0t0d1, and c0t0d2 all with the *same* VGID.

I then run:
# vgchgid /dev/rdsk/c0t0d0 /dev/rdsk/c0t0d1
(notice I *accidentally* skipped the third disk!)

How would I fix this so that all 3 disks have the same VGID again?

I'm looking for step-by-step list of commands that would fix this...

Thanks.
7 REPLIES 7
sujit kumar singh
Honored Contributor

Re: vgchgid missed one disk

hi the clear approach should be as follows:

1)if the vg is activated , umount all the fs of this vg, deactivate,export and again run a vgchgid including all the disks.
export the activated vg
mkdir /dev/vgXX
mknod /dev/vgXX/group c 64 0xYY0000
vgimport


regards
sujit
Johnson Punniyalingam
Honored Contributor

Re: vgchgid missed one disk

Hi Arun,

Step1:- umount all the File system
(Example :-

# umount /abc

step2:- deactivate the Volume Group
(Example:-
# vgchange -a n /dev/vg01

step3:- VGID "including all 3 disks"

# vgchgid -f /dev/dsk/ /dev/dsk/ /dev/dsk/

step4 :-

# vgexport vg01
- mkdir /dev/vg00
- mknod /dev/vg00/group c 64 0x0
- vgimport /dev/vg00 /dev/dsk/ /dev/dsk/ /dev/dsk/

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
aruns_s
Frequent Advisor

Re: vgchgid missed one disk

When I get to the vgchgid part:

# vgchgid -f /dev/rdsk/c0t0d0 /dev/rdsk/c0t0d1 /dev/rdsk/c0t0d2
vgchgid: physical volume "/dev/rdsk/c0t0d0" and "/dev/rdsk/c0t0d2" do not belong to the same volume group.

The suggestion does not work :-(

Any other ideas for making the VGIDs all the same?
Johnson Punniyalingam
Honored Contributor

Re: vgchgid missed one disk

could u mention the exact command?

vgdisplay -v
ioscan -fnC disk

Looks like your commands picks the source disks too..

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
aruns_s
Frequent Advisor

Re: vgchgid missed one disk

Step-by-step:

1. System A has three disks c0t0d0, c0t0d1, and c0t0d2 in a Volume Group "tempvg"

2. System A we ran "vgexport tempvg" to export these three disks to another system

3. The three disks are then attached to an identical system called System B

4. Ioscan on System B shows c0t0d0, c0t0d1, and c0t0d2 as expected.

5. The three disks have the same VGID (as expected) and confirmed via the command mentioned here http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1264756

6. We accidently run "vgchgid c0t0d0 c0t0d1" which executes okay.

7. Now c0t0d2 has the old VGID, whereas, c0t0d0 and c0t0d1 have the new VGID.

8. We try "vgchgid -f c0t0d0 c0t0d1 c0t0d2" but it fails with the error message mentioned in my previous post before.

So I cannot import the disks into a volume group on System B, since the VGID's are different.

Anyone experience this before?
VK2COT
Honored Contributor

Re: vgchgid missed one disk

Hello,

On-line manual vgchgid(1M) is talking about
it:

QUOTE
If a disk is newly added to an existing
volume group and no subsequent LVM
operations has been performed to alter the
structures (i.e., operations which perform
an automated vgcfgbackup(1M)); then it is
possible a subsequent vgchgid will fail. It
will report that the disk does not belong to
the volume group. This may be overcome by
performing a structure changing operation on
the volume group (for example, using
lvcreate).
END QUOTE

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Sani
Frequent Advisor

Re: vgchgid missed one disk

Hi Arun ,

Can you try the following ,

1) Do a 'vgcfgrestore' on all the 3 disks.
2) 'vgchgid' on all the 3 disks.
3) try to import the vg.

Regards
Sani