FREENAS: Why isn’t mv command instant within a RAIDZ1 volume?

You are thinking about things from the wrong level, is all.

If you move a file within the confines of a single ZFS dataset, it will react similarly to what you’re expecting. If you move a file within the confines of a pool, but between datasets, it is a real move. Yes, technically the data just went from point A to point B and both points are on the same platters – but from ZFS’ perspective, it moved houses.

ZFS datasets are separate filesystems. Real filesystems. They can have different block sizes, compression settings, etc. Moving a file between two ZFS filesystems, even on the same pool, is a real move – bits get read and then written again, as opposed to just updating a pointer.

Functionally it is roughly analogous to moving a file between two ext4 filesystems that are technically coming from 2 partitions of the same hard disk – the two filesystems, despite sharing underlying hardware, are logically disparate and so no ‘pointer’ change can happen, it must physically move the file, even though it’s really only copying data from one location to another on the same underlying drive.

Leave a Comment