2

For example: I have a subvolume /home and create a snapshot: btrfs subvolume snapshot /home /temp/snapshot

Is there any connection, that tells me that the new subvolume /temp/snapshot was originally cloned from /home?

In other words: If I delete everything in /temp/snapshot and create a new empty subvolume /temp/snapshot2, are these subvolume of different "types" whatsoever?

  • Emmanuels answer is true - but only if the original subvolume still exists. The conclusion answers the second question: There are two different types of snapshots: Those with given Parent UUIDs and those without. – ospf Feb 16 '17 at 13:56
0

The answer to your first question is yes. Not only can you determine the source subvolume of a snapshot, you can also see the snapshots for a given subvolume.

For example if you run: btrfs subvol show /temp/snapshot you'll see something like this:

MOUNT_POINT/temp/snapshot
        Name:                   snapshot
        UUID:                   862e55f5-d1a0-4742-87ed-b430dd181a97
        Parent UUID:            5c1e9a70-3158-6940-94d4-be82e064f8df
        Received UUID:          -
        Creation time:          2017-01-26 22:34:21 -0500
        Subvolume ID:           940
        Generation:             29824
        Gen at creation:        29824
        Parent ID:              5
        Top level ID:           5
        Flags:                  readonly
        Snapshot(s):

If that snapshot itself is the source of other snapshots, you'd see them listed under snapshot(s).

The Parent UUID is the source subvolume, which you can use with btrfs subvol list and grep to get more information about the source subvolume:

$ btrfs subvol list -u . | grep 5c1e9a70-3158-6940-94d4-be82e064f8df
ID 878 gen 29824 top level 5 uuid 5c1e9a70-3158-6940-94d4-be82e064f8df path home

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.