jjl*_*lin 10 linux centos xfs docker rhel-7
我有一个 CentOS 7 系统,其中根文件系统是 XFS(使用ftype=0
,系统安装时的默认 CentOS 设置创建)。不幸的是,Dockeroverlay2
存储驱动程序需要使用以下命令创建文件系统ftype=1
:
https://docs.docker.com/storage/storagedriver/overlayfs-driver/#prerequisites
所以现在我想用ftype=1
. 我想这样做如下:
xfsdump
将根 FS 转移到远程位置。ftype=1
.xfsrestore
来自远程转储的根 FS。但是,我不确定的一件事是xfsdump
输出是否带有与ftype
设置相关的任何内容。也就是说,xfsrestore
在具有不同ftype
设置的 XFS 文件系统上执行此操作会有任何问题吗?
或者是否有更好的方法来解决这个特定问题(不涉及重新安装整个系统、重新分区等)?
jjl*_*lin 12
我提出的方法似乎工作正常。这是我的程序:
CentOS-7-x86_64-LiveGNOME-1804.iso
.sudo -s
.vgscan
centos
在我的情况下):vgchange -ay centos
lvscan
mkdir /mnt/root
mount /dev/centos/root /mnt/root
xfsdump -J - /mnt/root | ssh <host> 'cat >/data/rootfs.dump'
umount /mnt/root
mkfs.xfs -f -n ftype=1 /dev/centos/root
mount /dev/centos/root /mnt/root
ssh <host> 'cat /data/rootfs.dump' | xfsrestore -J - /mnt/root
xfs_info /
现在应该显示ftype=1
.注意:我的xfsdump
电话导致了许多形式的警告
xfsdump: WARNING: failed to get bulkstat information for inode 10485897
Run Code Online (Sandbox Code Playgroud)
据看起来是 XFS 开发人员的人说(http://xfs.9218.n7.nabble.com/xfs-and-lvm-snapshots-tp1241p1246.html):
它们可以被忽略——它们是之前未链接的 inode,但仍然部分存在于快照卷上,并且对 xfsdump 用来提取快照中所有 inode 的副句柄接口可见。
归档时间: |
|
查看次数: |
18167 次 |
最近记录: |