[Discuss] CoW for Ext4?

markw at mohawksoft.com markw at mohawksoft.com
Sun Jul 31 14:11:00 EDT 2022


There are two very confused technologies. "CoW" and "RoW"

"Copy-on-write" happens when the previous contents of a block are copied
to someplace else before the actual write happens. This is how LVM
snapshots work. This is typically used in block systems that have more or
less fixed block storage.

"Redirect-on-write" is what happens in something like ZFS where blocks are
independent of their location in storage. When a block is "modified" a new
block is allocated and the meta-data structure that defines the object is
updated to use the new block.

"CoW" is a write amplifier, if you have one snapshot on LVM, each write to
the origin LUN, a second write will happen to the snapshot. If you have
two snapshots, it will cost two extra writes, and so on.

"RoW" Eliminates this, you can have lots of snapshots and they don't get
changed when the origin object is modified.

You can use LVM or device mapper with a snapshot to get CoW on EXT4.

I would suggest ZFS as it is a RoW system that supports snapshots, clones,
replication, RAID, and compression.


> I've discovered how useful it is to take a copy-on-write clone of a disk
> tree when I want to repair application data consisting of lots of large
> files.  (Virtual Box VMs and Apple Music libraries are the cases I've
> used.)  Apple's APFS handles this easily.  I hesitate to ask, but has
> CoW support been proposed for Ext4?
>
> Dale
> _______________________________________________
> Discuss mailing list
> Discuss at lists.blu.org
> http://lists.blu.org/mailman/listinfo/discuss
>




More information about the Discuss mailing list