From: bugzilla-daemon@kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 220288] New: A typo Leads to loss of all data on disk
Date: Fri, 27 Jun 2025 22:22:50 +0000 [thread overview]
Message-ID: <bug-220288-13602@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=220288
Bug ID: 220288
Summary: A typo Leads to loss of all data on disk
Product: File System
Version: 2.5
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: ext4
Assignee: fs_ext4@kernel-bugs.osdl.org
Reporter: martin.vahi@softf1.com
Regression: No
I wanted to run
fsck.ext4 /dev/sdc1
but accidentally missed the "1" at the end by typing
fsck.ext4 /dev/sdc
and lost all data on /dev/sdc
My suggestion is that there should be some regex based test to see, if the
partition name candidate ends with a base 10 digit and if it does not, then a
confirmation prompt, possibly with red text, should be displayed that explains
the consequences and asks for confirmation. For non-interactive use of the
fsck.ext4 /dev/sdc
there could be an extra parameter, "--skip_warning_prompts", which should be
mentioned at the text of all interactive warnings so that people, who stumble
on those interactive warnings do not need to look it up form fsck.ext4 man
page. A temporary workaround for myself is a Bash alias that wraps the
fsck.ext4, but in my opinion that's a dirty workaround and such critical
warnings should be part of the tool itself, specially given how common the
fsck.ext4 usage is with USB-HDDs and USB memory sticks.
Thank You for reading this bug report.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next reply other threads:[~2025-06-27 22:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 22:22 bugzilla-daemon [this message]
2025-06-28 2:48 ` [Bug 220288] New: A typo Leads to loss of all data on disk Theodore Ts'o
2025-06-28 2:48 ` [Bug 220288] " bugzilla-daemon
2025-06-28 8:47 ` bugzilla-daemon
2025-06-28 8:57 ` bugzilla-daemon
2025-06-28 9:37 ` bugzilla-daemon
2025-06-28 21:32 ` bugzilla-daemon
2025-06-28 21:39 ` bugzilla-daemon
2025-07-02 19:36 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-220288-13602@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox