Re: Possible to undo subvol delete?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 02, 2014 at 02:09:45PM +0000, Hugo Mills wrote:
> On Tue, Dec 02, 2014 at 01:52:52PM +0100, David Sterba wrote:
> > On Mon, Dec 01, 2014 at 10:14:03PM -0500, Zygo Blaxell wrote:
> > > > export BTRFS_SUBVOLUME_DELETE_CONFIRM=1
> > > > 
> > > > Ideas?
> > > 
> > > Never rely on aliasing or environment variables for defaults, and never
> > > change default behavior if your releases are old enough that someone
> > > has built scripts on top of them.  ;)
> > 
> > Exactly.
> > 
> > > If I had to pick the least evil, I'd go for interactive prompting by
> > > default (do nothing if the interaction fails, e.g. no TTY) and add a
> > > '-f'/'--force' flag to bypass the prompt.
> > 
> > This sounds acceptable.
> > 
> > > This is consistent with the
> > > way lvm2 and mdadm work when presented with data-losing or otherwise
> > > questionable commands and parameters.  It will break scripts, but btrfs
> > > users should still be expecting that for a while as undesirable default
> > > behaviors are identified.
> > 
> > How is this going to break scripts?
> 
>    Any script which relies on being able to delete subvolumes in
> unattended operation will now require modification to use -f.

Even with the tty/interactive shell detection in place? Maybe I
understood the reference to lvm/mdadm tools wrong. My idea is that the
scripts would work as now, no prompts there.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux