News for hackers. Stuff that matters.
Re:Why Linux Doesn’t Need Defragmenting by drostie on Thursday May 31, 2012 @06:01PM (#4050624)
Maybe ZFS/btrfs users don't care, but I would be really hesitant before using a filesystem which does not respect the Unix `shred` tool. Like real paper-shredders, I don't use them very much but when I do use them I really hope that they work.
Re:Why Linux Doesn’t Need Defragmenting by mitchty on Thursday May 31, 2012 @10:22PM (#4051598)
Its not just zfs/btrfs, ext3/4 has the same cow behavior when data=journal (not default but to note)

And if you're on an ssd its likely doing wear leveling in a similar fashion.

Really the better way to do this than overwriting files in place is to have encrypted files and keys and just reencrypt with a random key you don't retain, or some other method I suppose. But the ability to rewrite to the same spot in the filesystem, for a copy on write filesystem, is rather ludicrous. Hesitate all you want, I prefer cow fs's for most tasks.

Re:Why Linux Doesn’t Need Defragmenting by tedunangst on Thursday May 31, 2012 @10:45PM (#4051672)
Bad news: in theory, utilities like that haven't ever worked since bad block remapping was added ages ago. And it's absolutely useless on an SSD.
Re:Why Linux Doesn’t Need Defragmenting by icebraining on Thursday May 31, 2012 @06:32PM (#4050760)
Why doesn't shred work on ZFS/Btrfs?
Re:Why Linux Doesn’t Need Defragmenting by drostie on Thursday May 31, 2012 @06:49PM (#4050842)
They just said copy-on-write. I'm not entirely sure about the exact interplay between shred and btrfs, but shred nominally just writes random data to the file that was already there -- if you copy-on-write that, then you are just copying random data to a different part of the filesystem, not overwriting what's already there.

You could solve this by automatically shredding deleted stuff in the background, but it would probably kill SSDs and other storage devices which you don't want to write to too often.

Re:Why Linux Doesn’t Need Defragmenting by dap on Thursday May 31, 2012 @09:31PM (#4051436)
I don't know how shred works, but based on what you said, it assumes knowledge of how the underlying filesystem works. If there's fault to be had (and there probably isn't), it's not ZFS's.

You really consider being able to shred individual files a critical filesystem feature? Over, say, not having to configure static partition sizes, having snapshots, or being completely immune by design to large classes of data corruption (including all those that require an fsck-like tool to repair)?

Re:Why Linux Doesn’t Need Defragmenting by barrkel on Thursday May 31, 2012 @06:38PM (#4050784)
ZFS is copy-on-write with snapshot support. If you have files you may need to shred, put them on a different file system; ZFS is oriented towards making it hard to lose data.