File System Conversion


Syco54645

Recommended Posts

So I am sitting here with an server that was setup when ReiserFS was still the recommended file system and am looking for a simple way to convert these drives to XFS and am coming up empty. It seems that ReiserFS will eventually be fully abandoned in favor of other file systems. The issue is all of the current processes require the somewhat dangerous tasks of creating a new config. Would it be possible to create a feature to aid in this process?

Edited by Syco54645
Link to comment
1 hour ago, Syco54645 said:

all of the current processes require the somewhat dangerous tasks of creating a new config

 

New Config isn't particularly dangerous, but it also isn't required (or necessarily even useful) for converting. Not sure where you got that idea.

 

Do you need some advice on converting?

Link to comment
1 hour ago, trurl said:

New Config isn't particularly dangerous, but it also isn't required (or necessarily even useful) for converting. Not sure where you got that idea.

 

Wouldn't using new config and placing a drive in the wrong location cause data loss? I do not trust myself to not mess up somewhere along the line with 10 drives to convert.

 

1 hour ago, trurl said:

Do you need some advice on converting?

 

Yes please if you can give advice I would greatly appreciate it (I am on 6.9.0 if it matters). I have posted on the reddit community multiple times and was told that I basically must use unbalance to move all of the files off of the drive then use new config to change the format of the empty drive. This video was given to me as the basic method, just not following the encryption bit.

 

 

Link to comment
24 minutes ago, trurl said:

Changing filesystem of a disk requires formatting the disk to the new filesystem. So, you have to put its files somewhere else before formatting.

 

All of your disks are very full. The simplest way to make space would be to add a disk to a new slot, or replace a disk with a larger disk.

Yes I am in the process of waiting for an 8tb to add to the array for space and in hopes of starting conversions.

 

What would the process look like for this? I would assume I have to stop anything that writes to the array and then use unbalance to move the files and this is where I get fuzzy. When I move the files are they moved as far as the array is concerned or will I have to rebuild parity?

Link to comment

Didn't notice before but your disk6 is new, though not showing up as having any capacity yet. Looks like it must be clearing

Sep 19 13:17:32 Essex kernel: md: recovery thread: clear ...

 

16 minutes ago, Syco54645 said:

will I have to rebuild parity?

All write operations to the array update parity at the same time so parity remains in sync.

In addition to writing a file, move, copy, delete, and even format, are all write operations that update parity.

  • Thanks 1
Link to comment
4 minutes ago, trurl said:

Didn't notice before but your disk6 is new, though not showing up as having any capacity yet. Looks like it must be clearing

Sep 19 13:17:32 Essex kernel: md: recovery thread: clear ...

 

All write operations to the array update parity at the same time so parity remains in sync.

In addition to writing a file, move, copy, delete, and even format, are all write operations that update parity.

 

So how can I empty a drive and not have any new files being added to it at the same time? I guess that is the only stumbling block at this point.

Link to comment
22 minutes ago, Syco54645 said:

not have any new files being added to it

I don't use unBALANCE so I don't know exactly how it plays with disks and user shares.

 

If you don't want any new files written to a disk while writing to user shares you can exclude the disk from all user shares in Global Share Settings. That would also mean no files from that disk would be included when reading user shares.

  • Thanks 1
Link to comment
32 minutes ago, trurl said:

I don't use unBALANCE so I don't know exactly how it plays with disks and user shares.

 

If you don't want any new files written to a disk while writing to user shares you can exclude the disk from all user shares in Global Share Settings. That would also mean no files from that disk would be included when reading user shares.

 

What method do you recommend for moving files from one drive to another within the array? I thought doing a "mv /mnt/disk1/* /mnt/disk11/" would not update the array. If I am incorrect then I have been given wrong information and this will be quite an easy process.

 

Link to comment
13 minutes ago, trurl said:

That is incorrect. Writing any disk in the parity array updates parity at the same time.

 

In that case the process seems to be 

  1. mv /mnt/diskX/* /mnt/diskY/
    1. Once complete make sure all files are moved
  2. Stop array
  3. Go to Disk Settings and change the File system type to xfs
  4. Start array
  5. Format the drive that is needed

Would that be a good assessment of what I need to do? Is there a better way to move the files than just mv in a screen session?

Link to comment
2 hours ago, Syco54645 said:

 

In that case the process seems to be 

  1. mv /mnt/diskX/* /mnt/diskY/
    1. Once complete make sure all files are moved
  2. Stop array
  3. Go to Disk Settings and change the File system type to xfs
  4. Start array
  5. Format the drive that is needed

Would that be a good assessment of what I need to do? Is there a better way to move the files than just mv in a screen session?

That would work fine..

 

as to whether there is a ‘better’ method that really depends on what tools you are most familiar with.  Using mv in a screen session is fine if you know how to do that.  You could achieve similar results using any file manipulation tool such as rsync, mc (midnight commander), Krusader running as a Docket containet, file manager on another machine etc.

  • Thanks 1
Link to comment
9 hours ago, itimpi said:

That would work fine..

 

as to whether there is a ‘better’ method that really depends on what tools you are most familiar with.  Using mv in a screen session is fine if you know how to do that.  You could achieve similar results using any file manipulation tool such as rsync, mc (midnight commander), Krusader running as a Docket containet, file manager on another machine etc.

Thanks! This greatly simplifies things for me.

 

Also thanks trurl for helping as well.

Link to comment
  • 2 years later...

Apologies for dusting up this old thread - but I am trying to change FS on multiple data disks from reiserfs to xfs.

 

So, I believe the above steps should work for me, I just have to do them multiple times for each of the reiserfs disks. Is that accurate?

 

Questions -

  1. Would I have to stop all dockers and VM's while doing this?
  2. Do I need to copy the contents of the disk back to the original disk after formatting it to xfs. If I don't, is there anything in config that i need to change?

Steps to follow for multiple disks:

  1. Shutdown VM and docker
  2. From Disk 1 (reiserfs) move contents to empty disk 20 (xfs)
  3. Stop Array
  4. Change Disk 1 to xfs 
  5. Restart array
  6. Format Disk 1
  7. Repeat Steps 2-6 for next disk, until all are xfs 
  8. Restart Docker and VM

One of my VM's is Home Assistant - so this would mean that all the smart home related stuff will go down during this process, is there another way?

Edited by abhi.ko
added step #6
Link to comment
11 minutes ago, abhi.ko said:

Apologies for dusting up this old thread - but I am trying to change FS on multiple data disks from reiserfs to xfs.

 

So, I believe the above steps should work for me, I just have to do them multiple times for each of the reiserfs disks. Is that accurate?

 

Questions -

  1. Would I have to stop all dockers and VM's while doing this?
  2. Do I need to copy the contents of the disk back to the original disk after formatting it to xfs. If I don't, is there anything in config that i need to change?

Steps to follow for multiple disks:

  1. Shutdown VM and docker
  2. From Disk 1 (reiserfs) move contents to empty disk 20 (xfs)
  3. Stop Array
  4. Change Disk 1 to xfs 
  5. Restart array
  6. Repeat Steps 2-5 for next disk, until all are xfs 
  7. Restart Docker and VM

One of my VM's is Home Assistant - so this would mean that all the smart home related stuff will go down during this process, is there another way?

If your containers write to the array you'd have to turn those off. Or if you store your docker image on the array. Stuff that only reads and stores data on the cache drive (like Plex) can be left running. 

 

You don't need to copy the contents back to the now empty drive. 

 

You are missing the formatting of the xfs disk but otherwise your steps seem correct to me. 

  • Like 1
Link to comment

Thank you. Edited steps to add the format disk step.

 

My docker image & libvirt image, vm domains (vdisk location) and isos (boot iso's for VM's) are all cache primary and always on the cache disk and not on the array. As far as containers that write to the array yes I do have a few like Nextcloud (data location).

 

I am okay with shutting docker off. Would it be okay to leave the VM running (just HA) while I do this. 

 

Also with not copying the content back to original disk - as per the docs this is a step, assume you did not do this in your original case was there any issues with shares and files etc.

Edited by abhi.ko
Link to comment
19 minutes ago, abhi.ko said:

Thank you - appreciate the quick responses @Syco54645.

 

If anyone else feels that I should not attempt this with the VM running please let me know - otherwise I plan to proceed with this plan. 

No problem. I wish you the best of luck. Before I did the conversion I was super anxious but after I started it really wasn't that bad. Just takes forever. 

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.