Skip to content

Commit

Permalink
ZTS: issue openzfs#14223: add check for /dev changes after snapshot r…
Browse files Browse the repository at this point in the history
…ename

After renaming a snapshot with 'snapdev=visible' ensure that the /dev
entries are updated to reflect the rename.

Signed-off-by: James Dingwall <james@dingwall.me.uk>
  • Loading branch information
JKDingwall committed Oct 4, 2024
1 parent 5a0616c commit 3c2f69a
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,15 @@ verify_inherited 'snapdev' 'hidden' $SUBZVOL $VOLFS
blockdev_missing $SUBSNAPDEV
blockdev_exists $SNAPDEV

# 4. Verify "rename" is correctly reflected when "snapdev=visible"
# 4.1 First create a snapshot and verify the device is present
log_must zfs snapshot $SNAP
log_must zfs set snapdev=visible $ZVOL
blockdev_exists $SNAPDEV
# 4.2 rename the snapshot and verify the devices are updated
log_must zfs rename $SNAP $SNAP-new
blockdev_missing $SNAPDEV
blockdev_exists $SNAPDEV-new
log_must zfs destroy $SNAP-new

log_pass "ZFS volume property 'snapdev' works as expected"

0 comments on commit 3c2f69a

Please sign in to comment.