Would it make sense for btrfs to support a write zeros to empty space
erase? I know it would be slow as it would have to write to all the
free space in the file system but it would be useful.

It's probably pretty far down the priority list for development though I expect.

On Tue, Mar 19, 2013 at 6:18 AM, Chris Mason <chris.ma...@fusionio.com> wrote:
> Quoting Kyle (2013-03-18 14:15:17)
>> Hi,
>>
>> After reading through the btrfs documentation I'm curious to know if
>> it's possible to ever securely erase a file from a btrfs filesystem (or
>> ZFS for that matter). On non-COW filesystems atop regular HDDs one can
>> simply overwrite the file with zeros or random data using dd or some
>> other tool and rest assured that the blocks which contained the
>> sensitive information have been wiped. However on btrfs it would seem
>> any such attempt would write the zeros/random data to a new location,
>> leaving the old blocks with the sensitive data intact. Further, since
>> specifying NOCOW is only possible for newly created files, there seems
>> to be no way to overwrite the appropriate blocks short of deleting the
>> associated file and then filling the entire free filesystem space with
>> zeros/random data such that the old blocks are eventually overwritten.
>> What's the verdict on this?
>
> We don't do this now for other reasons mentioned in the thread.  The
> best path to get here is to use trim, and to find a device that supports
> a secure erase trim (I don't know if this even exists, sorry).
>
> Outside of that, the only way to do this securely is to delete the
> files, rotate in new drives, rotate out the old drives, and run a full
> drive secure delete (not very practical).
>
> -chris
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



--
Gareth Pye
Level 2 Judge, Melbourne, Australia
Australian MTG Forum: mtgau.com
gar...@cerberos.id.au - www.rockpaperdynamite.wordpress.com
"Dear God, I would like to file a bug report"
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to