zpool_reopen_004_pos: Clear label from offline disk after destroy

zpool_reopen_004_pos destroys a pool with an offline disk, leaving its
label intact. In TrueNAS local repo, zpool_reopen_005_pos is skipped,
causing zpool_reopen_007_pos to fail as it doesn't use -f flag when
creating pools unlike zpool_reopen_005_pos.

Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Closes #17831
This commit is contained in:
Ameer Hamza 2025-10-10 20:53:11 +05:00 committed by Tony Hutter
parent 964dfc3176
commit 30a3e609a2

View File

@ -47,6 +47,8 @@ function cleanup
# bring back removed disk online for further tests
insert_disk $REMOVED_DISK $scsi_host
poolexists $TESTPOOL && destroy_pool $TESTPOOL
# Since the disk was offline during destroy, remove the label
zpool labelclear $DISK2 -f
}
log_assert "Testing zpool reopen with pool name as argument"