Bug 3465 - [Anolis23-iso][anck][x86_64]xfs_copy命令复制失败
Summary: [Anolis23-iso][anck][x86_64]xfs_copy命令复制失败
Status: RESOLVED FIXED
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 23.0
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: ZiyangZhang
QA Contact: bolong_tbl
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-14 14:22 UTC by gitpush
Modified: 2023-02-03 10:56 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gitpush alibaba_cloud_group 2022-12-14 14:22:10 UTC
问题描述]:
在anolis23上执行xfs_copy失败
具体执行过程:
anolis8.2,软件包版本:xfsprogs-5.0.0-2.el8.x86_64

 # dd if=/dev/zero of=/tmp/test100.img bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0.0606433 s, 1.7 GB/s
[14:10:47 root@liangjian /home/wb-lj941060/anolis-pkg-tests] 
 # mkfs.xfs /tmp/test100.img
meta-data=/tmp/test100.img       isize=512    agcount=4, agsize=6400 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1
data     =                       bsize=4096   blocks=25600, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=1368, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[14:10:52 root@liangjian /home/wb-lj941060/anolis-pkg-tests] 
 # xfs_copy  /tmp/test100.img /tmp/test200.img
Creating file /tmp/test200.img
 0%  ... 10%  ... 20%  ... 30%  ... 40%  ... 50%  ... 60%  ... 70%  ... 80%  ... 90%  ... 100%

All copies completed.

anolis23执行过程,软件包版本xfsprogs-5.14.2-1.an23.x86_64

[root@iZbp12nj7zzd2hcr70xlilZ ~]# dd if=/dev/zero of=/tmp/test100.img bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0.0335108 s, 3.1 GB/s
[root@iZbp12nj7zzd2hcr70xlilZ ~]#  mkfs.xfs /tmp/test100.img
meta-data=/tmp/test100.img       isize=512    agcount=4, agsize=6400 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1    bigtime=0 inobtcount=0
data     =                       bsize=4096   blocks=25600, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=1368, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[root@iZbp12nj7zzd2hcr70xlilZ ~]# xfs_copy  /tmp/test100.img /tmp/test200.img
xfs_copy:  couldn't open target "/tmp/test200.img"
Aborting XFS copy - reason:  Invalid argument
Check logfile "/var/tmp/xfs_copy.log.Y76KYy" for more details





[环境信息]:
内核信息:
# uname -r
5.17.0-1.an23.x86_64

操作系统信息:
# cat /etc/os-release
NAME="Anolis OS"
VERSION="23"
ID="anolis"
VERSION_ID="23"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"




[问题发生概率]:必现

[期望结果]:
对照anolis8.2执行结果


[实际结果]:
执行失败


[复现步骤]:	
1、dd if=/dev/zero of=/tmp/test100.img bs=1M count=100
2、 mkfs.xfs /tmp/test100.img
3、xfs_copy  /tmp/test100.img /tmp/test200.img
Comment 1 ZiyangZhang alibaba_cloud_group 2022-12-20 16:29:33 UTC
(In reply to gitpush from comment #0)
> 问题描述]:
> 在anolis23上执行xfs_copy失败
> 具体执行过程:
> anolis8.2,软件包版本:xfsprogs-5.0.0-2.el8.x86_64
> 
>  # dd if=/dev/zero of=/tmp/test100.img bs=1M count=100
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB, 100 MiB) copied, 0.0606433 s, 1.7 GB/s
> [14:10:47 root@liangjian /home/wb-lj941060/anolis-pkg-tests] 
>  # mkfs.xfs /tmp/test100.img
> meta-data=/tmp/test100.img       isize=512    agcount=4, agsize=6400 blks
>          =                       sectsz=512   attr=2, projid32bit=1
>          =                       crc=1        finobt=1, sparse=1, rmapbt=0
>          =                       reflink=1
> data     =                       bsize=4096   blocks=25600, imaxpct=25
>          =                       sunit=0      swidth=0 blks
> naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
> log      =internal log           bsize=4096   blocks=1368, version=2
>          =                       sectsz=512   sunit=0 blks, lazy-count=1
> realtime =none                   extsz=4096   blocks=0, rtextents=0
> [14:10:52 root@liangjian /home/wb-lj941060/anolis-pkg-tests] 
>  # xfs_copy  /tmp/test100.img /tmp/test200.img
> Creating file /tmp/test200.img
>  0%  ... 10%  ... 20%  ... 30%  ... 40%  ... 50%  ... 60%  ... 70%  ... 80% 
> ... 90%  ... 100%
> 
> All copies completed.
> 
> anolis23执行过程,软件包版本xfsprogs-5.14.2-1.an23.x86_64
> 
> [root@iZbp12nj7zzd2hcr70xlilZ ~]# dd if=/dev/zero of=/tmp/test100.img bs=1M
> count=100
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB, 100 MiB) copied, 0.0335108 s, 3.1 GB/s
> [root@iZbp12nj7zzd2hcr70xlilZ ~]#  mkfs.xfs /tmp/test100.img
> meta-data=/tmp/test100.img       isize=512    agcount=4, agsize=6400 blks
>          =                       sectsz=512   attr=2, projid32bit=1
>          =                       crc=1        finobt=1, sparse=1, rmapbt=0
>          =                       reflink=1    bigtime=0 inobtcount=0
> data     =                       bsize=4096   blocks=25600, imaxpct=25
>          =                       sunit=0      swidth=0 blks
> naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
> log      =internal log           bsize=4096   blocks=1368, version=2
>          =                       sectsz=512   sunit=0 blks, lazy-count=1
> realtime =none                   extsz=4096   blocks=0, rtextents=0
> [root@iZbp12nj7zzd2hcr70xlilZ ~]# xfs_copy  /tmp/test100.img /tmp/test200.img
> xfs_copy:  couldn't open target "/tmp/test200.img"
> Aborting XFS copy - reason:  Invalid argument
> Check logfile "/var/tmp/xfs_copy.log.Y76KYy" for more details
> 
> 
> 
> 
> 
> [环境信息]:
> 内核信息:
> # uname -r
> 5.17.0-1.an23.x86_64
> 
> 操作系统信息:
> # cat /etc/os-release
> NAME="Anolis OS"
> VERSION="23"
> ID="anolis"
> VERSION_ID="23"
> PLATFORM_ID="platform:an23"
> PRETTY_NAME="Anolis OS 23"
> ANSI_COLOR="0;31"
> HOME_URL="https://openanolis.cn/"
> BUG_REPORT_URL="https://bugzilla.openanolis.cn/"
> 
> 
> 
> 
> [问题发生概率]:必现
> 
> [期望结果]:
> 对照anolis8.2执行结果
> 
> 
> [实际结果]:
> 执行失败
> 
> 
> [复现步骤]:	
> 1、dd if=/dev/zero of=/tmp/test100.img bs=1M count=100
> 2、 mkfs.xfs /tmp/test100.img
> 3、xfs_copy  /tmp/test100.img /tmp/test200.img

这几个文件不支持direct IO,xfs_copy默认direct IO。

带上 -b 参数来测试看看?例如:
xfs_copy -b /tmp/test100.img /tmp/test200.img
Comment 2 gaoxiang alibaba_cloud_group 2022-12-20 16:53:06 UTC
/tmp目录anolis 8和anolis 23都是什么文件系统。
Comment 3 ZiyangZhang alibaba_cloud_group 2023-02-03 10:56:19 UTC
fixed 测试用例已经更新