Skip to content

Commit

Permalink
Fix zpool_add_005_pos
Browse files Browse the repository at this point in the history
Under Linux the existence of a block device in /etc/fstab is
not sufficient to prevent the use of the force flag.  Without
the force flag a warning will be printed that the device has
a filesystem of a given type.  Providing the force option
will overwrite that filesystem as long as it is not actively
mounted.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Tested-by: bunder2015 <[email protected]>
Signed-off-by: bunder2015 <[email protected]>
Closes openzfs#6267 
Closes openzfs#6272
  • Loading branch information
bunder2015 authored and behlendorf committed Jun 27, 2017
1 parent 58404a7 commit 47770d3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ log_must poolexists "$TESTPOOL1"
unset NOINUSE_CHECK
log_mustnot zpool add -f "$TESTPOOL" ${disk}${SLICE_PREFIX}${SLICE1}
log_mustnot zpool add -f "$TESTPOOL" $mnttab_dev
log_mustnot zpool add -f "$TESTPOOL" $vfstab_dev
if is_linux; then
log_mustnot zpool add "$TESTPOOL" $vfstab_dev
else
log_mustnot zpool add -f "$TESTPOOL" $vfstab_dev
fi

if ! is_linux; then
log_must echo "y" | newfs ${DEV_DSKDIR}/$dump_dev > /dev/null 2>&1
Expand Down

0 comments on commit 47770d3

Please sign in to comment.