how can change filesystem from ext4 to xfs

how can I change filesystem from ext4 to xfs without data losing? I've centos7 on Arvan cloud (IaaS like linode) and I don't have special permisson.


Solution 1:

  1. Make a backup
  2. unmount the disk/partition/volume
  3. format the disk/partition/volume with mkfs.xfs
  4. restore the data from backup.