On Mon, Dec 29, 2014 at 8:55 AM, lee <l...@yagibdah.de> wrote: > > Just why can't you? ZFS apparently can do such things --- yet what's > the difference in performance of ZFS compared to hardware raid? > Software raid with MD makes for quite a slowdown. >
Well, there is certainly no reason that you couldn't serialize a logical volume as far as design goes. It just isn't implemented (as far as I'm aware), though you certainly can just dd the contents of a logical volume. ZFS performs far better in such situations because you're usually just snapshotting and not copying data at all (though ZFS DOES support serialization which of course requires copying data, though it can be done very efficiently if you're snapshotting since the filesystem can detect changes without having to read everything). Incidentally, other than lacking maturity btrfs has the same capabilities. The reason ZFS (and btrfs) are able to perform better is that they dictate the filesystem, volume management, and RAID layers. md has to support arbitrary data being stored on top of it - it is just a big block device which is just a gigantic array. ZFS actually knows what is in all those blocks, and it doesn't need to copy data that it knows hasn't changed, protect blocks when it knows they don't contain data, and so on. You could probably improve on mdadm by implementing additional TRIM-like capabilities for it so that filesystems could inform it better about the state of blocks, which of course would have to be supported by the filesystem. However, I doubt it will ever work as well as something like ZFS where all this stuff is baked into every level of the design. -- Rich