HELP! lost disk 2


Recommended Posts

Hi Guys,

 

I tried to run...

 

Actually, yes there is something you can try.  The trick is to use the 'reiserfsck' program specifying the '-scan-whole-partition' option.  This will cause the program to look around in unallocated disk space, trying to find files and pieces of files which used to exist.  It will put them all into a top-level directory called 'lost+found'.  It may or may not preserve the file names, and the files may or may not be complete and/or corrupted.

 

Before attempting this I recommend you make a backup copy of any critical data still on the disk.

 

1. Start the array as normal.

 

2. telnet into the server and type the command: 'samba stop'.  This will take all the shares off the network.

 

3. type the command:

 

  df

 

This will show you all the "mounted" disks.  The ones of interest are:

/dev/md1
/dev/md2

etc.

These are all your data disks (md1 corresponds to disk1, md2 to disk2, etc.)

 

3. Decide which disk you want to recover, for example, let's say disk5.  Type the command:

 

 umount  /dev/md5

 

Notice the command is indeed 'umount' and not 'unmount'.

 

4. Now type:

 

  reiserfsck  --rebuild-tree --scan-whole-partition  /dev/md5

 

(instead of 'md5' use the correct identifier for the disk you're trying to recover).

 

When prompted, type 'Yes'.  Let this run - it might take a long time.

 

More info can be had here.

 

5. Once complete go back to the Management Utility, Stop the array, then Start array again.

 

Good Luck!

 

Long store short the session got interrupted!  :o and now the disk comes up unformatted, how can I recover this drive?

 

please help  :(

Link to comment

Unformatted does not necessarily mean anything other than the fact that unRAID cannot mount the disk,  If the reisrefsck did not complete this could be the cause.  You do NOT want to reformat the drive unless you are prepared to lose all the data it contains.

 

My guess that the best chance of recovering the data is to rerun the reisrefsck command and this time let it run to completion.  However you may want to wait to see if others have any other ideas.

Link to comment

I'm really stressing here, have used the command reiserfsck --rebuildtree /dev/md2

 

How long will this take on a 3tb disk, the suspense is killing me  :(

Quite a long time!  On my system it is something like 10 hours I if remember correctly from when I tried it.  That mode has to read every sector on the disk as well as doing analysis and possibly rebuilding disk control structures.

Link to comment

I'm really stressing here, have used the command reiserfsck --rebuildtree /dev/md2

 

How long will this take on a 3tb disk, the suspense is killing me  :(

Quite a long time!  On my system it is something like 10 hours I if remember correctly from when I tried it.  That mode has to read every sector on the disk as well as doing analysis and possibly rebuilding disk control structures.

 

Did it fix it? Im waiting here and hoping for the best  :(

 

I'm really hoping for the best here.

Link to comment

I'm really stressing here, have used the command reiserfsck --rebuildtree /dev/md2

 

How long will this take on a 3tb disk, the suspense is killing me  :(

Quite a long time!  On my system it is something like 10 hours I if remember correctly from when I tried it.  That mode has to read every sector on the disk as well as doing analysis and possibly rebuilding disk control structures.

 

Did it fix it? Im waiting here and hoping for the best  :(

 

I'm really hoping for the best here.

It did - at least most of it.

 

A lot of the recovered files ended up in the Lost+Found folder, and had random names.  I had to look through them as some of that referred to files that had earlier been deleted.  The rebuild-tree can find files that have been deleted if they have not been over-written.  Some of the recovered (deleted) files were partial files so needed checking.

Link to comment

Thanks man, I don't care if I lose the deleted file or 2 but I don't want to lose this disk no matter what. It means the world to me, wedding photos, holidays, restored family pictures... I hope it's all worth the wait.

 

Maybe Joe L can help, I hear his the expert... If everything returns is it safe to assume those files are ok? Also, I will run reiserfsck --clean then parity check.

 

Please oh God, come back drive pls.

 

I'm really stressing here, have used the command reiserfsck --rebuildtree /dev/md2

 

How long will this take on a 3tb disk, the suspense is killing me  :(

Quite a long time!  On my system it is something like 10 hours I if remember correctly from when I tried it.  That mode has to read every sector on the disk as well as doing analysis and possibly rebuilding disk control structures.

 

Did it fix it? Im waiting here and hoping for the best  :(

 

I'm really hoping for the best here.

It did - at least most of it.

 

A lot of the recovered files ended up in the Lost+Found folder, and had random names.  I had to look through them as some of that referred to files that had earlier been deleted.  The rebuild-tree can find files that have been deleted if they have not been over-written.  Some of the recovered (deleted) files were partial files so needed checking.

Link to comment

Thanks man, I don't care if I lose the deleted file or 2 but I don't want to lose this disk no matter what. It means the world to me, wedding photos, holidays, restored family pictures... I hope it's all worth the wait.

 

Maybe Joe L can help, I hear his the expert... If everything returns is it safe to assume those files are ok? Also, I will run reiserfsck --clean then parity check.

 

Please oh God, come back drive pls.

 

I'm really stressing here, have used the command reiserfsck --rebuildtree /dev/md2

 

How long will this take on a 3tb disk, the suspense is killing me  :(

Quite a long time!  On my system it is something like 10 hours I if remember correctly from when I tried it.  That mode has to read every sector on the disk as well as doing analysis and possibly rebuilding disk control structures.

 

Did it fix it? Im waiting here and hoping for the best  :(

 

I'm really hoping for the best here.

It did - at least most of it.

 

A lot of the recovered files ended up in the Lost+Found folder, and had random names.  I had to look through them as some of that referred to files that had earlier been deleted.  The rebuild-tree can find files that have been deleted if they have not been over-written.  Some of the recovered (deleted) files were partial files so needed checking.

Just be patient and let the process finish.

 

Once completed, it should be possible to run

reiserfsck --check /dev/md2

 

If it is successful the subsequent --check will tell you the file-system is repaired.

 

Did you include the

'--scan-whole-partition'

option when invoking reiserfsck --rebuild-tree ? ? ?

 

Link to comment

Thanks man, I don't care if I lose the deleted file or 2 but I don't want to lose this disk no matter what. It means the world to me, wedding photos, holidays, restored family pictures... I hope it's all worth the wait.

 

Maybe Joe L can help, I hear his the expert... If everything returns is it safe to assume those files are ok? Also, I will run reiserfsck --clean then parity check.

 

Please oh God, come back drive pls.

 

I'm really stressing here, have used the command reiserfsck --rebuildtree /dev/md2

 

How long will this take on a 3tb disk, the suspense is killing me  :(

Quite a long time!  On my system it is something like 10 hours I if remember correctly from when I tried it.  That mode has to read every sector on the disk as well as doing analysis and possibly rebuilding disk control structures.

 

Did it fix it? Im waiting here and hoping for the best  :(

 

I'm really hoping for the best here.

It did - at least most of it.

 

A lot of the recovered files ended up in the Lost+Found folder, and had random names.  I had to look through them as some of that referred to files that had earlier been deleted.  The rebuild-tree can find files that have been deleted if they have not been over-written.  Some of the recovered (deleted) files were partial files so needed checking.

Just be patient and let the process finish.

 

Once completed, it should be possible to run

reiserfsck --check /dev/md2

 

If it is successful the subsequent --check will tell you the file-system is repaired.

 

Did you include the

'--scan-whole-partition'

option when invoking reiserfsck --rebuild-tree ? ? ?

 

Thanks Joe, I didn't choose this option, was I supposed too? Hope not.

 

Waiting patiently now  ;)

Link to comment

Did you include the

'--scan-whole-partition'

option when invoking reiserfsck --rebuild-tree ? ? ?

 

Thanks Joe, I didn't choose this option, was I supposed too? Hope not.

 

Waiting patiently now  ;)

I do not know how you lost the disk contents.  Did it crash?, or have file system corruption and not mount,  or did you accidentally delete files you did not intend?

Link to comment

We've had people overwrite their hard drives by mistake, yet still be able to recover 'some' of the data.

 

I had a bad disk where there were scrambled sectors and I was able recover 99% of my data.

 

Be patient and methodical in your approach with this.

 

As soon as you are able to read data, copy it elsewhere.

 

Link to comment

The first thing (as others have already mentioned) is to HAVE PATIENCE

 

On a large drive this could take a very long time ... just don't interrupt it and wait for it to finish.

 

Next question:  Why were you attempting this recovery in the first place?  Was the drive "red-balled" in UnRAID?    If so, did you attempt to copy the files directly from UnRAID to another location (your PC, etc.) ??  That SHOULD have worked fine IF you have good parity, as the contents would have been reconstructed by UnRAID by reading all of the other disks plus parity.

 

Finally, as I'm sure you've now learned the hard way, UnRAID (or any other RAID) is absolutely NOT a backup !!    NO important data should be stored in only one place !!    Obviously the best solution to a problem like you've encountered is to simply replace the failed drive; then copy the data to it from your backups ... but without backups this isn't an option for you.

 

Note that IF your parity was good and you simply didn't try copying from disk2 (since it was red-balled you may not have thought to do that),  you have a bit of a dilemma when the rebuild-tree operation finishes.    Do you let UnRAID rebuild disk2 onto that disk ... or do you try to read that disk independently?    You can't do the latter from within UnRAID ... you'd need to do it with Linux "outside" of UnRAID.

 

What I'd do in your situation IF you have good parity and the only issue was a red-balled disk2  is remove the disk after the rebuild-tree completes [actually, if you didn't do the full command with the '--scan-whole-partition' option I'd rerun the whole thing first]    ... is physically remove the disk;  replace it with another disk of the same size; and let UnRAID rebuild disk2 on the new disk.   

 

Meanwhile, I'd attach the old disk to a PC and see if it can read the data from it.  [You'll need to use the free Linux Reader utility to do this:  http://www.diskinternals.com/linux-reader/ ]

 

Note that if you don't have another drive and don't want to buy one, you could try #2 first (attach drive to PC) ... and THEN re-install it in your UnRAID box, boot to UnRAID, and let it do the rebuild on that disk.

 

.... AND, of course, I'd back up all of your important data so this can never happen again !!  :)

Link to comment

I tried to recover some accidentally deleted files.

 

There was no HDD corruption, no red ball, there's nothing wrong with the drive prior to following steps in my first post to try recover with reiserfsck and get lost+found folder.

 

Hopefully, I'll have success at the end.

 

Do I still need to re-run the command with scan whole partition?

Link to comment

If I get the disk back I'm happy to lose those 5 files, not worth it, this is a good deal.

 

Waiting on pass 3, showing all file entries within dir structure, is this a good sign?

yes.

 

Thanks Joe and everyone... After this, please correct me if I'm wrong.

Should run --check, then stop array and restart server? Then paity check?

 

;)

Link to comment

If I get the disk back I'm happy to lose those 5 files, not worth it, this is a good deal.

 

Waiting on pass 3, showing all file entries within dir structure, is this a good sign?

yes.

 

Thanks Joe and everyone... After this, please correct me if I'm wrong.

Should run --check, then stop array and restart server? Then paity check?

 

;)

If you have been performing all your operations on /dev/md2, then parity should be in sync already.

After the corruption is fixed, you can then run the

reiserfsck --rebuild-tree --scan-whole-partition /dev/md2

 

No need to reboot or re-start the server in between.

 

 

Link to comment

If I get the disk back I'm happy to lose those 5 files, not worth it, this is a good deal.

 

Waiting on pass 3, showing all file entries within dir structure, is this a good sign?

yes.

 

Thanks Joe and everyone... After this, please correct me if I'm wrong.

Should run --check, then stop array and restart server? Then paity check?

 

;)

If you have been performing all your operations on /dev/md2, then parity should be in sync already.

After the corruption is fixed, you can then run the

reiserfsck --rebuild-tree --scan-whole-partition /dev/md2

 

No need to reboot or re-start the server in between.

 

This is a bit complicated... why do I need to run reiserfsck --rebuild-tree --scan-whole-partition /dev/md2 if the drive is fixed and I do not want to recover any deleted files?

 

Also throughout this ordeal, I've been thinking... isnt the whole point of a parity disk, so I can rebuild a disk or swap it out for a new one if it goes kapow. Cant I put a new drive in, restart and run parity to rebuild disk 2? Isnt this the whole point?

Link to comment

You shoud not need to run the --scan-whole-partition option if you are not interested in recovering deleted files.

 

In terms of your question about the parity disk, it protects you against a hardware failures caused by a disk failing at the physical level.  In such a case the failing drive can be reconstructed using the other disks plus parity.  What it does not protect you against is failures at the logical level.  File system corruption falls into this category as does accidents like accidentally deleting files.  That is one of the reasons why important data should always be backed up elsewhere as well.

 

File systems such as reiserfs have a certain amount of redundant information which is why tools such as reiserfsck can often recover from file system corruption - but you should not assume it will always work.  It would be just your luck that the time it fails is in the case of some critical data you cannot recreate.

Link to comment

I tried to recover some accidentally deleted files.

 

==>  Yet another good reason for backups  :)

First, let's get the file-system repaired...

 

Then, you'll need to re-run with the --scan-whole-partition option to recover the files you deleted.

 

If you do not wish to recover those files, no need to run the --scan-whole-partition option... you can simply reboot and everything should come up mounted as normal.

 

Whatever you do, do not write any new files to that drive until after your recovery operations are completed.  If you have all back you wish, do as you like.

 

Since you seem reasonably calm right now...  You might check out this post:

http://lime-technology.com/forum/index.php?topic=2601.msg21033#msg21033

Link to comment

I tried to recover some accidentally deleted files.

 

==>  Yet another good reason for backups  :)

First, let's get the file-system repaired...

 

Then, you'll need to re-run with the --scan-whole-partition option to recover the files you deleted.

 

If you do not wish to recover those files, no need to run the --scan-whole-partition option... you can simply reboot and everything should come up mounted as normal.

 

Whatever you do, do not write any new files to that drive until after your recovery operations are completed.  If you have all back you wish, do as you like.

 

Since you seem reasonably calm right now...  You might check out this post:

http://lime-technology.com/forum/index.php?topic=2601.msg21033#msg21033

 

Reached pass 4...  ;) and waiting, I feel good/safe.

 

Read the top 10, yeah I now know why Im an idiot.

 

I'll never be so foolish again  ::)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.