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


Recommended Posts

Okay, so far so good:

  1. the 8TB drive finished rebuilding
  2. I mounted the old 4 TB reiserfs drive with the USB dock using Unassigned Devices (/mnt/disks/USB3.0_Generic_USB_Device/)
  3. Copied everything from the 8 TB to the 4 TB using "rsync -avPX /mnt/disk1/ /mnt/disks/USB3.0_blahblah/" (this only took a couple of minutes, since the drives contained mostly the same data)
  4. Made a 'new config', removed disk1 from the array, started the array in maintenance mode so the array drives didn't start, used Destructive Mode in Unassigned Devices to format the 8TB drive as xfs
  5. Mounted the USB 4TB drive and the 8TB drive as Unassigned Devices
  6. In a tmux session, used "rsync -avPX /mnt/disks/USB3.0_blahblah /mnt/disks/WDCblahblah" to copy all the files from the 4TB in the USB dock back to the 8TB (currently unassigned) drive. This is the step that is currently progressing.
  7. When it finishes, I will add the 8TB back into the array as disk1, and will rebuild parity (I will very deliberately not say that parity is valid)

I chose not to do the parity rebuild with the freshly-formatted 8TB in the array before copying the data back to the disk, because that would result in making two parity runs - once for the rebuild with the formatted 8TB, and a second time while copying the data from the 4TB. I'm aware of the slight risk of having the array unprotected in the meantime, but nothing on this system is really irreplaceable, and the data will still be on the 4TB if something goes wrong. The array disks are currently unmounted (array is in maintenance mode) so nothing can interfere with them.

Link to comment

Just to make sure, In step 7 you will have to do a New Config again keeping all current assignments and then add disk1 back before starting the array and rebuilding parity.     If you simply add it back without going through the New Config step Unraid would promptly start to clear it (writing zeroes) to maintain parity when you start the array thus zapping the data you had just copied.

 

An alternative approach that bypasses using New Config would have been carry out the format change at step 4 by stopping the array; changing the disk1 format to xFS; starting the array; formatting disk1 which would now show as unmountable and available to be formatted (to XFS) and then simply copied the data back to disk1 which would now be in XFS format.   The advantage of this approach is that the array would remain in a protected state throughout.

 

Link to comment
20 minutes ago, itimpi said:

Just to make sure, In step 7 you will have to do a New Config again keeping all current assignments and then add disk1 back before starting the array and rebuilding parity.     If you simply add it back without going through the New Config step Unraid would promptly start to clear it (writing zeroes) to maintain parity when you start the array thus zapping the data you had just copied.

 

An alternative approach that bypasses using New Config would have been carry out the format change at step 4 by stopping the array; changing the disk1 format to xFS; starting the array; formatting disk1 which would now show as unmountable and available to be formatted (to XFS) and then simply copied the data back to disk1 which would now be in XFS format.   The advantage of this approach is that the array would remain in a protected state throughout.

 

Thanks for the heads up! I *probably* would have figured out the new config thing myself but good to have a warning.

 

I think the reason I didn't just change the disk1 format was that the disk wasn't cleared and had data on it, and I wasn't confident that just telling the server "this is disk1, it's xfs now, yes format it that way" when it already contained data wouldn't invalidate my parity and cause potential problems. But maybe I'm wrong about that?

Link to comment
2 minutes ago, AcerbicMaelin said:

Thanks for the heads up! I *probably* would have figured out the new config thing myself but good to have a warning.

 

I think the reason I didn't just change the disk1 format was that the disk wasn't cleared and had data on it, and I wasn't confident that just telling the server "this is disk1, it's xfs now, yes format it that way" when it already contained data wouldn't invalidate my parity and cause potential problems. But maybe I'm wrong about that?

As far as Unraid is concerned a format is just a normal write operation so parity is automatically updated as it is run so you would have been fine.  At the level at which parity runs it is not aware of file systems and their type - just of physical sectors on the disks.

Link to comment
3 hours ago, itimpi said:

As far as Unraid is concerned a format is just a normal write operation so parity is automatically updated as it is run so you would have been fine.  At the level at which parity runs it is not aware of file systems and their type - just of physical sectors on the disks.

Ahhhhh that makes sense. Well, useful to know next time I need to do some mucking around with file systems, not that I have any reiserfs drives left now :)

Link to comment

Okay! Strange hiccup.

  1. I finished copying all the files over to the 8TB drive using rsync
  2. ssh'd into the server, can browse around in that 8TB disk while it is mounted with Unassigned Devices as /mnt/disks/WDC_WD80EFAX-blahblah and see all the files
  3. Unassigned Devices shows that disk as formated with xfs, and so does "df -T" (listed as /dev/sdb1)
  4. Stopped the array, went to Tools>New Config, Preserve Current Assignments: All, Yes I Want To Do This, Apply, Done
  5. Went to Main tab to configure the array, all disks showing the 'blue' icon. Selected dropdown for Disk 1 which was unassigned, set it to WDC_WD80EFAX-blahblah
  6. Press Start to start the array, "Parity disk content will be overwritten", Proceed
  7. But now in the array devices section it reports disk 1 as being "Unmountable: No file system", and down the bottom in the Array Operation it says "Unmountable disk present: Disk 1 - WDC_WD80EFAX-blahblah" and offers to format the disk.

I tried again, but this time when I was assigning Disk 1 to be the WDC-WD80EFAX-blahblah, I clicked on the disk and manually set its file system to 'xfs' instead of 'auto', but it still gives the same messages. Any ideas?

Link to comment
12 minutes ago, AcerbicMaelin said:

now in the array devices section it reports disk 1 as being "Unmountable: No file system"

On 10/25/2020 at 12:00 AM, AcerbicMaelin said:

used Destructive Mode in Unassigned Devices to format the 8TB drive as xfs

Were you using the current version of Unassigned Devices when you formatted the drive?

 

Link to comment
1 minute ago, trurl said:

Were you using the current version of Unassigned Devices when you formatted the drive?

 

When I look in the Plugins screen it appears I have version 2020.10.24, and there is an update for 2020.10.25 now available. Unassigned Devices Plus is version 2020.05.22.

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

When I look in the Plugins screen it appears I have version 2020.10.24, and there is an update for 2020.10.25 now available. Unassigned Devices Plus is version 2020.05.22.

That should be good for formatting. Just wanted to make sure it wasn't a very old version.

 

Post new diagnostics.

Link to comment
  • 1 month later...
25 minutes ago, CrashnBrn said:

Would there be any issues following the converting procedure (https://wiki.unraid.net/File_System_Conversion#Mirroring_procedure_to_convert_drives) but having the larger driver mounted via USB (drive 11 in the guide) rather than internally in the array?

 

I don't have anymore ports to mount the drive internally.

You could use Unassigned Devices to mount that USB drive. I don't recommend USB in the parity array for multiple reasons:

 

Link to comment
10 minutes ago, trurl said:

Or maybe it's time to consider upsizing your disks if you have no free capacity and no ports to add disks.

Yup that's what I'm doing, I just wanted to convert from RFS to XFS. I don't plan on keeping the external drive in the parity, it's just for the one time move to rsync from RFS to XFS. Then I'd swap the external drive with the internal.

 

So my original question was if it would be ok to rsync internal RFS to external XFS then swap drives once complete.

 

Sorry if I didn't make that clear.

Edited by CrashnBrn
Link to comment
16 minutes ago, trurl said:

Other idea would be to increase capacity first by rebuilding RFS to larger disk, then work with the extra space to empty other RFS disks and reformat them to XFS.

That's a great idea. I did watch Spaceinvader One's video about using unbalance to do that, and that might be a better option for me. 

 

Edit: If anyone else is curious: 

 

Edited by CrashnBrn
Link to comment
19 minutes ago, trurl said:

Other idea would be to increase capacity first by rebuilding RFS to larger disk, then work with the extra space to empty other RFS disks and reformat them to XFS.

If you start with the disk that has the least amount of data and rebuild it to a larger disk you will get the most free space to work with.

Link to comment
  • 1 year later...

I read this thread too late and think I messed up while trying to convert from Reiserfs to xfs. I was trying to replace a 6TB drive with an 18TB drive, selected xfs as the file system, formatted the drive, and started the rebuild. Now it looks like the new drive is empty while the rebuild is completing (first post in this thread supports that). What's the best method here to try to recover the data? Just put the old 6TB drive in another computer and transfer over?

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.