-1

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.

Lunatic Fnatic
  • 237
  • 1
  • 6
  • 11
  • 1
    To avoid conversion problems, would it be simpler to create a new device with the same size with filesystem xfs and sync data between them. About converting from ext2 to xfs read this guide from the RedHat portal. Link is [here](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/ch06s09.html) – Alin Andrei Oct 03 '16 at 09:42

2 Answers2

0

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.

Thomas
  • 4,155
  • 5
  • 21
  • 28
0

As @Alin told, I just created a new device with xfs file system.

Make sure you have installed XFS.

# parted /dev/sdb mklabel gpt
# parted /dev/sdb mkpart primary xfs 1 -1

# parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
(parted) mkpart primary xfs 1 -1

# mkfs.xfs -L myLabel /dev/sdb -f (I had to force overwrite)

# mkdir /myLabel
Lunatic Fnatic
  • 237
  • 1
  • 6
  • 11