0
I am new to btrfs
, and confused about subvolumes, after reading the documentation and experimenting on a local system. I have a Linux Mint system with a btrfs
root partition. Mint conveniently includes a tool that helps automate regular snapshots. I can easily list the ones it has made and kept.
$ sudo btrfs subvolume list /
ID 257 gen 52540 top level 5 path @
ID 258 gen 52540 top level 5 path @home
ID 283 gen 52467 top level 5 path timeshift-btrfs/snapshots/2019-01-15_02-00-51/@
ID 286 gen 50026 top level 5 path timeshift-btrfs/snapshots/2019-01-16_02-00-01/@
ID 288 gen 50026 top level 5 path timeshift-btrfs/snapshots/2019-01-17_02-00-01/@
ID 289 gen 50026 top level 5 path timeshift-btrfs/snapshots/2019-01-18_02-00-01/@
ID 291 gen 50409 top level 5 path timeshift-btrfs/snapshots/2019-01-19_02-00-01/@
Based on the documentation, however, I understand that snapshots can be browsed, their full tree exposed just as the main file tree, appearing as directories to the application. I could, for example, copy a single file from the snapshot to the mounted top-level volume. That is, from an application perspective, making a snapshot is much like an atomic, recursive copy.
However, I am able to find none of the seven subvolumes listed above in the contents either of /
or /home
, and no entry called timeshift-btrfs
appears in the listing of /home
.
What am I misunderstanding? Is there any directory listing that shows the tree of the snapshots?
Your answer is very clear. I only wish that the tutorials were half as thorough. I did not realize that my root mount was not the top-level volume, or that listing the volumes always shows all volumes on the partition, relative to the top level. Regarding the top-level mount, does keeping it create problems for indexing services, which might try to index all the snapshots? Also, regarding the home volume, wouldn't it be more convenient to put it directly in
/home
rather than mounting it from/@home
? (My understanding is that snapshots to a subvolume do not include its sub-subvolumes.) – epl – 2019-01-21T01:30:44.933@epl
[…] indexing services, which might try to index all the snapshots?
– Possible. It's your job to set them up, so they ignore/mnt
or don't cross mountpoints. –[…] rather than mounting it from /@home?
– I snapshot@
before I runapt-get upgrade
, then the snapshot doesn't include my users' personal data. And when I snapshot@home
, it includes the users' data, not the OS itself. I think such separation it's good. It's almost like having/home
on a separate partition; still you don't have to worry you'll ever have to shrink/home
to enlarge/
(or the other way around). – Kamil Maciorowski – 2019-01-21T05:11:25.113Ah, but I was asking about the case when
/@/home
exists as a subvolume, relative to the top level. Then root and home are separate subvolumes, but administration is simplified by not needing an additional explicit mount. (Note: In my experience home and root are tied together more closely than many care to admit, because user settings are stored in home, which are generated by applications in root and depend on the version. In the old days user settings were manually created, with a minimal option set to override the defaults, but that is a different discussion!) – epl – 2019-01-21T09:11:06.473@epl I believe I answered your question posted as such. The original question doesn't ask about reasons and/or rationale behind choosing the name
– Kamil Maciorowski – 2019-01-21T10:13:58.100@home
for the subvolume nor its location in Btrfs hierarchy. By asking a distinct question in comments under an answer, you're drastically reducing the set of probable answerers. Besides, comments are not for discussion anyway. Be aware of this phenomenon. If you think your new question fits the site then please ask a new question.