大网数据广告活动
服务器运维问答

When to use xfs_copy, and when to use xfsdump

· 52CE 我爱测

I'm about to copy data from one XFS file system to another (smaller) XFS file system. The file systems may be unmounted while copying. I don't want to have to worry about ACLs, SELinux contexts, etc, so I'm looking at xfs_copy an…

问题原文

原帖链接 · Troels Arvin · CC BY-SA 3.0

I'm about to copy data from one XFS file system to another (smaller) XFS file system. The file systems may be unmounted while copying. I don't want to have to worry about ACLs, SELinux contexts, etc, so I'm looking at xfs_copy and xfsdump.

When should xfs_copy be used instead of xfsdump, and vice versa? Is one quicker than the other?

已采纳解答

原帖链接 · shodanshok · CC BY-SA 4.0

xfs_copy should be used when doing an image of the source filesystem - ie: very similar to what dd would do.

xfsdump copies filesystem content rather than creating a true filesystem image. This measn xfsdump walk the filesystem and, iterating on each object, copies each file/dir (including their attributes).

When using xfs_copy vs xfsdump? From xfs_copy man page:

When moving filesystems from one disk to another, if the original filesystem is significantly smaller than the new filesystem, and will be made larger, we recommend that mkfs.xfs(8) and xfsdump(8)/xfsrestore(8) be used instead of using xfs_copy and xfs_growfs(8). The filesystem layout resulting from using xfs_copy/xfs_growfs is almost always worse than the result of using mkfs.xfs/xfsdump/xfsrestore but in the case of small filesystems, the differences can have a significant performance impact.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-04-10)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。