Jump to content

Have I lost data or can I force a rebuild on a data drive following a change of file format


Go to solution Solved by itimpi,

Recommended Posts

Afternoon everyone,

 

Looking for some help as to whether I can recover data on one of my data drive after I changed the filesystem type.

I recently bought a pair of larger (14tb) drives to replace the parity drive and one of the data drives in my array.
Replacing the parity went as planned. I'd precleared both new drives, shut down the array and brought in one of the new drives as parity and after 24 hours or so the new parity disc was up and running. All good at this point.

One of the 3 data drive I had was formatted with ReiserFS which I wanted to switch to XFS.
I stopped the array, went into the disk that was formatted with ReiserFS, changed it to XFS and restarted the array asking it to reformat, thinking it would format the drive then rebuild from parity.

The drive that was ReiserFS now shows as XFS but it's also showing a lot of space free so I don't think any rebuilding took place.
Have I lost the data on the drive forever or can I somehow force a rebuild of that disk using the parity.

No data has been added, changed or deleted from the array since I've done this.

I have available the other 14tb disc as an unassigned device at present (precleared and ready to go) if that can be of any use.

 

I'm on version 6.11.0 at present.

Thanks in advance

 

Edited by Dazza993
type and additional of version in use
Link to comment
  • Dazza993 changed the title to Have I lost data or can I force a rebuild on a data drive following a change of file format
17 minutes ago, Dazza993 said:

thinking it would format the drive then rebuild from parity.

Parity does not hold any files, it allows for recreating the drive exactly as it was before you started the rebuild and nothing more. So once you formatted parity was updated in real time and now would rebuild exactly the freshly formatted disk you already have.

 

Your only option is to take the drive out and try to use file recovery software on it.

 

To convert filesystem there's no other way than to copy the entire drive contents elsewhere, format, and copy the data back.

 

https://wiki.unraid.net/Manual/Storage_Management#Converting_to_a_new_File_System_type

Edited by Kilrah
Link to comment

So I only formatted the data drive after the parity disc had been rebuilt so as far as I can see, the parity drive has all the information before I formatted the data drive.

I've not run any parity checks since I formatted the data drive.
If I had simply replaced the data drive with a new disk, it would have been able to rebuild the data drive.

As soon as I've reformatted one of the data drives, will that have updated the parity drive, so that there's nothing available to rebuild?

I understand that parity isn't a backup, but if I can pull one data drive and replace with new/empty one parity can be used to reinstate that data drive - or am I missing something?

Link to comment
4 minutes ago, Dazza993 said:

As soon as I've reformatted one of the data drives, will that have updated the parity drive, so that there's nothing available to rebuild?

This. Before you formatted parity held data that allowed rebuilding the drive as it was with all the data. But you formatted, so now parity has been updated such that it would rebuild the freshly formatted drive. 

 

As usual a format wipes the filesystem and metadata but not the entire data area, it may be possible to recover some files. I don't know details about reiserfs but you might want to look at this:

 

Edited by Kilrah
Link to comment

I've looked at the thread above and another but whenever I try to use the command reiserfsck --rebuild-sb /dev/md1 I'm getting the error below.

Unknown code er3k 127


Looks like I'm running reiserfsck 3.6.27

With the array stopped I'd changed the format from XFS back to ReiserFS and started the array in maintenance mode.  Is that correct or would I need to start normally and do another format back to reiserfs back from XFS for the reiserfsck program to work correctly.

Thanks for the input so far.

Link to comment
1 hour ago, Dazza993 said:

I've also ran the blkid command and that's still showing as all devices being XFS

That's expected since it currently has a valid xfs filesyetsm, not sure why --rebuild-superblock it's not working though, no issues logged about that, so it suggests a reiserfsck problem, you can try with an older Unriad release, not sure when reiserprogs were last updated.

Link to comment

Would it be worthwhile, putting my new 14tb drive into the array as Disk 1 (replacing the one drive I tried to move from reiserfs to XFS) and then use unassigned devices to see what I can see on that old 6tb UD drive?

If I did want to try and earlier version of unRaid, am I like to run into any issues doing that?  On other posts others seem to have had similar issues and getting the same error code.
On that thread the user has tried using unassigned devices to copy files off using MC 
I'm keen to make sure I don't make the problem any worse

 

 

Link to comment

I've switched my new 14tb disk into disk position 1, replacing the one I was trying to change from reiserfs to XFS and it's showing the FS as ReiserFS and doing a data rebuild.
Might I be lucky enough to end up with data on the new drive (albeit using the wrong format of reiserfs) at the end of the rebuid?
If so I can worry about sorting that out later  - which I guess involves coping the data off to one of the old 6gb drives (one reformatted to XFS) and showing as empty - then reformat the new 14tb drive and then copy back?

 

Screenshot 2022-10-17 at 13.29.35.png

Link to comment

The rebuilt against the new drive finished but it shows as unmountable

Reiserfsck is still giving error Unknown code er3k 127 so looking at another thread where some did the same as me I spotted the xfs_repair command.
So running xfs_repair -nv /dev/sde1 I do get a readable output.

Could it be worth trying to run xfs_repair without the n option?  Or is it worth trying stop the array, edit the drive and change the format back to XFS?
I'm grasping at straws I know

Screenshot 2022-10-18 at 20.12.19.png

Screenshot 2022-10-18 at 20.14.34.png

Link to comment

Well it says there's no reiserfs filesystem on that disk, which is normal since you overwrote it with xfs.

The thread I linked are things that might allow restoring the reiserfs filesystem from other bits of data still on the drive, if those don't work your next option is a file recovery program if that exists for reiserfs, if not/they don't work you're basically SOL.

Edited by Kilrah
  • Like 1
Link to comment

Thanks for the continued support on this subject.  The 14tb that I thought might have updated from the parity drive was unusable due to the filesystem mismatch to to get my array in a working condition that's formatted as XFS.

As I have the Plus license of unRaid so would it be worth trying the 6tb drive originally formatted with reiserfs into the array?  I'm guessing if it won't mount as an unassigned drive it won't mount as part of the array.  If that prompts to be formatted as ReiserFS , would that overwrite all of the disk or does it just flag part of the disk as the filesystem to use?

I could tolerate a partial loss of data so long as that approach got most of the data back, or would I be best using UFS explorer, and if I do decide to get that, how does that work?  Can it be a plug in or dockerised app for Unraid, or can I install that on Mac OSX or does it need windows - and if it's the latter two, I guess I need to put the drive into an external caddy and connect to either my Mac or a Windows PC?

Thanks in advance again.

Link to comment
1 hour ago, Dazza993 said:

UFS explorer, and if I do decide to get that, how does that work?  Can it be a plug in or dockerised app for Unraid, or can I install that on Mac OSX or does it need windows - and if it's the latter two, I guess I need to put the drive into an external caddy and connect to either my Mac or a Windows PC

UFS Explorer does not run natively on Unraid, but it has versions for Windows, MacOS and Linux.   Never looked into whether it might be possible to make the Linux version run in a docker container but it might be difficult because of the need to access the problem disk directly at the sector level.

  • Like 1
Link to comment
  • Solution
43 minutes ago, Dazza993 said:

Thanks @itimpi  I'll give UFS explorer a try on my Mac once I get back from holiday.

UFS Explorer is not free, but you can run it in a trial mode that will give you a list of the files it found before you make any decision about whether it is worth purchasing it.    I bought myself a copy of the Standard edition some time ago and it has proved invaluable the few times I have had to use it.

Link to comment
  • 2 weeks later...

Thanks @itimpi  I've download a licensed copy of UFS explorer and gradually moving data from the reformatted drive onto a removable SSD attached to my Mac and then moving data back to the array.

I've seen some files are corrupted still but something is better than nothing.

Thanks to all for your input, advice and guidance.

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