Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Dec 2019 17:17:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 242341] GEOM / GEOM_PART: silent discard MBR modification
Message-ID:  <bug-242341-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242341

            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@FreeBSD.org
          Reporter: tomek@cedro.info

Hello world,

I am unable to clone a pendrive with `dd if=3D/dev/da0 of=3D/dev/da1` becau=
se
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 th=
at,
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 us=
bus0
umass1:  SCSI over Bulk-Only; quirks =3D 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 de=
vice
da1: Serial Number BLAHBLAH
da1: 400.000MB/s transfers
da1: 118272MB (242221056 512 byte sectors)
da1: quirks=3D0x2<NO_6_BYTE>
GEOM_PART: integrity check failed (da1, MBR) <--- here is the only problem
indication

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-242341-227>