xfs
[Top] [All Lists]

Re: [PATCH] xfs_mkfs: wipe old signatures from the device

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs_mkfs: wipe old signatures from the device
From: Hugo Mills <hugo@xxxxxxxxxxxxx>
Date: Thu, 14 Feb 2013 14:54:51 +0000
Cc: LukÃÅ Czerner <lczerner@xxxxxxxxxx>, Chris Murphy <lists@xxxxxxxxxxxxxxxxx>, Karel Zak <kzak@xxxxxxxxxx>, xfs@xxxxxxxxxxx, sandeen@xxxxxxxxxx, Zach Brown <zabrown@xxxxxxxxxx>, linux-btrfs@xxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20130214110423.GN26694@dastard>
Mail-followup-to: Hugo Mills <hugo@xxxxxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, LukÃÅ Czerner <lczerner@xxxxxxxxxx>, Chris Murphy <lists@xxxxxxxxxxxxxxxxx>, Karel Zak <kzak@xxxxxxxxxx>, xfs@xxxxxxxxxxx, sandeen@xxxxxxxxxx, Zach Brown <zabrown@xxxxxxxxxx>, linux-btrfs@xxxxxxxxxxxxxxx
References: <1360667215-14701-1-git-send-email-lczerner@xxxxxxxxxx> <20130212202753.GC26694@dastard> <20130213080154.GC18597@xxxxxxxxxxx> <alpine.LFD.2.00.1302131127070.2315@(none)> <20130213121655.GA7799@xxxxxxxxxxx> <20130213221720.GH26694@dastard> <982B8DBB-3FBA-4213-BC92-848A64C60110@xxxxxxxxxxxxxxxxx> <alpine.LFD.2.00.1302140929570.2315@(none)> <20130214110423.GN26694@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Feb 14, 2013 at 10:04:23PM +1100, Dave Chinner wrote:
> On Thu, Feb 14, 2013 at 09:36:38AM +0100, LukÃÅ Czerner wrote:
> > On Thu, 14 Feb 2013, Chris Murphy wrote:
> > 
> > > Date: Thu, 14 Feb 2013 00:29:59 -0700
> > > From: Chris Murphy <lists@xxxxxxxxxxxxxxxxx>
> > > To: Dave Chinner <david@xxxxxxxxxxxxx>
> > > Cc: Karel Zak <kzak@xxxxxxxxxx>, LukÃÅ Czerner <lczerner@xxxxxxxxxx>,
> > >     xfs@xxxxxxxxxxx, sandeen@xxxxxxxxxx, Zach Brown <zabrown@xxxxxxxxxx>,
> > >     linux-btrfs@xxxxxxxxxxxxxxx
> > > Subject: Re: [PATCH] xfs_mkfs: wipe old signatures from the device

> > So I
> > think that it got to the point where users will usually use mkfs.xfs
> > -f all the time. And even if they did not and they would use a wrong
> > device they would probably get the same warning even for the device
> > they wanted to use in the first place.
> 
> I get a couple of queries a year from people saying they
> accidentally ran mkfs.ext4 on the wrong device and want to know if
> they can recover their XFS filesystem. The next question is usually
> "why didn't mkfs.ext4 warn me there was an existing filesystem on
> the device like mkfs.xfs does?".
> 
> That is why the "don't overwrite an existing filesystem by default"
> behaviour is important. Users like to be protected from mistakes
> they weren't aware they made, and far too few of our filesystem
> utilities provide that safety net.
> 
> A couple of users a year losing data like this is a couple of users
> too many. Especially when it would only take a couple of hours of
> your time to implement....
> 
> > So even thoug it might help in some cases I do not think that we
> > should go and change all file systems to do that as well, it would
> > not be very useful anyway.
> 
> Tell that to the next user that trashes their data because a
> filesystem tool simply assumed in correctly that it owned the block
> device.

   We had someone on IRC a day or two ago who had done exactly this.
They're not the only one -- I can recall seeing at least one other
person who managed to mkfs.btrfs on an existing filesystem.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
  --- I am but mad north-north-west:  when the wind is southerly, I ---  
                       know a hawk from a handsaw.                       

Attachment: signature.asc
Description: Digital signature

<Prev in Thread] Current Thread [Next in Thread>