Convert BTRFS to XFS


Recommended Posts

There's a LOT of data on that drive.  To save time, could I just pull the drive, do a preclear, format to XFS and replace in the system and let data rebuild restore the data?  I have a test system I could do the preclear/format on.

Nope. Rebuild will simply rebuild the drive EXACTLY as it was, including the old filesystem type and all.

 

You need to copy data off the drive, format as xfs, then recopy data back.

 

Alternatively, its a lot easier to do if you have an entirely blank drive, then you dont have to copy the data back to the original. You merely switch off which drive is empty. This is how I converted my 6 2TB RFS drive system over to XFS.

Link to comment
  • 1 month later...

After a parity drive failure I copied all the data from my server, reformatted everything and started afresh.  I have noticed (months after doing this) that 3 of my 6 drives are btrfs?? the default filesystem is set to xfs so no idea how this happened!  anyhow, I have 3.5TB free of my 10TB system and would like to move data off each disk at a time, reformat it and put it back into the array, from experience, what is the best way to do this?

 

Many Thanks

Link to comment

After a parity drive failure I copied all the data from my server, reformatted everything and started afresh.  I have noticed (months after doing this) that 3 of my 6 drives are btrfs?? the default filesystem is set to xfs so no idea how this happened!  anyhow, I have 3.5TB free of my 10TB system and would like to move data off each disk at a time, reformat it and put it back into the array, from experience, what is the best way to do this?

 

Many Thanks

Basic principles of this thread apply.
Link to comment

Hi,

 

I am doing it using the method on the wiki with rsync

 

"Another method involves using rsync which would be better if you wanted to only copy the differences between the source and dest dirs. rsync -a /mnt/disk3/ /mnt/user will copy the contents of disk3 to /mnt/user. Use the -n flag to do a dry run."

 

the disk I am trying to remove is Disk1 and I typed the command

 

rsync -a -n /mnt/disk 1 /mnt/user

 

but looking at the disk usage Disk 1 has gone from 1.50TB used to 1.72TB used?

 

How can it be safe to remove this disk if content is being copied to it?

 

Many Thanks

Link to comment

Hi,

 

I am doing it using the method on the wiki with rsync

 

"Another method involves using rsync which would be better if you wanted to only copy the differences between the source and dest dirs. rsync -a /mnt/disk3/ /mnt/user will copy the contents of disk3 to /mnt/user. Use the -n flag to do a dry run."

 

the disk I am trying to remove is Disk1 and I typed the command

 

rsync -a -n /mnt/disk 1 /mnt/user

 

but looking at the disk usage Disk 1 has gone from 1.50TB used to 1.72TB used?

 

How can it be safe to remove this disk if content is being copied to it?

 

Many Thanks

 

Yikes. Sounds like a recipe for disaster!

 

As a rule of thumb - never mix disk shares and user shares without understanding what you doing to 100%. The same goes for using the command line in general, an extra space or the wrong character somewhere can cause massive problems.

Link to comment

But I followed the wiki!

 

https://lime-technology.com/wiki/index.php/FAQ_remove_drive

 

Another method involves using rsync which would be better if you wanted to only copy the differences between the source and dest dirs. rsync -a /mnt/disk3/ /mnt/user will copy the contents of disk3 to /mnt/user. Use the -n flag to do a dry run.

 

You should really read the thread jonathanm linked instead.

 

My warning still stands. Sorry if I'm coming off as rude, I am just in a bit concerned. It is not unheard of for users to destroy their data through the terminal. Trying to copy commands you don't understand will get you into trouble.

 

For example, these two commands mean very different things:

rsync -a -n /mnt/disk 1 /mnt/user

rsync -a -n /mnt/disk1 /mnt/user

 

You might also want to look up what "dry run" means.

 

 

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.