LVM and VxVM

Recreate/remount an unknown volume

 
Kim Kendall
Regular Advisor

Recreate/remount an unknown volume

I've been given a Mylex tower of disks, 2 busses, 3 drives on each bus. Once upon a time, they were supposed to have been mounted up on a 715, unfortunately, the 715 doesn't exist, and I'm not sure yet if any backups of it does either.

Now I've been asked to get the disks mounted back up and recreate an environment that I don't know anything about! (this is an environment from a company that was aquired by ours long before I came on board!

Right now, I can only guess... maybe each set of drives were a raid 5 group, but I don't know if it was broken into multiple LUN's. Is there a way to scoop any of that info off the drives? ...maybe with dd?
8 REPLIES 8
Kim Kendall
Regular Advisor

Re: Recreate/remount an unknown volume

PS - the second set of drives could also be a mirror if the first volume was a jbod...
Volker Borowski
Honored Contributor

Re: Recreate/remount an unknown volume

Hi,

vgscan and pvdisplay should give you a first overview.
Read vgscan-manpage carefully !

Is the OS-Release of the vanished 715 known ?
Would be bad if no LVM has been in use before ....

Good luck
Volker
Jeff Schussele
Honored Contributor

Re: Recreate/remount an unknown volume

Hi Kim,

This will be no easy task & I believe you are correct i.e. the best & possibly only way to do this is with dd.
Assuming the system sees the PVs or LUNs & the devices have been created, you could do something like
dd if=/dev/rdsk/cXtYdZ of=/tmp/cXtYdZ.out bs=1k count=64

Then analyze the output for clues as to just what VG/LV structure existed. You may need to increase that count depending on just what the PE size was as LVM uses the entire 1st PE to hold the VG info.
I don't know of any way to salvage the data other than a dd stream that skips the VGDA data & starts at the actual beginning of the data & then after VG/LV recreation to stream it back.

Good Luck,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Kim Kendall
Regular Advisor

Re: Recreate/remount an unknown volume

I don't know the previous O/S version, or even if LVM was used at all. I was just told it was mounted on a 715...that's all that is known. Nobody from the previous company exists anymore, and the team from our company that went in to shut down their data center didn't make a backup of anything before shutting things down (no unix people were sent...only PC server people were sent to do the job! Fun, huh?)
Sridhar Bhaskarla
Honored Contributor

Re: Recreate/remount an unknown volume

Hi Kim,

You have an elephantine task ahead of you. Without having map files and VG information, it is going to be very difficult.

There is one way but it is not guaranteed. You can probe the VGIDs of each of the LUNs. Import all the LUNs matching a VGID using vgimport command.

Use the following command to find out the VGID.

echo 0x2010?2X|adb /dev/dsk/cxtydz|sed -e 's/2010://' -e 's/[ ]*//g'

say c0t0d1, c0t0d2, c0t0d3 are having the same VGIDs. Then they belonged to the same VG. Make sure you have VGIDs for all the disks otherwise vgimport will be unsuccessful.

You can import them using the commands

#mkdir /dev/vg01
#mknod /dev/vg01/group c 64 0x010000
#vgimport /dev/vg01 /dev/dsk/c0t0d1 /dev/dsk/c0t0d2 /dev/dsk/c0t0d3


-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Patrick Wallek
Honored Contributor

Re: Recreate/remount an unknown volume

This is something that SAM actually does pretty well.

Go into SAM, go to Disks And File System, then go to Volume Groups and then from the Actions menu select Import. SAM will then look at all the disks on the system and tell you which ones have Volume Groups that can be imported. It will, I think, then create the VGs and import the VGs and LVOLs (named lvol1, lvol2, etc.) of the VGs you select.

Hopefully this 715 was on HP-UX 10.20 which did use LVM by default. I would kind of doubt that the drives were a raid 5 set, unless the Mylex tower supports Raid 5 itself. It is possible that the disks were mirrors.

Good luck!
Kim Kendall
Regular Advisor

Re: Recreate/remount an unknown volume

I don't know what version it "WAS" on... I have a 715 here with 10.20 on it that I can use to try and recover the data. I could even come up with a ver 9 HPUX by rebuilding this one.

If this was originally on an HPUX v9 (or earlier), will there be any chance that I would corrupt the data by trying to read it on a 10.20 system?
Sridhar Bhaskarla
Honored Contributor

Re: Recreate/remount an unknown volume

Hi,

You wouldn't corrupt them by reading. If it didn't work with adb, then you could try mounting them as they are like

mkdir /disk
mount /dev/dsk/c0t0d1 /disk

This will tell you if the disk was used as a whole disk.

On 9.05, it's a good chance that they were used as whole disks.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try