From: Robert White <rwhite@pobox.com>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: BUG :: btrfs resize should require mount point not just /some/path
Date: Tue, 18 Nov 2014 02:52:25 -0800 [thread overview]
Message-ID: <546B24E9.2020705@pobox.com> (raw)
So here's a thing...
If you've got a BTRFS root file system and you mount go to resize a
removable media and you make a typo you can easily resize your root
instead of a target.
mkdir /media/vol1 /media/vol2
mount /dev/sdz1 /media/vol2 # intended vol1
btrfs resize -32G /media/vol1
umount /dev/sdz1
#proceed to fark up /dev/sdz1 with partitioning tools
Since resize will accept _any_ existing directory (or even filename?) as
the target of a resize instead of limiting the targets to known
mount-points it pretty much invites mistakes.
The system _should_ error out on any path thats not a mount point in the
name of safety alone.
A message like "/some/path not a mounted file system" would be less
surprising than operating on a file system when any arbitrary directory
is named.
next reply other threads:[~2014-11-18 10:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 10:52 Robert White [this message]
2014-11-18 12:16 ` BUG :: btrfs resize should require mount point not just /some/path Paul Jones
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=546B24E9.2020705@pobox.com \
--to=rwhite@pobox.com \
--cc=linux-btrfs@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