Operating System - HP-UX
1847288 Members
2698 Online
110263 Solutions
New Discussion

vgchgid on the wrong disk

 
SOLVED
Go to solution
Dave Wherry
Esteemed Contributor

vgchgid on the wrong disk

Due to a typo in a script, this is what I think I did.
I have a set of 40 disks/LUNs on an XP256 in a volume group. I created a Business Copy of these LUNs. After splitting the BC pairs I attempted to do a vgchgid on the 40 target LUNs. I think, because of a typo in my script, I did vgchgid on 39 of the targets and 1 of the source LUNs.
I had problems with the vgimport of the targets so I did a pairresync and pairsplit to start over. I made some changes to my vgchgid script and tried again. I now get the following error:
vgchgid: Couldn't open physical volume " ":
No such file or directory
./changid.sh[34]: /dev/rdsl/c7t3d2: cannot execute

c7t3d2 does exist. I can do a diskinfo and pvdisplay on it and it responds. I think it's source LUN is the 1 I accidentally changed. So now it does not match the volume group id of the other 39 LUNs.

I'm not concerned about the targets. I can always resync them. I'm concerned about that 1 odd ball LUN in my source LUNs. Will this cause me problems later on? When this system is rebooted will there be a problem with that volume group because all of the LUNs do not have the same vgid?
Can I query each individual LUN and find out the vgid?
Can I safely reset all of the vgid's on these source LUNs?
Is vgcfgrestore my answer?

This is my production database and I have to be very carefull with it.

Thanks.
8 REPLIES 8
Steven Sim Kok Leong
Honored Contributor

Re: vgchgid on the wrong disk

Hi,

There appears to be a typo:

./changid.sh[34]: /dev/rdsl/c7t3d2: cannot execute

It should be rdsk not rdsl. Check out whats on line 34 of changid.sh.

Hope this helps. Regards.

Steven Sim Kok Leong
Dave Wherry
Esteemed Contributor

Re: vgchgid on the wrong disk

Steven,
Just another typo here. In my script it is rdsk. It's been a long week. I simply can't type anymore.

Dave
Steven Sim Kok Leong
Honored Contributor

Re: vgchgid on the wrong disk

Hi,

What's on line 34 on the script?

Hope this helps. Regards.

Steven Sim Kok Leong
Dave Wherry
Esteemed Contributor

Re: vgchgid on the wrong disk

This is the section of the script that is giving me the problem.

vgchgid /dev/rdsk/c7t3d0 /dev/rdsk/c9t3d0 /dev/rdsk/c2t3d0 /dev/rdsk/c5t3d0 \
/dev/rdsk/c7t3d2 /dev/rdsk/c9t3d2 /dev/rdsk/c2t3d2 /dev/rdsk/c5t3d2
/dev/rdsk/c7t3d4 /dev/rdsk/c9t3d4 /dev/rdsk/c2t3d4 /dev/rdsk/c5t3d4
/dev/rdsk/c7t3d6 /dev/rdsk/c9t3d6 /dev/rdsk/c2t3d6 /dev/rdsk/c5t3d6
/dev/rdsk/c7t5d5 /dev/rdsk/c9t5d5 /dev/rdsk/c2t5d5 /dev/rdsk/c5t5d5
/dev/rdsk/c7t5d7 /dev/rdsk/c9t5d7 /dev/rdsk/c2t5d7 /dev/rdsk/c5t5d7
/dev/rdsk/c7t6d0 /dev/rdsk/c9t6d0 /dev/rdsk/c2t6d0 /dev/rdsk/c5t6d0
/dev/rdsk/c7t6d2 /dev/rdsk/c9t6d2 /dev/rdsk/c2t6d2 /dev/rdsk/c5t6d2
/dev/rdsk/c7t6d6 /dev/rdsk/c9t6d6 /dev/rdsk/c2t6d6 /dev/rdsk/c5t6d6
/dev/rdsk/c7t6d3 /dev/rdsk/c9t6d3 /dev/rdsk/c2t6d3 /dev/rdsk/c5t6d3


Each lvol in the volume group consists of 4 LUNs. I simply have each of those 4 LUNs grouped on a line for readability. The 2nd line here is the 34th line in the script. You can see that /dev/rdsk/c7t3d2 is in there correctly.
Later in the script I have another section just like this for another volume group and it works fine which leads me to believe it is not a syntax problem.
Steven Sim Kok Leong
Honored Contributor
Solution

Re: vgchgid on the wrong disk

Hi,

I think I know why.

vgchgid /dev/rdsk/c7t3d0 /dev/rdsk/c9t3d0 /dev/rdsk/c2t3d0 /dev/rdsk/c5t3d0 \
/dev/rdsk/c7t3d2 ...

Your \ character has additional spaces behind. Thus, your script executed /dev/rdsk/c7t3d2 as a command.

Try removing the \ character and put everything on the same line as vgchgid.

Hope this helps. Regards.

Steven Sim Kok Leong
Dave Wherry
Esteemed Contributor

Re: vgchgid on the wrong disk

Steven,
You did it again! It was an extra space at the end of the first line.
Sorry for the way it posted. I cut and pasted and it lost the carriage return/line feeds. It should really be 10 different lines with a continuation at the end of the first 9.

Thank you very much.

Dave
Kimberly Ann
Honored Contributor

Re: vgchgid on the wrong disk

Hi Dave,

I edited your post by placing carriage returns in the long string you had posted...this brings the page back into normal viewing area. I hope I placed the returns in the proper place....let me know if I didn't!

Thanks,
Dan
Dave Wherry
Esteemed Contributor

Re: vgchgid on the wrong disk

Dan,
You fixed it just right. So much easier to read now. Thanks.