LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-08-2014, 06:13 PM   #1
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: CrunchBang / Ubuntu
Posts: 540

Rep: Reputation: Disabled
Question EXT4 to XFS Conversion


Hi guys. I was planning to convert my storage drive of 3TB GPT disk (2TB EXT4 + 1TB NTFS) to a 1 partition of 3TB XFS.

I currently have files stored on the drive and do not want to lose them in the process.

What would be the smartest way to convert?

*Also please feel free to leave your opinions on EXT4 vs XFS. I plan to use the Drive mainly for videos, files, Linux backups and Virtual Machine Storage (XFS Strong point).

Thank you!
 
Old 04-09-2014, 10:33 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
How much data is currently stored on the file systems?

You have to copy the data to another drive(s) (backups?). There is no process that I know about for linux filesystems that will convert on the fly except for ext2/3/4.
 
1 members found this post helpful.
Old 04-09-2014, 10:38 AM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
So you want to change the ext4 filesystem to xfs, change the ntfs filesystem to xfs, merge the partitions, and expand the xfs filesystem to use the new larger partition, all on-the-fly without losing any data?

Never going to happen.

Copy the data elsewhere, wipe the drive, create a new partition and XFS filesystem from scratch, copy the data back.
 
2 members found this post helpful.
Old 04-09-2014, 11:25 AM   #4
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: CrunchBang / Ubuntu
Posts: 540

Original Poster
Rep: Reputation: Disabled
Thanks thats what I was thinking but I wanted to make sure that there was no easier way out of this.
 
Old 04-09-2014, 12:41 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Oh, there are ways, but I wouldn't recommend them without a complete and verified backup.
  1. Move the files in the NTFS partition to the ext4 partition. Depending on the space available, you might need to shrink the NTFS partition and move & expand the ext4 partition repeatedly in order to do that.
  2. Shrink the ext4 partition to the minimum possible size.
  3. Move the ext4 partition to the end of the disk.
  4. Remove the (empty) NTFS partition and create a new XFS partition as large as possible.
  5. Move files from the ext4 partition to the XFS partition. Again depending on space available, you might have to repeatedly move some files, move & shrink the ext4, and expand the XFS.
  6. Remove the empty ext4 partition and expand the XFS partition to fill the disk.
  7. Check to see how much of your data actually survived all that.
Just repartitioning/reformatting the disk and restoring everything from that backup would be way simpler and faster.

Last edited by rknichols; 04-09-2014 at 12:53 PM.
 
1 members found this post helpful.
Old 10-05-2018, 12:18 PM   #6
yArePeopleOnline
LQ Newbie
 
Registered: Oct 2018
Posts: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by suicidaleggroll View Post
So you want to change the ext4 filesystem to xfs, change the ntfs filesystem to xfs, merge the partitions, and expand the xfs filesystem to use the new larger partition, all on-the-fly without losing any data?

Never going to happen.

Copy the data elsewhere, wipe the drive, create a new partition and XFS filesystem from scratch, copy the data back.
Hello, please see the top of the notice of this website.

""Welcome to LinuxQuestions.org, a friendly and active Linux Community."

Telling someone that something is "Never going to happen" does absolutely nothing to solve the problem or answer the question they had. Furthermore you condescendingly laid out the steps the OP was getting at wanting to do. Which were already quite clear. You did this to line up your "Never going to happen" jab.

The only part of your response that had any merit to it was the last sentence.
 
Old 10-05-2018, 07:44 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
I guess we really ought to remove your name from being posted. Not sure your online name is appropriate.

Otherwise, posting that someone seems rude to you and then insulting him is kind of a two wrongs don't make a right. However the post you refer to wasn't a rude post. As noted above there doesn't seem to be a current one step way. Generally we think of conversion being an in place event that some filesystems can do.

To the OP. You could do it in chunks. Not any simple solution that I know of. No one step process will do.


Heed the warning of backup.

Last edited by jefro; 10-05-2018 at 07:46 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ext3 to ext4 conversion and vice versa thirstonlinux Linux - Newbie 1 07-15-2013 05:59 AM
LXer: Btrfs vs. EXT4 vs. XFS vs. F2FS On Linux 3.10 LXer Syndicated Linux News 0 05-18-2013 07:10 AM
[SOLVED] SSD, ext4 or xfs? qrange Linux - Software 3 02-01-2012 12:20 PM
Gfs2 vs xfs vs ext4 king_hippo Linux - Server 1 11-11-2009 11:41 PM
Question on ext3 => ext4 conversion in Jaunty WillingToLikeLinux Ubuntu 2 05-28-2009 10:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration