Sample Header Ad - 728x90

Detect btrfs reflinked files

8 votes
1 answer
1832 views
It's clear, with cp --reflink foo bar I can copy a file on btrfs without wasting space. But how can I detect that the two files (foo and bar here) are using the same "space unit"? If they were hardlinks, I would use [ foo -ef bar ] for comparing or stat -c%i foo to get a unique id (inode in this case). Are there similar commands for btrfs reflinked files? I want to apply this on a 300G volume which is virtually 6T in size due to deduplication, so I want to avoid checksumming...
Asked by Daniel Alder (936 rep)
Oct 14, 2018, 01:26 PM
Last activity: Aug 24, 2021, 09:27 AM