Large files copied between datasets using SMB transfer instantly. Why?

On SCALE Electric Eel 24.10.2, I have an HDD pool that contains multiple datasets. I have a separate SSD pool that contains a Linux Mint VM (specifically Mint version 22.1).

The datasets on the HDD pool are shared via SMB, and when I use the Mint VM to copy files between datasets on the HDD pool, they transfer almost instantly.

For example, today, from within the Mint VM, I copied a 135GB file from one dataset on the HDD pool to another dataset on the HDD pool, and the transfer took less than 1 minute. (I could understand if it were a move, but it was a copy.) This speed is clearly impossible on an HDD pool unless there is something going on behind the scenes that doesn’t physically move all the blocks of data.

Also, it seems to me that these lightning fast copies only started happening recently, with recent versions of SCALE and recent versions of Linux Mint as the client used to do the transfer over SMB.

Can anyone figure out how and why this is happening? Obviously, I don’t mind fast transfer of data between datasets, but I would like to figure out what’s going on so that I don’t run into any problems.

Sounds like block cloning in action.

https://openzfs.github.io/openzfs-docs/man/master/7/zfsconcepts.7.html

3 Likes

Thanks. That sounds right. What’s interesting is that SMB and Linux Mint are smart enough so that block cloning works on exposed datasets, especially since the github discussion you linked to says “most versions of Linux will not allow clones across datasets,” and in my case, this behavior is happening with file copies between different datasets although within the same pool.

Ah sorry I missed the separate datasets part. You’re correct I think that indeed rules out block cloning.

Perhaps SMB server side copying?

Block cloning works between datasets if record sizes, encryption config, etc, etc line up.

3 Likes

It can’t be SMB server side copying. It’s way too fast for that. 135 GB transferred in less than one minute would be more than 2 GB per second transfer speed, which is impossible on a hard drive.

Unless someone has other ideas, I believe it almost has to be block cloning. Perhaps the restriction on transfer between datasets has been lifted.

You can easily check zpool get all tank | grep bclone

Sorry you didn’t give any hardware specs so I was clutching at straws. For info that’s very doable with hard drives if you have enough of them :wink: