Recreating an XFS file system with `ftype=1` CentOS 7
The CentOS 7 system where the root file system is XFS (created with
setting at the time the system was installed). Unfortunately, the Docker
requires that file system to have been created with
ftype=0, the default CentOS)setting at the time the system was installed). Unfortunately, the Docker
overlay2 storage driver requires that file system to have been created with
ftype=1:
proposed method seemed to work fine. Here's the 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 | '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:
'cat /data/rootfs.dump' | xfsrestore -J - /mnt/root - Reboot. Everything should be as it was before, except
xfs_info /should now showftype=1
No comments:
Post a Comment