I have a btrfs volume which I use for backups.
It is almost full (few MB free). If I duplicate a (big, too big for the existing free space on the volume) file, it works. That is expected since btrfs is a copy-on-write fs.
cd /btrfs-backup/
cp /home/john/a.mp4 . # 1st instance of the file takes place on the volume.
cp a.mp4 b.mp4 # 2nd instance does not take place and is immediate.
But if I copy that same file from the source fs, it fails:
cp /home/john/a.mp4 c.mp4 # 3rd instance of the same file.
cp: error writing 'a.mp4': No space left on device
Why that error?
Should not the same file be made of the same blocks, which should not be duplicated on btrfs fs?