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.

Replaced Drive and Lost Data - Please Help!

Featured Replies

Hi All,

 

I am very new to UnRaid and made the mistake of thinking I knew what I was doing. I had a system up and running with five drives and one 2TB Parity. The total storage was 6.5TB. The system was getting close to full (probably around 6.25TB) and I decided to install a new parity (4TB) and then move the old 2TB Parity drive to replace a 1TB drive.

 

Everything went well with the 4TB parity installed, checked and now the system storage is 7.5TB. The problem I just realized is I am missing about 1TB of data. I am guessing it is all still stored on the 1TB drive that is sitting on my desk as the new 2TB disk is only 1% full (it should have been around 50%). Is there anything I can do to "Go back" or restore those files? Please help or point me in the right direction! Thanks!

 

Frank

As long as you still have that 1tb drive, you can use the unassigned devices plugin to mount it and then copy the files from it onto the array.

 

But, how exactly did you get into this situation?  What was the order of operations that you followed.

 

What you should have done (and what would have worked) would have been to replace the 2tb parity with the 4tb drive.  Let the system rebuild parity.

 

After that, replace the 1tb with the 2tb (old parity) and let it rebuild.  After that, you would have had 1 extra tb of storage available.

  • Author

Thank you for the quick reply. That is pretty much what I did. Not sure why the rebuild operation did not complete.

 

So I have the old disk, the problem is I only have 6 Sata ports. If I try to take the new (empty) 2TB drive out and replace with the old 1TB drive in its place I get an error that the drive is too small. Any ideas? Thanks again

 

Frank

  • Author

If I were to add a PCI card with a couple data ports would I be able to plug in the old drive and then "drag and drop" the files from the old disk to the new one? Are those cards plug and play with unRAID? And would I be able to add the old disk to the array without formatting it? Thanks

Thank you for the quick reply. That is pretty much what I did. Not sure why the rebuild operation did not complete.

 

So I have the old disk, the problem is I only have 6 Sata ports. If I try to take the new (empty) 2TB drive out and replace with the old 1TB drive in its place I get an error that the drive is too small. Any ideas? Thanks again

 

Frank

ok.  Just noticed that you're on v5.  In that case (and you have an external enclosure), you can use the SNAP plugin and the drive via USB.

 

Short of that, what I'm thinking you did was somewhere along the line you wound up formatting the 2tb drive.

 

What I would do in your situation (and I'm sure there's many ways to do this)

 

#1 - Verify that the 1tb still contains the information.

 

- To do this, I would create another unRaid stick (v5) trial version.  Assign the 1tb to one of the data slots, and don't worry about anything else.

 

#2 - If the data is still there then,

- Use your "real" unRaid stick, and do a New Config with all of the drives (the 1tb instead of the 2tb drive).  Assign the drives appropriately.  After the parity sync completes, change the 1tb drive for the 2tb drive and rebuild onto the 2tb.

 

#3 - If the data wasn't still there when you created the temporary stick and only assigned the 1tb drive, then post back

 

If I were to add a PCI card with a couple data ports would I be able to plug in the old drive and then "drag and drop" the files from the old disk to the new one? Are those cards plug and play with unRAID? And would I be able to add the old disk to the array without formatting it? Thanks

For the most part yes, they are compatible.  I would use the SNAP plugin to mount the drive outside the array (since you're on v5)
  • Author

Ok, I did format the 2TB drive. I guess that was the problem. My logic was that it had parity info on it and it would make sense to format it as if I was installing a new drive. I didn't realize format meant delete the data that was going to be copied onto that drive!

 

So I read up on the snap plugin and it sounds like it might do what I need it to, but I'm not too confident on adding the plug in. I will have to read up more on adding plugins. Thanks for pointing me in the right direction!

 

Frank

Ok, I did format the 2TB drive. I guess that was the problem. My logic was that it had parity info on it and it would make sense to format it as if I was installing a new drive. I didn't realize format meant delete the data that was going to be copied onto that drive!

 

So I read up on the snap plugin and it sounds like it might do what I need it to, but I'm not too confident on adding the plug in. I will have to read up more on adding plugins. Thanks for pointing me in the right direction!

 

Frank

Semi common problem.  Format in unRaid means the same thing anywhere else - Erase the drive.  Except that in your case you erased the "emulated" drive.  So when unRaid rebuilt the emulated onto the 2tb the data was already gone.

 

If you're not comfortable with using SNAP, then you can always do what I suggested above.  Rebuild the 4tb using your other data drives and the 1tb (after doing a new config), and then replace the 1tb with the 2tb

 

Many people think formatting is what you have to do before you can use a disk. Format has always meant "create a new empty filesystem" on every operating system you have ever used. Obviously that was not what you wanted in this case. Formatting a disk is actually a write operation that creates the new empty filesystem. unRAID treats that write operation just like any other, by updating parity. After the format with parity update, the only thing you can rebuild to that disk is an empty filesystem.

  • Author

Makes sense now. I began to attempt installing SNAP and ran into a couple of snags, did some reading, got some ideas that I was about to act on impulsively and thought I should run it by those "in the know" first. At the risk of annoying you folks who know what you are doing, please consider the following:

 

The SNAP plugin appears to be text (when I go to /snap.plg). Is the correct procedure to copy/paste all of that text to a blank text file and name it snap.plg? The second part of that question came after reading the installation instructions. In my flash drive, I do not have the directory config/plugins. Should I create it? I have "packages" which appears to have plugin type add-ons.

 

This thought occurred to me when I ran into the SNAP hurdle. There is currently no data on the 2TB harddrive. Can I somehow "delete" that from the array and then add my 1TB with data on it bypassing the drive is too small problem? I stopped the array and using the drop down box changed that to "no device" then rebooted, but it still comes up as missing. How would I lose that if I wanted to scale back to four drives and one parity?

 

Sorry to be a pain, thanks for the help

 

Frank

  • Author

After further investigation, it looks like I could remove the 2TB drive, unRAID refers to it as drive5, put the 1TB drive with data in it's place and in the GUI assign that physical hard drive as disk6. Would my data then be restored? Seems logical but I am a little gun shy after yesterdays boneheaded move...

 

Frank

After further investigation, it looks like I could remove the 2TB drive, unRAID refers to it as drive5, put the 1TB drive with data in it's place and in the GUI assign that physical hard drive as disk6. Would my data then be restored? Seems logical but I am a little gun shy after yesterdays boneheaded move...

 

Frank

 

NO -- if you do that the 1TB drive will be cleared (zeroed) before it's actually available to the array ... and all of the data will be lost.

 

What you CAN do is the following:

 

(1)  Go to Settings - Disk Settings and set "Enable Auto Start" to NO

(2)  Shut down; and replace the empty 2TB disk with your 1TB disk

(3)  Boot the system;  go to the Tools menu, and select New Config.    Assign all of your disks (including the 1TB drive) ... being CERTAIN that you assign the correct disk to parity (Since it's the only 4TB drive that's easy to do) and the rest as data disks.

(4)  Start the array and let it do a parity sync ... when it's done do a parity check to confirm all went well.

 

Done :-)

 

NOW you can properly replace the 1TB drive with your old 2TB parity drive ... post back when you're at that stage and we can be sure you do it correctly.

 

 

To install a plugin, you paste the url of the .plg file into plugins / install plugin  (I *think* that its there on v5)

 

There is no way right now to have unraid rebuild automatically the data on the 1tb onto the 2tb.  Your method basically sounds to me like you're adding the 1tb into the array.

 

The problem with doing that is that since you already have valid parity disk assigned, unRaid will clear the information on the 1tb so that parity stays valid.

 

What you need to do to have the 1tb in the array is do a new config and then reassign drives, then copy the data from the 1tb to the 2tb, then another new config and remove the 1tb and have unRaid rebuild parity again.

 

In my mind (if you're not going to go the SNAP route) of the new config, rebuild, new config, rebuild makes more sense (but like anything else, there's tons of ways to accomplish the same thing)

 

My method:

 

1 - remove the 2tb from the system

2 - new config with all the other drives and the original 1tb

3 - rebuild parity

4 - replace the 1tb with the 2tb

5 - let unraid rebuild onto the 2tb

 

Your method (which will also work)

 

1 - New config (if you don't do this, your data will be gone forever)

2 - Add the 1tb to the system including the 2tb

3 - Let unRaid rebuild parity

4 - copy data from the 1tb to the 2tb

5 - Physically remove the 1tb

6 - New Config

7 - Let unRaid rebuild parity

 

Other method similar to what you're suggesting, but the copying will be faster

 

1 - New config

2 - Add the 1tb to the system including the 2tb (but DON'T assign a parity drive)

3 - copy data from the 1tb to the 2tb

4 - Remove the 1tb from the system

5 - New config

6 - Assign the disks again, and include the parity drive

7 - Let unRaid build parity.

 

The last method would be the fastest of the bunch, but you're not going to be parity protected during the copy process.

 

The SNAP method is the best, because at no point during it are you not going to be parity protected (because you're never doing a new config)

 

 

 

 

Since we don't know anything about the health of your drives, I would favor Squid's approach of just copying the data from the old drive (SNAP) instead of rebuilding anything. It is also possible to just use the command line to mount the drive without installing a plugin.

  • Author

OK,

 

I used Gary Case's method, no offense to the others, it was the easiest for me to follow. All of my data is back and my parity has been rebuilt. Now, what is the proper procedure for replacing a 1TB drive with a newer larger 2TB? Stop the array, power down, physically switch, power back up and then what? Start the array again and it will happen automatically or no? Thanks

 

Frank

I would stop the array;  unassign the 1TB drive (leave the slot blank momentarily);  Start the array so it shows a "missing" drive;  Stop the array again;  go to Settings - Disk Settings and change "Enable Auto Start" to NO (be sure to Apply the change);  then Power Down.    Now swap the 1 and 2 TB drives.    Boot the system again;  assign the 2TB drive to the slot where you had the 1TB drive; and then Start the array.

 

It will now rebuild the 1TB drive onto the 2TB drive and expand the file system to provide the extra TB of space.

 

OK,

 

I used Gary Case's method, no offense to the others, it was the easiest for me to follow. All of my data is back and my parity has been rebuilt. Now, what is the proper procedure for replacing a 1TB drive with a newer larger 2TB? Stop the array, power down, physically switch, power back up and then what? Start the array again and it will happen automatically or no? Thanks

 

Frank

The only thing that you really have to do is assign the new disk to the same slot as the old disk and start the array. The "physical" part of it isn't really critical except that the new drive has to be plugged in so you can select it. You can even do this with the old disk still in. But for a specific example:

 

Stop the array.

Shutdown.

Remove old disk.

Install new disk.

Boot up. unRAID will not start the array since the old disk is missing.

Assign the new disk to the same slot the old disk was in. I think the Start button will say something about Starting will rebuild the disk.

Start the array and wait for the rebuild to complete.

Do a non-correcting parity check after the rebuild to confirm everything went well.

 

And don't FORMAT anything!

 

  • Author

Many many thanks to all who replied. You are a fine group! Experts in your craft. I cannot thank you enough. All is well in my server, all data is present and the array storage has been expanded. No for the debrief:

 

Lesson learned about formatting. Observation - I don't recall seeing the message "unformatted disk present" the second time I tried to replace the 1TB disk. I'm guessing that's because I formatted it the first time? My guess is that the message would appear again if I stuck a new disk in the array. Don't click format!

 

Will Linux recognize a PCI SATA card? I know Windows will typically find the drivers online behind the scenes and install everything. My server is not connected to the web so will this work or is it more trouble then it's worth?

 

Last, my GUI goes down from time to time. Always has. A reboot of the server will fix it, but what causes it? While the GUI is down I get a "this webpage is not available" when trying to access via any web browser or from any other device, however the data on the server is still accessible via the file explorer and I can still login to the server via putty. Any ideas what causes this? Would I have better luck setting my IP to static?

 

Thanks again everyone!

If the system was showing an unformatted drive the first time, you had done something wrong.    When you're simply replacing a drive, it will just do the rebuild -- it won't show as an unformatted drive.

 

No telling at this point what that was ... but all ended well so you're fine  :)

 

As for recognizing a PCI SATA card -- in general, yes, it will simply recognize it and use it; but there are exceptions.    Also, assuming your system has PCIe slots, you're MUCH better off using a PCIe card instead of an old PCI unit.

 

If you ask about a specific card, we can probably tell you if it should work;  or if you simply note what slots you have available, we can suggest a good card.

 

...Last, my GUI goes down from time to time. Always has. A reboot of the server will fix it, but what causes it? While the GUI is down I get a "this webpage is not available" when trying to access via any web browser or from any other device, however the data on the server is still accessible via the file explorer and I can still login to the server via putty. Any ideas what causes this? Would I have better luck setting my IP to static?

Next time this happens go to the command line and type
ps aux | grep emhttp

and post the result and a syslog. See v5 help in my sig for how to get a syslog without the GUI.

 

And consider upgrading to V6 :)

... And consider upgrading to V6 :)

 

Definitely a good suggestion ... the GUI is far more reliable.

 

  • Author

After doing some research, I might attempt the V6 upgrade. There is a good thread on here about it. Next time I have a day off with a short to-do list and a lot of patience I'm going to dive in head first. You may be hearing from me again! You guys are top notch, thanks again!

 

Frank

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.