Recreating an XFS file system with `ftype=1`
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Dream Voyager Looping
--
Chapters
00:00 Recreating An Xfs File System With `Ftype=1`
00:57 Accepted Answer Score 16
02:28 Answer 2 Score 0
02:57 Thank you
--
Full question
https://superuser.com/questions/1321926/...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #centos #docker #xfs #rhel7
#avk47
ACCEPTED ANSWER
Score 16
My proposed method seemed to work fine. Here's my procedure:
- Boot into
CentOS-7-x86_64-LiveGNOME-1804.iso. - Open a terminal and
sudo -s. - Scan for LVM volumes:
vgscan - Change into the appropriate volume group (
centosin my case):vgchange -ay centos - Scan for the logical volumes in that group:
lvscan - Create a mount point for the root FS:
mkdir /mnt/root - Mount the logical volume corresponding to the root FS:
mount /dev/centos/root /mnt/root - Dump to remote host:
xfsdump -J - /mnt/root | ssh <host> 'cat >/data/rootfs.dump' - Unmount the root FS:
umount /mnt/root - Recreate the root FS:
mkfs.xfs -f -n ftype=1 /dev/centos/root - Mount the recreated root FS:
mount /dev/centos/root /mnt/root - Restore from remote host:
ssh <host> 'cat /data/rootfs.dump' | xfsrestore -J - /mnt/root - Reboot. Everything should be as it was before, except
xfs_info /should now showftype=1.
Note: My xfsdump call resulted in a number of warnings of the form
xfsdump: WARNING: failed to get bulkstat information for inode 10485897
According to someone who appears to be an XFS developer (link):
They can be ignored - they are inodes that were previously unlinked, but are still partially there on the snapshot volume, and visible to the by-handle interfaces that xfsdump is using to extract all of the inodes in the snapshot.
ANSWER 2
Score 0
I can confirm this worked for me too! Thank you. I pulled the original UUID using xfs_admin -u /dev/centos/root after step 5. I then used xfs_admin -U UUID /dev/centos/root after step 10. One additional step I did was after step 11, I set selinux to permissive (setenforce 0) as my first attempt produced selinux warnings or errors. I don't know if this was necessary but the errors went away.