Re: Format XFS on replacement drive / Convert from RFS to XFS (discussion only)


Recommended Posts

Thanks for these instruction. I am using the Wiki entry - am at unRAID 6.8.3.

Unlike the Wiki directions, I moved the data - not copied.

I do not use inclusions/exclusions, and I wanted to preserve parity during the process.

I used unBALANCE to scatter the files from one drive to the rest.

Now I'm ready to format the empty drive.

The directions seem specific to having two mirrored (copied) drives.

Do they differ for me, since I moved the files?

How do I format the drive while not having to rebuild parity.

Thanks!

Link to comment
43 minutes ago, volcs0 said:

Unlike the Wiki directions, I moved the data - not copied.

So did I. I did the conversion before there were any directions.

 

36 minutes ago, volcs0 said:

How do I format the drive while not having to rebuild parity.

Since format is a write operation, formatting a drive in the parity array updates parity so parity will continue to be in sync after the format. This actually trips up some people (despite warnings in the webUI) who hope they can rebuild a formatted disk to recover its data, but parity agrees the disk has been formatted.

 

 

Steps 5,6,7 in the wiki cover how to actually do the format.

 

Link to comment
53 minutes ago, trurl said:

So did I. I did the conversion before there were any directions.

 

Since format is a write operation, formatting a drive in the parity array updates parity so parity will continue to be in sync after the format. This actually trips up some people (despite warnings in the webUI) who hope they can rebuild a formatted disk to recover its data, but parity agrees the disk has been formatted.

 

 

Steps 5,6,7 in the wiki cover how to actually do the format.

 

Ahh. OK. I get this now. When I format the drive, parity knows this. 

Versus formatting the drive and then parity freaking out. 

Thanks!

Link to comment

Hi - I just wanted to follow up. I know this information is redundant, but I wanted to write it up for any other novices who are trying to do this and have the same questions I did.

This procedure worked well - for me. YMMV.

I'm on unRAID 6.8.3.

 

1. Make sure you have enough space to empty or copy (completely) one of the drives.

 

1. Run "Docker Safe New Perms" form the Tools menu (this is installed as part of the Community Applications)

 

2. Use unBALANCE to move OR copy from one drive to the others. This is pretty straightforward - you choose move OR copy FROM and specify which TO drives (just don't use the cache drive), and then select all the folders. Click Plan and then run it. This will take a long time to run - for me it was like 48 hours for 5.5Tb. You can use copy or move - it doesn't matter at all. But I was told that copy is faster, since you don't have to wait for the files to be deleted off of the "from" disc and for parity to be updated. Again, it doesn't ultimately matter.

 

3. When everything is done (and you don't see any errors from unBALANCE), stop the array.

 

4. Click on the name of the disc that you copied FROM (the one that either now is empty if you moved or still has data, if you copied). On the next screen, under File System Type, choose XFS, click Apply and Done.

 

5. Restart the array

 

6. The disc you changed will now say "unmountable." At the bottom of the screen - you will see the option to format - you will have to click a button saying "I really want to do this." It will then format the disc - will take about a minute, and then it will be part of your array. 

 

7. Repeat this process with other discs, starting with Step 3. Remember to turn off your Dockers - if they are set to auto-run, they will have started up with you restarted the array.

Edited by volcs0
Link to comment
  • 3 months later...

Hello All,

I used the mirror procedure outlined in the Wiki page, "File System Conversion," to convert a 2TB Reiserfs (/mnt/disk1) data drive to a 4TB XFS (/mnt/disk4) formatted drive. I'm using unRAID version 6.8.3.  ( https://wiki.unraid.net/File_System_Conversion )

 

The instructions are good and I did my best to follow it to the letter, but it looks like I made a mistake at the command line with the rsync command. As a result, the files on my "swap" (target) drive were pushed down one level so the file structure became: /mnt/disk1/disk1/disk1" after setting up the new configuration with the 4TB drive in the 'disk1' unRAID slot.

 

My error, I believe, was to omit the final slashes ( / ) defining source and target in the rsync command. What I entered was: rsync  -avPX  /mnt/diskX  /mnt/diskY  (missing trailing / ) oops!!

 

I reverted back to the original configuration and things appear normal, no errors from "Fix Common Problems." 

 

Now, moving forward I'm wondering if I have to do the rsync all over again or if there's a valid way to move the files on what is/was the "swap" (target) drive up one level so they match the /mnt/disk1/user-files.

 

If it's better to do the rsync again should I reformat the "swap" (target drive). In other words, what's the best way, start from scratch?

 

Cheers!

 

Edited by doorunrun
Link to comment
2 hours ago, jonathanm said:

Use mc and move the files.

This is what I did when I did my conversion, long before there was any wiki for this, maybe even before this thread was started. Lots of ways to move files and maybe simpler is better or at least less prone to mistakes.

 

Midnight Commander (mc from the command line) is easy to use and understand. Google it.

 

Link to comment
3 hours ago, jonathanm said:

Use mc and move the files.

 

49 minutes ago, trurl said:

This is what I did when I did my conversion, long before there was any wiki for this, maybe even before this thread was started. Lots of ways to move files and maybe simpler is better or at least less prone to mistakes.

 

Thanks, jonathanm and trurl for the replies!

 

I used MC and got the files moved and finished working through the Wiki to get the drives swapped. 

 

I don't plan on converting the other Reiserfs drive I have right away.  I don't want to use the 2TB drive I just converted that's sitting in the 'swap' slot and part of the array. I'd like to unassign (remove) it from the array. Would I use the Wiki "Shrink The Array" page's procedure? 

 

I will be purchasing a new larger drive for this next conversion of the remaining 2TB Reiserfs drive.

 

I don't see this aspect of the conversion covered in the "File System Conversion" wiki doc, but when you come to the of the process and are doing the last "new config step" could you just not assign the swap slot drive (which is not needed)? I think you have to do a parity check since that 'extra' drive is not part of the array anymore

, right?

 

Maybe I overlooked something in the conversion process? I understand things better now that I've gone through it once. Thanks for the help!!

 

--Al

 

Link to comment
15 minutes ago, doorunrun said:

I don't want to use the 2TB drive

16 minutes ago, doorunrun said:

I will be purchasing a new larger drive for this next conversion

You could just wait and replace/rebuild that 2TB to the new larger drive. If you shrink the array you are still going to have to do some lengthy process. Either clear the disk while in the array (one shrink method) or rebuild parity without it (the other shrink method) or just wait and rebuild the disk to the new larger disk.

 

Link to comment
  • 1 month later...

Hey gang, I think I've botched my opportunity to upgrade. I have a small server with 4 drives - three 4TBs and an 8TB parity. Note that the server only has four drive bays, but I have a USB sata dock (if that helps). I finished a parity check yesterday, with no errors.

 

I was planning to swap out one of the 4TB drives for a new 8TB drive I just bought, so I stopped the array, shut down, pulled the oldest drive, swapped in the new one, reassigned it, and started the array. It started rebuilding but the oldest drive was on reiserfs, and I decided to take this opportunity to figure out how to convert it to xfs. So I stopped the rebuild. Mounting and unmounting was taking a long time (~15-20 mins), so before doing anything else, I decided to plug the old 4TB drive back in and get back to the original working state. But when I stopped and swapped the 4TB drive back in, it now says it can't use that as the replacement drive is too small - presumably because it now expects that disk to be 8TB (even though it hadn't finished rebuilding that disk).

 

I guess I could put the 8TB drive back in and finish the rebuild and that will at least get everything working, but if I do that, there goes my opportunity to convert to xfs, at least until I upgrade the next 4TB drive to another 8TB. Is the situation salvageable with the file system conversion? Or did I miss my chance and I'll just have to wait until I get the next 8TB?

Link to comment
13 minutes ago, AcerbicMaelin said:

I guess I could put the 8TB drive back in and finish the rebuild and that will at least get everything working, but if I do that, there goes my opportunity to convert to xfs, at least until I upgrade the next 4TB drive to another 8TB. Is the situation salvageable with the file system conversion? Or did I miss my chance and I'll just have to wait until I get the next 8TB?

Actually, you can still convert your 4TB drives using the free space the 8TB gave you, but the 8TB will have to wait, UNLESS you have enough space to move things around and free up the 8TB. It's a pity though, because ReiserFS is really bad at handling 8TB drives, the wait times for new files to get space allocated can be horrible.

 

However...

 

Now that I think about it, what I personally would do in your situation is this.

1. Finish the rebuild on the 8TB, verify everything is there and working properly, and have a non-correcting parity check with zero errors.

2. Attach the 4TB using the USB dock, and mount it using Unassigned Devices.

3. Assuming the old 4TB mounts properly, do a binary file compare to the freshly rebuilt 8TB. If that completes with no error, format the 8TB to XFS, and copy the 4TB content back over.

4. Copy the content of one of the array 4TB drives to the remaining space on the 8TB, format the 4TB you just copied. Copy the remaining 4TB to the freshly XFS 4TB. Format the last 4TB.

 

This is going to take days, maybe a week or more if you insist on moving files instead of copying.

 

If the removed 4TB won't mount in the USB dock with Unassigned devices, then I'd format it using destructive mode in UD and use it as the temporary location to hold the content of the 8TB while you format it.

 

All of this assumes good backups, and a SOLID understanding of what each step is for and how to accomplish it. DON'T dive in blind and assume, ask questions until you have a plan with specific details. What I've outlined is just that, an outline.

Link to comment
4 minutes ago, jonathanm said:

All of this assumes good backups, and a SOLID understanding of what each step is for and how to accomplish it. DON'T dive in blind and assume, ask questions until you have a plan with specific details. What I've outlined is just that, an outline.

@AcerbicMaelin, I would suggest going one step beyond what @jonathanm is suggesting!  (I did both of my servers a couple of years ago now.)   I actually made up a table of steps to convert each hard drive-- complete with the disk descriptors that I would be using for that set of drives involved in each conversion.  I checked off each step as I went.  This is not something, you will being doing in an hour or two.  It will take you the better part of a week depending on how full your drives are.  Without a written outline of each step and check-off of each step as your proceed, it is so easy to get confused...

Link to comment

The drives are very full (only about 60GB left each on the three 4TB data drives). I'm not fussed if things take a while, but I'm concerned that my housemate might have things going that will be trying to write to the array, and I don't want to start the rebuild now and wake up tomorrow to find it now contains 4.5GB worth of stuff and the problem is now ten times harder.

 

I've left the whole array offline at the moment and will talk to him tomorrow so we can make sure the array isn't being written to while we do it, but as a temporary measure to get everything back to the last working state, is it at least possible to go back to the 4TB drive, now that unraid thinks Disk 1 is supposed to be 8TB?

 

(At least the good news is that only one of the drives is reiserfs! The other two are xfs)

Link to comment
2 minutes ago, jonathanm said:

Let me guess, you "chose" to upgrade the ReiserFS drive?🤣 I know, hindsight and all that.

 

When was your last parity check with zero errors?

The oldest drive was the one on reiserfs, so that's the one I was upgrading. I figured "why not also convert the file system at the same time" but I didn't realise that swapping the drives and starting the rebuild would mean missing my chance, only realised that after I'd already started the rebuild. (edit to clarify: I didn't know reiser was bad for 8TBs until after this debacle had already started :P)

 

The last parity check was yesterday, in preparation for the drive swap. No errors.

Edited by AcerbicMaelin
Added clarification
Link to comment
Just now, AcerbicMaelin said:

 

The last parity check was yesterday, in preparation for the drive swap. No errors.

As long as you are willing to lose anything that was written to that drive slot after the upgrade process started, then it should be pretty straightforward to get back to the old state.

 

If NOTHING was written to the array after the rebuild started, then parity should still be valid except for a few sectors.

 

Doing a new config, being extra careful to make sure all the drives are in the correct slot assignments, and selecting parity is already valid, should get you back.

 

You WILL need to do a correcting parity check to get back in sync, but things should be relatively close so the errors should be few.

Link to comment

If you get to the point of 2 XFS and 1 Rfs, then the obvious step is to upgrade one of the XFS drives, copy the content from the ReiserFS drive to the new free space, then format the ReiserFS drive to XFS.

 

I know that will leave you with an older drive in the array and a loose 4TB, but you could always hang on to the 4TB as a backup, and the next 8TB replaces the oldest drive still in the array.

Link to comment
6 minutes ago, jonathanm said:

If NOTHING was written to the array after the rebuild started, then parity should still be valid except for a few sectors.

 

Doing a new config, being extra careful to make sure all the drives are in the correct slot assignments, and selecting parity is already valid, should get you back.

 

You WILL need to do a correcting parity check to get back in sync, but things should be relatively close so the errors should be few.

I'm not confident that nothing was written - we have some dockers that might have been downloading stuff or updating their internal databases or something during the minutes while the rebuild was happening, before I stopped it. Doing the new config with 'parity is already valid' seems like it might potentially corrupt things that could be a nightmare to fix.

 

It's 4:30am now so I'll leave the thing offline and discuss with the housemate tomorrow. Maybe we just turn off any services or other stuff that could write to the drive, finish the rebuild with reiserfs on the 8TB, then use the 4TB (and some other spare hard drives we've got lying around) in the USB dock to copy the files off the 8TB, format it to xfs, then copy the files back on...

Link to comment

Maybe I missed something in this discussion but I got the impression that you might think you can convert filesystem while replacing a disk. You must format to change filesystem, and rebuilding a formatted disk results in a formatted disk. 

 

Just wanted to make sure you don't make the mistake of thinking rebuilding would get the files back on a formatted disk. Many have made that mistake. 

Link to comment
7 hours ago, trurl said:

Maybe I missed something in this discussion but I got the impression that you might think you can convert filesystem while replacing a disk. You must format to change filesystem, and rebuilding a formatted disk results in a formatted disk. 

I realise that now, but when I first started the process it didn't occur to me, and it also didn't occur to me that starting the rebuild on the 8TB disk would immediately invalidate the 4TB disk that it was replacing.

 

So: we've turned off Docker, and there will be no writes to the array, and I've just started the rebuild with the 8TB disk, which is now using reiserfs. Once the rebuild is finished, we will have:

  • an 8TB parity disk
  • an 8TB reiserfs data, containing slightly less than 4TB of data
  • 2x 4TB xfs data disks, each containing slightly less than 4TB of data
  • a USB sata dock (probably two, actually, if the old one I've got still works)
  • a spare 4TB disk and probably a couple of other, smaller spare disks lying around
  • no spare HDD slots in the server (it's an HP proliant microserver, just in case that's relevant)

 Is converting the 8TB reiserfs data disk to xfs viable with this situation?

Link to comment
16 minutes ago, trurl said:

Do you have good (enough) backups? You will obviously have to put the data from the 8TB somewhere outside the parity array so you can reformat it.

There aren't any backups of the array, but there's nothing on it that's really irreplaceable, so that doesn't matter. If the 8 TB drive only contains slightly less than 4 TB of data, will the spare 4 TB drive suffice to hold the data temporarily while it reformats?

Edited by AcerbicMaelin
Link to comment
26 minutes ago, AcerbicMaelin said:

slightly less than 4 TB of data

Might depend on how much less than 4TB it is and what filesystem the spare 4TB drive uses. I guess if it doesn't all fit you could use those other spares.

 

Were you considering using the USB dock as an Unassigned Device?

 

Another possibility would be to forget about rebuilding the ReiserFS disk onto the 8TB, and instead New Config and rebuild parity with the original 4TB ReiserFS disk back in place, then use the 8TB to upsize one of the XFS disks instead.

Link to comment
7 minutes ago, trurl said:

Might depend on how much less than 4TB it is and what filesystem the spare 4TB drive uses. I guess if it doesn't all fit you could use those other spares.

 

Were you considering using the USB dock as an Unassigned Device?

 

Another possibility would be to forget about rebuilding the ReiserFS disk onto the 8TB, and instead New Config and rebuild parity with the original 4TB ReiserFS disk back in place, then use the 8TB to upsize one of the XFS disks instead.

I don't currently know how to use the USB dock as an Unassigned Device (or what the consequences of that are), so I'm not sure. Reading through the mirroring with rsync procedure on https://wiki.unraid.net/File_System_Conversion#Mirroring_procedure_to_convert_drives, it seems like if the amount of data on the 8TB drive is small enough to fit on a 4TB (I'm pretty confident it is), then it'll work.

 

So, my tenuous current plan, noting that AFAICT there shouldn't be anything that is writing to the array during this process, is:

  1. Wait for the reiserfs rebuild to finish on the 8 TB drive
  2. Figure out how to attach the 4 TB reiserfs drive with the USB dock
  3. Figure out how to copy the data from the 8 TB drive to the 4 TB drive in the USB dock (rsync?). The 4 TB reiserfs contains mostly the same data as the 8 TB (except for anything that got written in the brief period when I started the array but hadn't yet disabled the dockers), and I vaguely got the impression that rsync has an option to be smart about that
  4. Reformat the 8 TB drive to xfs
  5. Figure out how to copy the data from the 4 TB drive in the USB dock back to the 8 TB drive (rsync?)
  6. Remove the 4 TB drive in the USB dock 

If anyone can point out any problems with this, or help flesh out the steps I'm unsure about, I'd be super appreciative. :)

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.