Jump to content

How to rebuild/check parity information is correct for array drives after a power outage?


Go to solution Solved by JonathanM,

Recommended Posts

Hello,

 

I had a minor disaster in the house yesterday involving a water pipe.leak in the house leaking on to electrics and nearly causing a fire. I had to quickly kill power to the entire house.

 

Over the 10 years I've had my QNAP running in Raid5, there have been loads of times where the power has tripped and the QNAP has always picked up and carried on when booting back up without issue. This is the first time the power has gone off suddenly since I've built my unraid box and unfortunately one of the 2 data drives was throwing unmountable file system error. I had most of it backed up in one way or another so I started messing trying to get it working and recovered.

 

I ran the check file system in maintenance mode and after a bit of patience I managed to get it back up, but loads of data was moved into the lost+found folder on the disk.

 

I have gone through all the folders and files today and placed the data back where it should be...but I know for certain i am going to have to copy data from a backup to the array again...and so I am worried about the parity data on the parity drive not matching with what data is actually on the array.

 

What do i need to do to ensure that the parity drive data is valid for the array? Thanks!

 

Edit: I should add...I have now bought UPS and have it running the Unraid box to avoid this in future!

Edited by Stupot
Link to comment
2 minutes ago, Stupot said:

Based on my readings:

 

- Stop the array

- Format the parity disk

- Restart the array? and that will just rebuild the parity disk?

If you don't mind my asking, where exactly did you find this? It's all kinds of wrong.

 

A correcting parity check will make sure the parity is in sync.

 

Assuming you ran the file system checks using Unraid's GUI, there is no reason to assume parity is out of sync, as all operations should have been done on the mdX devices.

Link to comment

I was basing it off this kind of suggestion - but I thought that if the drive wasn't blank (i.e. formatted) - then it would just use the existing parity data.

I should maybe say: I am not an expert lol.  My understanding of parity might not be 100%.

 

I have moved data around on the affected disk - from the "lost+found" folder after running the file system check. I've moved most of the data back to it's original positions - but because of the randomised numbers it gives folders and how it splits them folders up - I wasn't able to properly move every piece of data back to it's position.  I moved the data back using Windows Explorer for the most part, but also for some folders I used the command line terminal in the Unraid GUI.  So I would do a command like "mv /mnt/disk2/lost+found/[folder] /mnt/disk2/[destination]".

 

So you say just do a parity check with the "write corrections" ticked and that will make sure everything is up to date?

 

 

Edited by Stupot
Link to comment
  • Solution
6 minutes ago, Stupot said:

I thought that if the drive wasn't blank (i.e. formatted)

Formatted is NOT blank, it has an empty filesystem with all the table of contents and file metadata structures ready to accept files.

 

Parity doesn't have any concept of files, or any format for that matter. Moving files around on array disks doesn't invalidate parity as long as the array is started.

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.

×
×
  • Create New...