You are not logged in.

#1 2021-12-29 01:20:52

Cvlc
Member
Registered: 2020-03-26
Posts: 295

Btrfs subvolumes in Homedir

Hi !

There are many discussions about good subvolume layouts for / in the wiki and elsewhere, but I cannot find any common or recommended practices for subvolumes in the Home directory.

The following folders seem like good candidates for subvolumes, the first objective being to exclude them from snapshots :

  • .cache

  • .local/share/libvirt/images

  • .local/share/Trash

  • Folders used for AUR/Snap packages, and the likes

Is there any downside that I would have missed to creating these subvolumes ? any other good candidates ?

Last edited by Cvlc (2021-12-30 17:17:03)

Offline

#2 2021-12-29 16:20:00

Mr Victory
Member
Registered: 2021-06-10
Posts: 41

Re: Btrfs subvolumes in Homedir

The most common practice for /home is to make a subvolume for the entire /home directory so nothhing inside is snapshotted.

Offline

#3 2021-12-30 16:47:40

Cvlc
Member
Registered: 2020-03-26
Posts: 295

Re: Btrfs subvolumes in Homedir

Ok. I’d still like to do better, it doesn’t seem optimal to be snapshotting cache files and VM’s….

[EDIT]
there's also the trash folder in .local ! updated firs post

Last edited by Cvlc (2021-12-30 17:04:22)

Offline

#4 2022-01-05 16:17:35

Mr Victory
Member
Registered: 2021-06-10
Posts: 41

Re: Btrfs subvolumes in Homedir

Mr Victory wrote:

The most common practice for /home is to make a subvolume for the entire /home directory so nothing inside is snapshotted.

If you don't want anything inside your /home folder to be snapshotted, then make a @home subvolume.
If there are folders in your /home folder to be snapshotted, then create a @home subvolume and a subvolume for every directory you want to snapshot instead of snapshotting entire /home and deciding folders to exclude.

Last edited by Mr Victory (2022-01-05 16:18:16)

Offline

#5 2022-01-05 17:55:20

Cvlc
Member
Registered: 2020-03-26
Posts: 295

Re: Btrfs subvolumes in Homedir

My current setup regarding home is

ID	gen	top level	path	
--	---	---------	----	
257	63081	5		@home
265	63223	257		@home/user.homedir
884	63213	265		@home/user.homedir/.cache
1010	62674	265		@home/user.homedir/.local/share/libvirt/images
597	63149	265		@home/user.homedir/AUR
583	63189	5		@snap_home
...

user.homedir being a subvolume created by systemd-homed. I would have skipped @home altogether but it makes it easier to have a flat layout in case I need to rollback root.

I find it easier to make subvolumes for a couple directories to exclude than for all the others, and setting up multiple snapshot programs...

Offline

Board footer

Powered by FluxBB