Operating System - HP-UX
1837631 Members
3365 Online
110117 Solutions
New Discussion

Re: Recover an external disk

 
SOLVED
Go to solution
Jeremy Smith_1
Occasional Advisor

Recover an external disk

Hi, My primary disk on my 715/50 died, and my tape backups are unreadable... I don't mind losing all the data on the disk that died (like I have a choice!) but I also had an external drive. Is there anyway I can get this disk running on my new machine with out losing all my data??? If so - how can I do it?
Thanks in advance!
17 REPLIES 17
A. Clay Stephenson
Acclaimed Contributor

Re: Recover an external disk

Hi Jeremy,

You didn't mention OS but I'll assume 10.x and above.

Let's pretend your external disk is c0t5d0.

1) cd /dev
2) mkdir vg01 (or vg02)
3) cd vg01
4) mknod group c 64 0x010000

Make sure that there is not already a group file under /dev/vg00 with a minor device number of 0x010000. If so, you can still be vg01 with a minor device of 0x020000.

5) vgimport -v /dev/vg01 /dev/dsk/c0t5d0

This will create a series of logical devices under /dev/vg01 (lvol1, lvol2, ...)

6) Create a mountpoint for each one.
e.g. mkdir /filesys1
mkdir /filesys2 ...
7) Mount the filesystems
e.g. mount -F vxfs /dev/vg01/lvol1 /filesys1

8) Modify /etc/fstab to automatically mount the filesystems.

This should do it, Clay


If it ain't broke, I can fix that.
Ajitkumar Rane
Trusted Contributor

Re: Recover an external disk

Hi,
The steps mentioned by clay are fine.
If this external disk was the only disk in a VG then its ok but if not then posibly you may get errors during vgimport as it may non find the ohter PV in the VG.
Also if you are connecting the disk to a latest series 800 server than you might want to check if the scsi standard is supported on the new servers.

Goodluck.
Amidsts difficulties lie opportunities
A. Clay Stephenson
Acclaimed Contributor

Re: Recover an external disk

Hi again Jeremy,

I feel compelled to tell you that 'my backup tapes are unreadable' is right up there with 'My dog ate my homework'. Please, never let yourself be in this position again. The surest method to never need good backups is to have good backups - one of God's little jokes.

In this case, other than the root disk; you should be ok.

Regards, Clay
If it ain't broke, I can fix that.
Jeremy Smith_1
Occasional Advisor

Re: Recover an external disk

Hi,
Clay - everything went well up to the Mount command... after the vgimport, it created lvol1 to lvol10

When I run the mount command:
mount -F vxfs /dev/vg01/lvol1 /filesys1
I get an error saying :
vxfs mount: /dev/vg01/lvol1 no such device.

I tried for all 10 with the same result...
any ideas?

BTW - it is hpux 10.20 and I did use vg01 and device number 0x010000. The device itself is on c0t4d0.

Thanks for your help.. (and sometimes dogs do eat homework!)
Patrick Wallek
Honored Contributor

Re: Recover an external disk

I think the problem is that there is a step missing. You need to activate the VG. Do a:

vgchange -a y /dev/vg01

and then try your mount again.
A. Clay Stephenson
Acclaimed Contributor

Re: Recover an external disk

Hi Jeremy,

Patrick nailed it; activate the volume group.
Also, I assume the filesystems are vxfs if not nount -F hfs /dev/vg01/lvol1 /filesys1.

Sorry about that, Clay
If it ain't broke, I can fix that.
Jeremy Smith_1
Occasional Advisor

Re: Recover an external disk

Hi Patrick,
This command failed horribly. I think it may be related to the comment from Ajitkumar Rane.

The error I get when trying to activate the volume group is:

vgchange: Warning: Couldn't attach to the volume group physical volume "":
A component of the path of the physical volume does not exist.
vgchange: Warning: couldn't query physical volume "":
The specified path does not correspond to physical volume attached to
this volume group
vgchange: Couldn't query the list of physical volumes.
vgchange: Couldn't activate volume group "/dev/vg01":
Quorum not present, or some physical volume(s) are missing.
-----
Any ideas on this one??
Thanks again!
Patrick Wallek
Honored Contributor

Re: Recover an external disk

Were the external and the internal drive on your machine both part of VG00? Or was the external in it's own volume group?

If they were both VG00, you may be stuck.
James R. Ferguson
Acclaimed Contributor

Re: Recover an external disk

Hi Jeremy:

Did you 'vgimport' *all* of the physical disk comprising the "external" volume group?

...JRF...
Jeremy Smith_1
Occasional Advisor

Re: Recover an external disk

I honestly couldn't tell you...
Is there any other way around this??
Jeremy Smith_1
Occasional Advisor

Re: Recover an external disk

James - I ran the command as suggested by Clay -
vgimport -v /dev/vg01 /dev/dsk/c0t4d0

Is there something else I should be doing?
Thanks,
Jeremy
A. Clay Stephenson
Acclaimed Contributor

Re: Recover an external disk

Hi Jeremy,

This does not sound good but you have one slim hope. If you had the MirrorDisk/UX product (B5403BA) installed originally and all (or at least some) of your logical volumes were mirrored then you may pull this off.

If you meet the above conditions:

1) Install MirrorDisk/UX from one of your application CD (you will need a codeword).

2) vgchange -a y -q n /dev/vg01
This will activate the volume group without a 'quorum' of disks.

Cross your fingers, Clay

If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: Recover an external disk

Hi Jeremy:

I want(ed) to make sure of the number of physical disks that were present "externally". Can you descibe the original I/O configuration -- i.e. one physical disk at cXtYdZ used as vgXX [now defunct]; plus one (or two?) physical disk at CxtYdZ [trying to save]?

...JRF...
Jeremy Smith_1
Occasional Advisor

Re: Recover an external disk

Hi James,

The orignal configuration was one internal on 6, and one external on 4. The disk on 6 which had the os etc, failed and I could not boot. I replaced the disk and installed the OS. Now I am trying to recover the one external...
But I don't know the original configuration for the volume groups...

Hope this helps you to help me!
Thanks.
Ajitkumar Rane
Trusted Contributor

Re: Recover an external disk

Hi,

I would suggest redo the whole procedure againg,it was my personal experience that forgetting to do a VGchange before mountting the filesystems cause errors.I think you should try to vgexport the VG you created and again freshly import it performing all the steps in sequence. You might be lucky this time

Good luck.
Amidsts difficulties lie opportunities
KapilRaj
Honored Contributor
Solution

Re: Recover an external disk

hi,

follow the steps given by Clay once again & vgchange with quorum option.

ie.

mkdir /dev/vg08
mknod /dev/vg08/group c 64 0x080000
vgimport /dev/vg08 /dev/dsk/c0t4d0
vgchange -a y -q n /dev/vg08

Do fsck on all devicel files , then mount them. some of them may give errors if they had some physical extents on the lost disk. forget abt them.

I think the external disk was part of vg00 that's y it gave the error.

Best of luck

kaps
Nothing is impossible
Jeremy Smith_1
Occasional Advisor

Re: Recover an external disk

Thanks Everyone - Kaps, your solution worked. After the vgchange with the quorum option, the vg was activated. I then did the fsck to determine that only lvol9 was a file system. After that I did the mount and tada! my data was there.

Thanks to everyone for your input!