Question about hard links in snapshots

I’m trying to understand the behavior of hard links that are a part of a BTRFS snapshot. When you create a snapshot, do the hard links contained therein become CoW? Or would editing an instance of the file outside of the snapshot clobber the snapshotted version?


@juz10mac Welcome to the Rockstor community.

Given there has been no response here to your btrfs specific question for a couple of days you may want to reach out to the btrfs developers for an authoritative answer:

We currently come up short on the btrfs primer front within our docs but we have the start of such a doc section in the works. We can then, in-time, add the answers to such questions as and when they come up; and authoritative references/answers are found.

Sorry to redirect this one but I’m sensing some potential nuance regarding reflinks in btrfs here also. Plus it can help to simply consider a snapshots as a subvolume like any other. Only having been created by a metadata trick that just forks an existing sub-volume. With all btrfs volume (Pool in Rockstor speak) sub-volumes sharing their parent volumes metadata resource.

From a quick search I found the following overview of sym/hard/reflinks:

Let us know how you get on and we can add a similar section to our soon to be published fledgling btrfs primer, once it’s parent pull request has been reviewed. Also note we are always on the lookout for recommended upstream references that we can pop into our own Rockstor Web-UI focused docs.

Hope that helps.