Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dd tool read data from volume snapshot in zfs_rename_006_pos.ksh faild #5169

Closed
liaoyuxiangqin opened this issue Sep 26, 2016 · 1 comment
Closed
Labels
Component: Test Suite Indicates an issue with the test framework or a test case

Comments

@liaoyuxiangqin
Copy link
Contributor

Dear All,
When testing zfs_rename group in test suit, i try to open the zfs_rename_006_pos.ksh
to verify rename a volume snapshot and data integrity, and find this script uesd dd tool read
data from voluem snapshot but faild. The detail test case as following description:

setup:

SUCCESS: /home/yuxiang/zfs-master/cmd/zpool/zpool create -f testpool.1321 loop0
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs create testpool.1321/testfs.1321
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs set mountpoint=/var/tmp/testdir1321 testpool.1321/testfs.1321
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs create testpool.1321/testctr1321
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs set canmount=off testpool.1321/testctr1321
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs create testpool.1321/testctr1321/testfs1.1321
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs set mountpoint=/var/tmp/testdir11321 testpool.1321/testctr1321/testfs1.1321
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs create -V 150m testpool.1321/testvol1321
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs create testpool.1321/datafs.rename
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs set mountpoint=/var/tmp/testdir21321 testpool.1321/datafs.rename
SUCCESS: eval /usr/bin/dd if=/dev/urandom of=/var/tmp/testdir21321/data.rename bs=512 count=2048 >/dev/null 2>&1

zfs_rename_006_pos:
1.Write data to this volume(testvol1321) and create a snapshot(testsnap1321) of volume.

SUCCESS: eval /usr/bin/dd if=/var/tmp/testdir21321/data.rename of=/dev/zvol/testpool.1321/testvol1321 bs=512 count=2048 >/dev/null 2>&1
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs snapshot testpool.1321/testvol1321@testsnap1321

2.Rename volume snapshot to a new one.

SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs rename testpool.1321/testvol1321@testsnap1321 testpool.1321/testvol1321@testsnap1321-new
SUCCESS: datasetexists testpool.1321/testvol1321@testsnap1321 exited 1
SUCCESS: datasetexists testpool.1321/testvol1321@testsnap1321-new

3.Rename volume to a new one.

SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs rename testpool.1321/testvol1321 testpool.1321/testvol1321-new
SUCCESS: datasetexists testpool.1321/testvol1321 exited 1
SUCCESS: datasetexists testpool.1321/testvol1321-new

4.Restore volume and snatshot name to origin.

SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs rename testpool.1321/testvol1321-new@testsnap1321-new testpool.1321/testvol1321-new@testsnap1321
SUCCESS: datasetexists testpool.1321/testvol1321-new@testsnap1321-new exited 1
SUCCESS: datasetexists testpool.1321/testvol1321-new@testsnap1321
SUCCESS: /home/yuxiang/zfs-master/cmd/zfs/zfs rename testpool.1321/testvol1321-new testpool.1321/testvol1321
SUCCESS: datasetexists testpool.1321/testvol1321-new exited 1
SUCCESS: datasetexists testpool.1321/testvol1321

5.Verify data integrity.

SUCCESS: eval dd if=/dev/zvol/testpool.1321/testvol1321 of=/var/tmp/testdir21321/voldata.rename bs=512 count=2048 >/dev/null 2>&1
ERROR: eval dd if=/dev/zvol/testpool.1321/testvol1321@testsnap1321 of=/var/tmp/testdir21321/voldata.rename bs=512 count=2048 >/dev/null 2>&1 exited 1
NOTE: Performing local cleanup via log_onexit (cleanup)

Solution: the above script test fail because used dd tool read data from volume snapshot,
and find that /dev/zvol/testpool.1321/testvol1321@testsnap1321 not exist as a dev in linux,
and i think the volume snapshot don't contains unique bytes in self beacuse the data in vloume don't change. but i also did not find a good way to modify, looking forward to advice, thanks!

@behlendorf behlendorf added the Component: Test Suite Indicates an issue with the test framework or a test case label Sep 30, 2016
@behlendorf
Copy link
Contributor

Duplicate of #5647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Test Suite Indicates an issue with the test framework or a test case
Projects
None yet
Development

No branches or pull requests

2 participants