Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] Drive 2 lost its directories?

Featured Replies

Hi,

 

I went on an OS trip and when I came back one of the 1TB disks had failed (red flashing dot and didnt want to join the party). So I grabbed a spare 1TB drive put it in the same slot, spun it up and unRAID formatted and rebuilt the drive with no errors. When I look at the web interface the drive says its got data on it (approximately 14% used which is about what its supposed to be). Now for the problem. When browsing I noticed some of the folders missing then I realised there are no folders on disk2 (the disk I replaced). All the other drives look fine. How do I get the folder structure back on disk2? Is there a command I can use? Do I redo the parity check, will that cement the removal of the folders? Should I insert another drive and rebuild? Other options? Im on 4.7. Thanks.

 

Jim

Hi,

 

I went on an OS trip and when I came back one of the 1TB disks had failed (red flashing dot and didnt want to join the party). So I grabbed a spare 1TB drive put it in the same slot, spun it up and unRAID formatted and rebuilt the drive with no errors. When I look at the web interface the drive says its got data on it (approximately 14% used which is about what its supposed to be). Now for the problem. When browsing I noticed some of the folders missing then I realised there are no folders on disk2 (the disk I replaced). All the other drives look fine. How do I get the folder structure back on disk2? Is there a command I can use? Do I redo the parity check, will that cement the removal of the folders? Should I insert another drive and rebuild? Other options? Im on 4.7. Thanks.

 

Jim

unRAID should not have formatted the drive.  It should have partitioned and re-constructed it only.

 

Are you sure the files are not there on disk2?  You might have to reboot the server for your PC to see them.  Before you do anything more, post a syslog.

  • Author

Joe, I use the term formatted loosely. I did reboot the server when I noticed the missing structure thinking it needed a refresh, but no luck. When I log into the server and go to /mnt/disk2 and do an ls, there isnt anything there. Syslog attached.

syslog-2011-05-07.txt

  • Author

Anyone got any ideas on getting the directory structure back? As I said unRaid reports there is content to about the right volume.

  • Author

dga

 

What are the best options to use in this case with reiserfsck? fix-fixable, rebuild-sb, rebuild tree? Combinations one after the other? Im guessing I have one crack at this before its all toast.

 

Thanks

dga

 

What are the best options to use in this case with reiserfsck? fix-fixable, rebuild-sb, rebuild tree? Combinations one after the other? Im guessing I have one crack at this before its all toast.

 

Thanks

Not true at all.  You can image the disk to another and then attempt any number of recovery utilities on the image and not touch the original.

 

Joe L.

  • Author

All,

 

I have tried reiserfsck and other methods and the directories cannot be resurrected. Im not saying there isnt something out there that may work, but I am saying Im over it and its time to recover from BU. I have 4 drives + parity drive....how do I : 1. zero all the drives, 2. bring up a clean array, 3. overlay the current shares (ie I dont want to have to re-enter all the shares et al). Then I can recover the data from backup.

 

OR do I have to blitz it all and rebuild the shares etc?

 

Thanks.

 

You only need the backup of the failed drive. BTW, reiserfsck is not destructive on the first pass and then it tell you what to do next.

  • Author

dga,

 

Inadvertently you have given me food for thought ie in future I will backup /mnt/diskX and not the file mounts themselves. Unfortunately I backup the mounts as one big block of stuff and trying to find out what of that was on drive2 is going to be a pain in the ....... So Id rather blow it all away and recover into the file shares.

 

thanks

You could restore from backup using rsync and only the missing files will be copied. Otherwise, just delete the existing files and directories and copy everything back no need to lose the share config.

The backup should be capable of recovering the missing files. Even just a manual copy or zip process would mean you can select not to over-write existing files.

 

You still need to figure out why there is 14% space used and nothing on the disk. Obivously, there is some problem with the disk. Since you haven't given any details such as what reiserfsck commands you ran and what directories should have been on the disk it's hard to comment. Did you actually go look on the disk directly for files? It's preferrable to do this on the server but you could have also shared the disk and made sure Windows is set to display hidden and system files.

 

Did you try another port? sometimes, the port goes bad and makes it appear to be the disk and also some really dumb things appear/don't appear on the disk. The disk can seem to work but not really work.

 

Have you done anything to change the parity (parity check, reiserfsck commands on the md device)? If you have not, then try unassigning the disk to see if unRAID will create the virtual data correctly again.

 

Finally, how often do you run parity checks. I've read cases of people never running them and then wondering why their server can't rebuild a disk after working for a year or 2. Well, you can't recover your disk if, for whatever reason, the parity gets out of sync and you don't find the parity issue and correct it before the disk failure.

 

Peter

 

  • Author

Hi Lione

 

So the original disk would not mount....Im sure its dead and will be RMAd. I run Parity on a monthly basis. So I put a new drive in and it rebuilt with no errors. Then I noticed the missing file structure but the volume had 14% consumed which is about right for what it was. Direct access to the disk showed no file structure. I moved that disk to another bay in the machine to try and do recovery and rebuilt another spare drive I had into the array. The new disk had the same symptoms. Now the reiserfs commands I tried were basically following the bouncing ball ie did a check first it recommended a rebuild-sb then after that recommended a rebuild-tree with scan-whole-partition. Tried some other things and all failed.

 

So Im resigned to the fact that rebuilding from scratch is the fastest way forward. So to keep the share definitions whats the best way forward

- go into each drive delete everything on their including the share name

- prepare a new drive with preclear for disk2 since I cant go in and delete anything ie no structure to delete...or is there a format

- prepare a new drive for parity and once the four data drives are clean swap it and rebuild?

- as I use the shares they will rebuild the tree automatically? or do I have to ensure each drive has a directory structure of the top level shares before rebuilding the new parity drive

 

Is there a command in there somewhere like init array and off it goes......24 hrs later you have a clean share structure with and empty array?

 

The above may sound totally wrong but Im not an expert in unRaid. Any help appreciated.

 

Thanks

The preclear script has an option to zero the MBR. That's all you'd have to do on the messed-up drive and then do an initconfig to get back to a working array. You'll also have to click the format some time during or after the parity build to put a file system on the drive.

 

You can just go to each of the other good data disks and erase the top directories to clear them out. You can do it before the initconfig or after the initconfig, it doesn't matter much when this is done.

 

Set/confirm your shares and begin restoring the data.

 

Peter

  • Author

Peter,

 

Did all that and now I have a pristine array....painless. When I go to the Shares tab none of my shares are listed, do I have to manually re-enter all of them. I note under /boot/config there is a file called share.cfg which is basically empty (has some fields with blank values), but under /boot/config/shares there are *.cfg files (one for everyone of the shares I had). Anyway of applying these easily?

 

thanks

Hmm, I'd think that if you go to a disk and create a top level directory named exactly the same (named like the filenames) as the share was then unRAID would pick those files up again. If you wanted/had shares only on certain disks then you'd have to create the directories on one of those disks.

 

You'd likely have to stop and start the array to get those files recognized.

 

Peter

 

  • Author

Peter

 

All good. Just a quick note, zero'ing the MBR did not clear the 14% of stranded data on the drive.....I had to zero the disk using preclear. Now the only thing left to do is to figure out why NFS is not sharing to my Mac the problem was on the mac side, refreshed the aliases and all is fine....otherwise the array is filling up fine.

 

Only question remains is how it lost the folder structure (not so worried about the drive failing, it happens).

 

Many thanks for your help

 

Jim

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.