How to convert ext2 to xfs file system on Centos 7

I want to convert my partition file system ext2 to xfs since I will be dealing with larger files.

I am not quite sure how to do it, should I convert ext2 to ext4 first, then ext4 to xfs or direct conversion to ext2 -> ext4 possible?

I only know how to convert ext2 to ext4;

tune2fs -O dir_index,has_journal,uninit_bg /dev/hdXX

If possible, could you please explain how?

Thanks in advance.


As far as I know, there is now possibility to convert an ext-filesystem to XFS.

So you have to move the data to somewhere else, create an XFS filesystem and move it back.

Source : Link , Question Author : Lunatic Fnatic , Answer Author : Thomas

Leave a Comment