* BUG :: btrfs resize should require mount point not just /some/path
@ 2014-11-18 10:52 Robert White
2014-11-18 12:16 ` Paul Jones
0 siblings, 1 reply; 2+ messages in thread
From: Robert White @ 2014-11-18 10:52 UTC (permalink / raw)
To: Btrfs BTRFS
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: BUG :: btrfs resize should require mount point not just /some/path
2014-11-18 10:52 BUG :: btrfs resize should require mount point not just /some/path Robert White
@ 2014-11-18 12:16 ` Paul Jones
0 siblings, 0 replies; 2+ messages in thread
From: Paul Jones @ 2014-11-18 12:16 UTC (permalink / raw)
To: Robert White, Btrfs BTRFS
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1359 bytes --]
> -----Original Message-----
> From: linux-btrfs-owner@vger.kernel.org [mailto:linux-btrfs-
> owner@vger.kernel.org] On Behalf Of Robert White
> Sent: Tuesday, 18 November 2014 9:52 PM
> To: Btrfs BTRFS
> Subject: BUG :: btrfs resize should require mount point not just /some/path
>
> 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.
I have done the same thing myself, commonly when using scrub, but also using add/del device.
It's most alarming!
Paul.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±ý»k~ÏâØ^nr¡ö¦zË\x1aëh¨èÚ&£ûàz¿äz¹Þú+Ê+zf£¢·h§~Ûiÿÿïêÿêçz_è®\x0fæj:+v¨þ)ߣøm
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-18 12:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 10:52 BUG :: btrfs resize should require mount point not just /some/path Robert White
2014-11-18 12:16 ` Paul Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.