Jump to content

Rebuilding Parity with Newly Formatted Disk


Recommended Posts

I'm pretty sure I'm out of luck on this, but just wanted to double check.  My 15 disk array (v 6.6.7) is a mix of 4 & 8 TB disks, all on ReiserFS.  As is not uncommon with ReiserFS, I've been having write delays and other hiccups when the disks are nearly full, which most currently are.  So I've been wanting to switch to XFS (for that and all the other reasons listed in the user guide and forums), but was looking to avoid the rsync method with an empty drive.  I typically do a monthly parity build, so I though I'd just shut down the array, remove a disk from the array, reformat it in XFS, start the array and do a parity rebuild on the newly formatted drive.  Rinse and repeat over several months to convert all the disks over to XFS (or faster if I replaced any disks).  Oops.  Didn't realize that reformatting a disk outside the array and then adding it back in would update the parity and not give the option for a parity rebuild (still not really sure why that's the case, would seem to be obvious to me).  So I'm pretty sure I've lost all data on the drive I formatted to XFS, but just checking to see if there was any way to go back to the previous parity and rebuild the disk.

Edited by applejack
Spelling Error in Title
Link to comment

First point - you cannot change format as part of rebuilding a disk - it will always rebuild to the previous format.    You have to go through a process of emptying a drive; then changing the format in Unraid; formatting it in Unraid to create a new empty file system of the correct type; and then finally copying the data back and repeat this for each drive being converted

 

There is something wrong with the steps you specified as they do not seem to quite make sense.   If you did not do anything with the disk while in the array then it might be possible to recover something.     However if you did a format while it was part of the array you have wiped the data (and updated parity to reflect this).   If you stop the array; unassign the disk; and then restart the array (so the disk is emulated) do you then see any data on the emulated drive? 

Link to comment

My assumption (a very incorrect one as it turns out) was that if I remove the disk from the array, format it outside the array with a new FS, and then add it back to the array, it would be no different than adding a new disk and I could rebuild the disk contents from parity.  So those were the steps I did--stopped the array, unassigned the disk, formatted it to XFS, and then added it back to the array.  I could be wrong, but I don't think you can format a disk through the GUI when it's still assigned and mounted in the array (same with the preclear plugin).  When the parity came back as valid and the disk was marked "green", with all it's space being free and no option to rebuild parity, I knew I was likely in trouble and those disk contents were gone.  So no, the disk contents are not emulated if I unassign the disk and start the array.  The parity was obviously updated when I added it back as an empty disk with a new FS.  I guess I don't see why formatting an existing disk outside the array with a different FS and then adding it back in would update parity automatically instead of asking for a parity rebuild as an option.

Link to comment

Forcing a parity rebuild didn't bring the data back, it basically just left with me with an empty disk.  Given that I formatted the disk for another file system (Reiser to XFS), I pretty much gave up on any other data recovery efforts.  The disk contained media files, not mission critical data, but I would have liked to have kept it if possible.  Lesson learned, though I'm still not entirely sure of the reason why removing a disk from the array and reformatting it to a different file system wouldn't at least trigger the option to rebuild it's contents from parity, given unRAID is a system that supports multiple file systems and users do change those for various reasons.

Link to comment

You cannot format a disk in Unraid and then rebuild its contents.    The format process wipes the contents and updates parity accordingly.

 

i hate the phrase ‘rebuild from parity’ as it implies that the parity disk has some knowledge of the data on the disks.   All parity understands is bit patterns, and not what they mean.    I would much prefer a phrase like ‘rebuild using data disks plus parity’ or if you must shorten the phrase at least it should be something like ‘rebuild using the parity disk’ which has slightly different connotations.

Link to comment
16 hours ago, applejack said:

Forcing a parity rebuild didn't bring the data back, it basically just left with me with an empty disk.

If I correctly understand what happened forcing a rebuild should resulted in an unmountable disk, this assuming parity was still mostly in sync, then you'd need to run reiserfsck on it, probably rebuild the superblock, but reiserfsck should recover most data.

 

On 6/5/2019 at 8:29 PM, applejack said:

The parity was obviously updated when I added it back as an empty disk with a new FS.

This is also incorrect, there would be some writes to parity because of the new filesystem but if the disk was formatted outside the array like you mentioned, parity wouldn't be updated, so the above should work if done soon before any more writes corrupted parity more.

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...