[Bug 242341] GEOM / GEOM_PART: silent discard MBR modification
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Dec 1 17:17:04 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242341
Bug ID: 242341
Summary: GEOM / GEOM_PART: silent discard MBR modification
Product: Base System
Version: 12.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs at FreeBSD.org
Reporter: tomek at cedro.info
Hello world,
I am unable to clone a pendrive with `dd if=/dev/da0 of=/dev/da1` because
GEOM_PART considers disk broken and silently prevents writing _all_ data (it
discards MBR), thus:
1. OS / GEOM is hiding things from operator. It does not write bytes
as instructed to fix the disk, instead, it considers disk invalid and
silently discards _only_some_of_the_data_ with no clear error/warning
indication. Unacceptable!!!
2. OS / GEOM lies to operator. It does return a SUCCESS code while
_some_ data goes to /dev/null. Unacceptale!!!
3. If disk is _considered_ broken then access should be _fully_
blocked. But how am I supposed to fix it when OS silently blocks
essential part of the fix? Who allows writing over a corrupted disk
anyway? This looks typical Linux way, and we don't really like Linux for that,
right?
4. OS / GEOM is broken and incoherent in this area and proves system
unreliable / not trustworthy. This needs to be fixed please.
Solution proposal:
1. Do not hide actions / never lie to the user. Do what superuser wants.
2. When disk is _considered_ broken then access should be blocked returning I/O
Error with DMESG message and instructions how to use sysctl that will allow
writing to a _whole_ disk in order to fix it.
3. Use clear _warnings_ but perform actions, or use _errors_ and prevent
actions.
Thank you :-)
Tomek
ugen0.8: <Kingston DataTraveler 3.0> at usbus0
umass1 on uhub0
umass1: <Kingston DataTraveler 3.0, class 0/0, rev 3.20/1.10, addr 7> on usbus0
umass1: SCSI over Bulk-Only; quirks = 0x8100
umass1:3:1: Attached to scbus3
da1 at umass-sim1 bus 1 scbus3 target 0 lun 0
da1: <Kingston DataTraveler 3.0 PMAP> Removable Direct Access SPC-4 SCSI device
da1: Serial Number BLAHBLAH
da1: 400.000MB/s transfers
da1: 118272MB (242221056 512 byte sectors)
da1: quirks=0x2<NO_6_BYTE>
GEOM_PART: integrity check failed (da1, MBR) <--- here is the only problem
indication
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list