1833777 Members
2199 Online
110063 Solutions
New Discussion

recover data on bad disk

 
SOLVED
Go to solution
someone_4
Honored Contributor

recover data on bad disk

Hello everyone

I have a disk failer on an R390. I was told this was not a crital system so there is no mirror or ignite tape. As we speak I am doing a reinstall. But it aprears that there were still some important files in the /home dir and tht it would be great that if they were recovered.

So I was wondering if after the fresh install can I mount the "bad disk" somehow and recover my files from /home?

Thanks
richard
4 REPLIES 4
Sridhar Bhaskarla
Honored Contributor
Solution

Re: recover data on bad disk

Hi Richard,

You can give this a try.

You could try importing it into a temporary VG after reinstalling the OS. If you are lucky, you may get your data back on few lvols.

#mkdir /dev/vgtemp
#mknod /dev/vgtemp/group c 64 0x0a0000
#vgimport vgtemp /dev/dsk/cxtydz
#vgchange -a y vgtemp
#mkdir /recovery
#mount /dev/vgtemp/lvol1 /recovery
(repeat it on other logical volumes.). It will fail to fsck/mount the logical volumes corresponding to the bad blocks.

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

Re: recover data on bad disk

You can try importing the disk into vg01 after you finish the install. Sam can do this for you, or you can do it manually.

# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgimport vg01 /dev/dsk/c?t?d0

If that step works, you have a good shot at getting what you need. If it doesn't work, you are pretty much out of luck.

Now to continue:

# vgchange -a y vg01
# vgdisplay -v vg01
This will show you what LVs got imported. If you can remember which LV /home was, usually lvol4, you can mount it.

# mkdir /old_home
# mount /dev/vg01/lvol4 /old_home
# ls /old_home/whatever/you_are/looking_for

If you can see your files GREAT! If not, tough luck.

A. Clay Stephenson
Acclaimed Contributor

Re: recover data on bad disk

It depends on how bad the failure is. If the disk won't "spin up" then for all practical purposes the data is unrecoverable. If you are lucky then yes, you can install this disk. Do a vgimport, vgchange -a y, and then mount filesystems. /home is typically on lvol4 and you will almost certainly need an fsck before you can mount the filesystem --- if at all.

If it ain't broke, I can fix that.
Chris Watkins_1
Respected Contributor

Re: recover data on bad disk

It depends on how the disk has "failed".
If it truly failed, ie... dd couldn't read from it...
then you're out of luck, I'm afraid. That is, unless someone
wants to shell out some big bucks to one of the data recovery companies.
(And, it's a "best effort" sort of thing, generally. No promise)

If the disk just had a couple of bad blocks... or was
fine while cold, but stopped responding after heating up,
then it's "possible" you could vgimport it on the new system,
mount it up and pull the important data from it.

Hard to say, really. For instance... if the bad block(s)
is/are containing $important_file data, then you're hosed.

No harm in giving it a shot, however.



Not without 2 backups and an Ignite image!