Bug 162905 - -E flag in newfs(8) has no effect
Summary: -E flag in newfs(8) has no effect
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-27 17:00 UTC by Robert Millan
Modified: 2017-12-31 22:32 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Millan 2011-11-27 17:00:21 UTC
-E flag in newfs doesn't erase the whole device. For one thing, it returns immediately (which is unexpected since DIOCGDELETE ioctl is a blocking call). On the other hand, pre-existing filesystems continue to be usable:

# zpool create -m none -f test /dev/ada1s1
# zpool export test
# newfs -E /dev/ada1s1
[...]
Erasing sectors [128...16773119]
[...]
# zpool import test
#

Fix: 

I don't know the fix, but it seems most likely a kernel bug (I've verified that DIOCGDELETE ioctl is indeed being called).
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:48 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped