Operating System - HP-UX
1838127 Members
3136 Online
110124 Solutions
New Discussion

Migrating a volume group to different controller

 
suri_1
Occasional Contributor

Migrating a volume group to different controller

Hi All,

We have a rp2470, with an Internal 4Si RAID controller and a DS2100 with 4 disks connected to channel 0 of the RAID controller.
All the four disks are configured as LUN0 and part of volume group vg02.

The channel 0 has gone bad and I need to migrate the vg02 to another channel. Can somebody give me a solution, preferably without taking backup and start from scratch?

Posted the same query in the forum "disk arrays" without any success.

Thanks for the help in advance
suri
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: Migrating a volume group to different controller

Can't you just vgexport, reconnect to the new channel and vgimport?

vgchange -a n /dev/vg02
vgexport -s -m /tmp/vg02map /dev/vg02
switch channels
mkdir /dev/vg02
mknod /dev/vg02/group c64 0x020000
vgimport -s -m /tmp/vg02map /dev/vg02
vgchange -a y /dev/vg02


Pete

Pete
Michael Steele_2
Honored Contributor

Re: Migrating a volume group to different controller

Mirror via LVM or create a new vg, lv's, file system mount points and copy the data over.

With the mirroring as long as the luns are of same size, no problem. Then just vgextend and lvextend.
Support Fatherhood - Stop Family Law
suri_1
Occasional Contributor

Re: Migrating a volume group to different controller

Pete,

The problem is that since channel 0 has gone bad, none of the disks are accessible through that channel. irdiag shows the disks as FAILED. Hence the LUN is OFFLINE.
In that case can I vgexport?
Also using irm I can see that the LUN0 disks are all FAILED.
So don't I have to do some config on the RAID controller also?
Sorry if the Q's seem silly, but I haven't worked with RAID controllers before.

Micheal,

As I mentioned above, the disks are not accessible in the first place, so how do I mirror etc?

Thanks guys for ur replies.
Kindly help me out.

Suri.
Pete Randall
Outstanding Contributor

Re: Migrating a volume group to different controller

Suri,

Try a vgexport in preview mode first.

vgexport -p -s -m /tmp/vg02map /dev/vg02



Pete

Pete
Stuart Abramson_2
Honored Contributor

Re: Migrating a volume group to different controller

You should be able to use the vgexport/vgimport scheme outlined above. You may not be able to do the vgexport -s -m mapfile, because the system needs to read the VGDA of the disk to get the VGID to put in the mapfile.

But at the very least you can just connect up the disk on the new fibre card (scsi card) and do a vgscan and vgimport. Go back to old ioscans/lvmtabs and write down the disks that were part of the VG before, so you know what you are looking for.

But here is the thing: If you went to the expense and trouble to buy highly available RAID disks, then you SHOULD HAVE CONFIGURED THEM ON TWO PATHS. Then you would still be in business today. You could run on one path, connect up the new 2nd path, add access to the new path, remove access from the down path, and never take an outage.
Pete Randall
Outstanding Contributor

Re: Migrating a volume group to different controller

The obvious question that comes to mind is "Why not get the RAID controller fixed?"


Pete

Pete
suri_1
Occasional Contributor

Re: Migrating a volume group to different controller

Pete/Stuart,

Thanks for your suggestions.
Actually I inherited the machine from another location and the moment I connected everything & booted the machine I encountered this problem.
I called up HP support and he applied patch PHSS_27098 and then using irm forced the disks to ONLINE and rebooted when connected to channel 0 which I presumed was bad.
So now the array is accessible. Now I failed to understand why this has gone to FAILED mode and why this solution works.

Anyway I presume your solution also works. Unfortunately I cannot test your solutions since this machine is a production machine.

But thanks a lot for giving me options just in case I had to do it.

sincerely
suri.
Sunil Sharma_1
Honored Contributor

Re: Migrating a volume group to different controller

Hi Suri,

Sometime because of unproper shutdown of disk Array like before shutting down the server if you swith of the disk array, system will take it as a disk fail and when you restart array it mark disks as offline/failed. You have to use forced option and make it online.

I think this is a known problem for HP storage I faced similar kind of problem with FC-60 and SC-10 storage previously.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Brian M Rawlings
Honored Contributor

Re: Migrating a volume group to different controller

Suri: It sounds like you are back up and operational, so this may or may not be needed or helpful. But, just in case...

1> You should be able to do a vgexport, without the map file (-m) option. This will remove the VG info from /etc/lvmtab, and will remove the /dev/vg02 directory and special files. As someone pointed out, you can't use the -m map file option, if you can't access the VGRAs on the PVs in the VG.

2> Once you move the drives to a different channel, you would use the 'vgscan' command to cause LVM to find any unknown VGs, and add them to /etc/lvmtab. Then manually create the /dev/vg02 dir, and use 'mknod' to create the group file. Now 'vgimport' will work as noted above to assign the PVs in the VG to their new channel, one that the system can use.

3> If you aren't familiar with these commands, be sure and read the man page for each, there are some things to be aware of when you use them. The HP support desk would also be helpful, if you needed them, since this process and all these commands are fully supported for stuff like this.

4> Your issue is the reason I tend to avoid the 4Si raid cards... you only get data protection, not channel duplication or access protection. There are several single points of failure, which I find unacceptable for my HA RAID storage. I prefer, and recommend, a full-boat, real raid enclosure, with dual controllers, channels, etc. I realize that you were 'blessed' with this little beauty, I only mention this for any future storage purchases over which you may have control or input.

'Nuf said. Best Regards, --bmr
We must indeed all hang together, or, most assuredly, we shall all hang separately. (Benjamin Franklin)