# Adventures with btrfs and gpt

**URL:** <https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621>\
**Category:** EndeavourOS installation\
**Created:** [October 3, 2020, 8:39am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621 "2020-10-03T08:39:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_mk](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/_mk/32/15681_2.png) [@\_mk](https://forum.endeavouros.com/u/_mk)\
**Post date:** [October 3, 2020, 8:39am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/1 "2020-10-03T08:39:29Z")

</div>

_disclamer: quite long post, sorry for verbosity_

In my transition to EOS from another arch-based distribution, I am willing to attempt a switch to gpt+btrfs system as well.

Before approaching the actual installation process, I have examined several sources - starting from the very informative threads in this same forum (list for future reference):

- @2000 step-by-step detailed [wiki article](https://endeavouros.com/docs/encrypted-installation-2/btrfsonluks-verbose-version/) and related [thread](https://forum.endeavouros.com/t/howto-gpt-uefi-install-with-full-disk-encryption-btrfsonluks-with-separate-root-home-and-pkg-subvolumes-hibernation-with-a-swapfile-auto-snapshots-with-easy-system-rollback-gui-boot-into-snapshots/3782/)
- @TomZ [approach](https://forum.endeavouros.com/t/installation-on-btrfs/1163) to btrfs
- @pebcak [installation experiments](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145) and @dalto answers suggesting what I am attempting to do is feasible, somehow
- Archwiki [btrfs](https://wiki.archlinux.org/index.php/Btrfs) and [snapper](https://wiki.archlinux.org/index.php/Snapper) entries
- [Btrfs wiki](https://btrfs.wiki.kernel.org/index.php/Main_Page), in particular the Sysadmin section about subvolumes
- [Gentoo wiki](https://wiki.gentoo.org/wiki/Btrfs/en)
- Garuda Linux Gitlab repo, knowing they use btrfs as default, looking at how they deal with it in Calamares

_My layout plan (w/encrypted luks)_:

- base as per @2000 article, 8M gpt and btrfs for the remaining space, with subvolumes @ and @home automatically created by calamares
- create additional subvolumes for /var/cache, /var/log, /var/tmp, ~/.cache (plus @/swap for hibernation and /.snapshots for subsequent Snapper use).
- /var subvolumes nested within /@ parent and .cache within /@home, as it _initally_ sounded a logical thing to do

In spite of homeworks, I was unable to achieve this, probably because I really haven’t fully grasped the nature of subvolumes.

Following a mix of @2000 guide and Archwiki (possible first mistake: mixing), I tried to create /var subvolumes - eg. `sudo btrfs subvolume create /mnt/btrfs/@/var/log` - being greeted by _ERROR:target path already exist_ (first sign I haven’t understood properly subvolumes).  
Then I thought that since paths already exist, I might “just” have to deal with mounting them, so I tried to mount /dev/mapper/… /var/log into subvol @/var/log, encountering though _wrong fs type, bad option, bad superblock, missing codepage or helper program or other error_.

As things made less and less sense from the ideal picture I had in my mind, I came to terms with my inability to understand and compromised for a full-flat layout, attempting to create subvolumes at the same level as @ and @home, but ultimately resulting in a convoluted mess of parents and children - eg. subvolume create /mnt/btrfs/@var and subsequently /@var/log (in one of such experiments I managed to create @var/cache/pacman/pkg, each sub-branch being its own subvolume and children of the preceding one, just to give you an idea of the desperation level reached).  
Final attempt with `btrfs subvolumes create /mnt/btrfs/@var-cache` and mounting it with `mount -o subvol=@var-cache dev/mapper/... /mnt/btrfs/@/var/cache` resulted in both empty @var-cache subvolume and actual directory @/var/cache.  
Several stops at Google and StackOverflow didn’t help in clearing skies from the foggy mess.

I know I’d likely have to deal with moving data (rsyncing?) and creating fstab entries as highlighted by @dalto [here](https://forum.endeavouros.com/t/first-experiment-with-installing-on-btrfs/8145/4), but ultimately I am missing several pieces.  
It’s evident at this point I got the whole btrfs subvolumes idea wrong, but still I really wouldn’t like to surrender and go back to ext4 LVM-LUKS layout. May then any kind soul with a working knowledge of btrfs come to rescue and put some salt (and solid judgment) in my relation with subvolumes?

_Dulcis in fundo_, just to further spice up things, **gpt partitioning** didn’t really work as well, resulting in unbootable system.  
Have to say I am attempting all this on my quite ancient (but still doing its job), pre-uefi laptop (around 2010 if I’m not mistaken, upgraded with ssd), hence bios probably isn’t able to see ee gpt partition as bootable. The trick of `fdisk -t mbr /dev/sda` didn’t really work, but before trying the `sudo printf ‘\200\0\0\0\0\0\0\0\0\0\0\0\001\0\0\0’ | dd of=/dev/sda bs=1 seek=462` as suggested in [archwiki](https://wiki.archlinux.org/index.php/partitioning) (and prematurely sending the ssd to heaven in case it screws up) I would kindly welcome a second opinion from you guys.

Thanks for your patience and sorry for my dumbness.

---

<div class="post-metadata">

**Author:** ![TomZ](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/tomz/32/690_2.png) [@TomZ](https://forum.endeavouros.com/u/TomZ)\
**Post date:** [October 3, 2020, 9:43am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/2 "2020-10-03T09:43:17Z")

</div>

Let me see if I can be of help before the real experts chip in 🙂

> [@\_mk](#):
>
> `sudo btrfs subvolume create /mnt/btrfs/@/var/log`

If you think of subvolumes as being the same as a folder for a moment, what you tried to do is to create a folder (subvolume) named log in /var which obviously does already exist. Hence the error you get is correct. You can’t have a folder and a subvolume with the same name in the same location.

And given that /var/log is just a regular folder this explains the second error message, you can’t mount a regular folder like if it was a subvolume.

I have all my subvolumes at the root level and map them to their desired location via fstab, but to achieve what you tried to do I think the following steps are required:

1. Rename /mnt/btrfs/@/var/log to e.g. /mnt/btrfs/@/var/log-old
2. Run `sudo btrfs subvolume create /mnt/btrfs/@/var/log`
3. Copy stuff from log-old to log

Note, this is conceptual, I didn’t try this, not sure if you can rename the log folder while it’s in use.  
Actually I may just try this out of curiosity…

Edit: This works.  
Add these steps to the list above and you are done  
4. Reboot  
5. sudo rm -r /var/log-old  
6. Check success: sudo btrfs subv list /mnt/btrfs

And by the way, you don’t need to reference your subvolumes from outside in. `btrfs subvolume create /var/log` will work just as well.

---

<div class="post-metadata">

**Author:** ![2000](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/2/ee59a6/32.png) [@2000](https://forum.endeavouros.com/u/2000)\
**Post date:** [October 3, 2020, 10:04am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/3 "2020-10-03T10:04:23Z")

</div>

> [@\_mk](#):
>
> sudo btrfs subvolume create /mnt/btrfs/@/var/log

So with this command, you’re trying to create a subvolume named “log” in the subvolume @.

But you probably want to create a top level subvolume that you can later mount to /var/log 😉 -  
_(Assuming you’ve followed my wiki article and have mounted the newly installed btrfs system to a temporary directory /mnt/btrfs)_; Try the following:

1. Create top level subvolume named @var-log  
`sudo btrfs subvolume create /mnt/btrfs/@var-log`

2. to mount in fstab you would need to add something like this  
`[...] /var/log btrfs subvol=@var-log,[...]`

* * *

You probably know this, but just to make sure …  
The (additionally) mounted subvolumes, apart from @ and optionally @home, won’t be part of the snapshots that Timeshift or Snapper create. So, you won’t be able to store and restore their state with these programs.

---

<div class="post-metadata">

**Author:** ![TomZ](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/tomz/32/690_2.png) [@TomZ](https://forum.endeavouros.com/u/TomZ)\
**Post date:** [October 3, 2020, 10:10am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/4 "2020-10-03T10:10:16Z")

</div>

> [@2000](#):
>
> But you probably want to create a top level subvolume that you can later mount to /var/log

If you create the subvolume directly where you want it to logically reside you can save yourself the fstab hassle.

---

<div class="post-metadata">

**Author:** ![2000](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/2/ee59a6/32.png) [@2000](https://forum.endeavouros.com/u/2000)\
**Post date:** [October 3, 2020, 10:16am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/5 "2020-10-03T10:16:43Z")

</div>

You’re absolutely right, **nested** subvolumes don’t need to be mounted by fstab.

My **personal** experience with nested subvolumes and creating and restoring @ and @home with additional nested subvolumes led me to only use and recommend top level subvolumes though.

---

<div class="post-metadata">

**Author:** ![TomZ](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/tomz/32/690_2.png) [@TomZ](https://forum.endeavouros.com/u/TomZ)\
**Post date:** [October 3, 2020, 10:22am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/6 "2020-10-03T10:22:43Z")

</div>

> [@2000](#):
>
> My **personal** experience

Mind sharing what these issues were? I am genuinely interested as I am still learning the ins and out of btrfs.

For the case at hand I’d say that nested is probably fine because the additional subvolumes look to be all about temporary data, most likely to exclude this data from snaphots and backups

By the way, I am not using nested subvolumes either, but so far the only reason was because I want to be able to give them names which allow me to clearly tell them apart from folders. @var, @home, etc.

---

<div class="post-metadata">

**Author:** ![2000](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/2/ee59a6/32.png) [@2000](https://forum.endeavouros.com/u/2000)\
**Post date:** [October 3, 2020, 10:34am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/7 "2020-10-03T10:34:10Z")

</div>

> [@TomZ](#):
>
> Mind sharing what these issues were?

I’ve had issues with Timeshift, where snapshots couldn’t be deleted before deleting the nested subvolumes by hand first. When trying to delete certain snapshots, Timeshift greyed them out, but didn’t delete them. If I remember correctly, all snapshots created before the one restored had this issue.

So basically, at the time of my testing, Timeshift and nested subvolumes were a no-go. Might be fixed now.

---

<div class="post-metadata">

**Author:** ![anon72019930](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/f07891/32.png) [@anon72019930](https://forum.endeavouros.com/u/anon72019930)\
**Post date:** [October 3, 2020, 3:51pm UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/8 "2020-10-03T15:51:40Z")

</div>

that’s not only a Timeshift problem. It’s a general “issue”. You must delete the nested subvolume first. I think that’s even the case when you want to delete a subvolume with the basic btrfs command  
(`sudo btrfs subvolume delete @whatever_subvolume`)

---

<div class="post-metadata">

**Author:** ![2000](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/2/ee59a6/32.png) [@2000](https://forum.endeavouros.com/u/2000)\
**Post date:** [October 3, 2020, 4:59pm UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/9 "2020-10-03T16:59:52Z")

</div>

So the basic conclusion is: **If you** want to **use** applications like **Timeshift or Snapper** that automate the creation and deletion of snapshots (create and keep a certain number of daily, weekly, etc.) **you should not use nested subvolumes** ; use top level ones instead.

---

<div class="post-metadata">

**Author:** ![TomZ](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/tomz/32/690_2.png) [@TomZ](https://forum.endeavouros.com/u/TomZ)\
**Post date:** [October 4, 2020, 9:15am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/10 "2020-10-04T09:15:35Z")

</div>

And by coincidence I ran into a nice example yesterday which illustrates the issue.  
I moved my Arch server onto a larger SSD yesterday, which conveniently worked via

> btrfs send @ | btrfs receive newDrive

plus a few manual config steps.

But what I didn’t think off is that docker or docker-compose make heavy use of nested snapshots which means my jitsi install is now completely broken. Haven’t figured out how to rescue this yet ☹

---

<div class="post-metadata">

**Author:** ![\_mk](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/_mk/32/15681_2.png) [@\_mk](https://forum.endeavouros.com/u/_mk)\
**Post date:** [October 5, 2020, 9:38am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/11 "2020-10-05T09:38:49Z")

</div>

First, thanks to @TomZ, @2000 and @anon72019930 for their precious contributions; considering subvolumes as directories and not as an abstraction of them makes more sense in the plethora of errors I have encountered (to be honest, I got _slightly_ confused by the layout section in Archwiki Snapper page).

Moreover, after reading your experiences with nested subvolumes (really thanks to @TomZ for trying yourself the conceptual idea you gave on the first post and sorry to hear about your jitsi instance!!), I decided a flat layout is **definitely** going to be my approach as well…I am for experimenting, but I’d need some stability as well on the long run 😃  
This considered, as far as I have understood, my next steps are (example with /var/cache, similar process for var/log, var/tmp and ~/.cache.):

- `btrfs subvolume create @var-cache`
- subsequent `rsync -aAvh @/var/cache @var-cache` to recreate the subdirectories structure
- then map `/dev/mapper/... /var/log btrfs subvol=@var-cache,` into fstab
- ultimately `rm -r @/var/cache` before reboot

For snapshots, I’d `mkdir @/.snapshots`, create related subvolume `btrfs subvolume create @snapshots` and map it into fstab.

> [@2000](#):
>
> The (additionally) mounted subvolumes, apart from @ and optionally @home, won’t be part of the snapshots that Timeshift or Snapper create

@2000 I am aware of this and I am trying to complicate my life on purpose 😃  
Specifically, afaik `/var/tmp` cannot be mounted as tmpfs, but doesn’t hold strictly necessary files for an eventual restore, hence it sounds a good candidate; `/var/cache` is essentially pacman cache in my past experience and similarly, in `~/.cache` the most relevant parts are yay packages and xfce sessions, and hence no _strictly essential_ files are present (I might be wrong naturally, as usual). Finally, `/var/log` is mainly because I think if I’m gonna do a restore would be ‘cause I screwed up something, and hence having logs not overwritten _seems_ a good idea to me, for a post-mess debriefing.

Finally, about the _gpt magic formula_, I think I’ll end up trying to see if I manage to create a type 0 bootable partition before going nuclear with dd (cannot deny that command always scared me for its power to destroy and create).

Thanks again for all your kind help!

---

<div class="post-metadata">

**Author:** ![anon72019930](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/f07891/32.png) [@anon72019930](https://forum.endeavouros.com/u/anon72019930)\
**Post date:** [October 5, 2020, 6:48pm UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/12 "2020-10-05T18:48:44Z")

</div>

> [@\_mk](#):
>
> For snapshots, I’d `mkdir @/.snapshots`, create related subvolume `btrfs subvolume create @snapshots` and map it into fstab.

looks like you’re doing it like suggested: [https://wiki.archlinux.org/index.php/Snapper#Configuration\_of\_snapper\_and\_mount\_point](https://wiki.archlinux.org/index.php/Snapper#Configuration_of_snapper_and_mount_point)

> [@\_mk](#):
>
> Specifically, afaik `/var/tmp` cannot be mounted as tmpfs

true, afaik. I subvolumed it as well 😆 Nothing that needs to be “snapshotted” by `snapper` so it can be “factored out / excluded” i.e. put in a seperate subvol

> [@\_mk](#):
>
> `/var/cache` is essentially pacman cache in my past experience

i guess so. I just subvolumed /var/cache/pacman/pkg. Most of the other subdirs are empty on my system… Shouldn’t be a problem to exclude the whole /var/cache dir as you suggest. Same goes for ~/.cache (if you even do snapshots via `snapper ` on your @home subvolume)

> [@\_mk](#):
>
> `/var/log` is mainly because I think if I’m gonna do a restore would be ‘cause I screwed up something

exactly. Exclude `/var/log` (by making it a separate subvol), so logs don’t get rolled back when you rollback the system. I have that as well.  
So there are 2 cases i always think of for putting a directory in its seperate subvol

1. don’t want the content to be rolled back when you roll back your system )i.e. /var/log)
2. don’t need to snapshot the content because its not relevant (i.e. /var/tmp, /var/cache/pacman/pkg)

those other subvols can be snapshotted seprately (like @home). You can create a seperate snapper config for them if you want (i don’t snapshot my @home. I do a file based backup with `vorta` for my home folder).

By the way, i find it quite useful to have a mountpoint “above” all the (flat) subvolums (does that makes sense ? 😅 )  
Maybe you have that already, but i have a line in my `fstab` that goes like this:  
`UUID=123 /mnt/btrfs-root btrfs defaults,noatime,space_cache,autodefrag,compress=zstd 0 2`

That means: i created a folder `/mnt/btrfs-root` and have my “root disk” mounted to that folder (realise there is no `subvol=@whatever` in the options section of that line)

that means i can go to `/mnt/btrfs-root` in my file browser and there i see all the subvolumes (`@, @home, @snapshots, ...)` i can easily create new subvolumes, delete them, snapshot them. (like for example: system went south 🤣 → just boot a whatever distros live iso → browse to the disk my (broken) EnOS install is on → see all the subvolumes. Rename the (broken) “system”/subvol called `@` with `sudo mv @ @.bak`. Then do something like `sudo btrfs snapshot ./@snapshots/<some number>/snapshot @`  
So i take a functional snapper snapshot and … snapshot it to `@` 😁, i.e. create a snapshot of a functional snapshot ( 😂) as ( the destination) `@`, which is my root → broken system repaired in seconds.

Maybe looks a bit complicated as i described it…but it isn’t. No need for `grub-btrfs` (which can boot into snapshots). Sure it’s maybe easier. But i don’t need it. I just boot an iso i have handy and “snapshot back” a functional snapshot/system-state, done.

Omph, quite a long post, wasn’t intended…

---

<div class="post-metadata">

**Author:** ![\_mk](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/_mk/32/15681_2.png) [@\_mk](https://forum.endeavouros.com/u/_mk)\
**Post date:** [October 6, 2020, 4:43am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/13 "2020-10-06T04:43:42Z")

</div>

> [@anon72019930](#):
>
> So there are 2 cases i always think of for putting a directory in its seperate subvol
> 
> 1. don’t want the content to be rolled back when you roll back your system )i.e. /var/log)
> 2. don’t need to snapshot the content because its not relevant (i.e. /var/tmp, /var/cache/pacman/pkg)

exactly my approach to subvolumes.

> [@anon72019930](#):
>
> You can create a seperate snapper config for them if you want (i don’t snapshot my @home. I do a file based backup with `vorta` for my home folder).

That’s what I’d like to put in place as well, resorting mainly to snapshots (plus weekly backup) of main system, while @home having its files backed up as-is (for this, I’m still considering alternatives to plain rsync for incremental weekly backups). Never heard about vorta, will look that up.  
Hopefully later today I’d find the time to test the layout and finally do ultimate installation.

> [@anon72019930](#):
>
> By the way, i find it quite useful to have a mountpoint “above” all the (flat) subvolums (does that makes sense ? 😅 )

actually I had read a similar approach the other day (were you, @anon72019930, or @TomZ?), and that sounds pretty interesting for a desperate situation where one can solve the issue with base coreutils.

Thanks again for your contribution!

---

<div class="post-metadata">

**Author:** ![TomZ](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/tomz/32/690_2.png) [@TomZ](https://forum.endeavouros.com/u/TomZ)\
**Post date:** [October 6, 2020, 9:03am UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/14 "2020-10-06T09:03:58Z")

</div>

> [@\_mk](#):
>
> I had read a similar approach the other day

An “outside-in” mount point is one of the first things I set up whenever I install my machines. Took a while for me to get my old head around the concept but now I think this is brilliant 🙂  
I use /mnt/ for that:

```auto
$ ll /mnt
total 0
drwxr-xr-x 1 root root 190 Okt 5 18:34 @
drwxr-xr-x 1 root root 12 Okt 5 16:42 @home
drwxr-xr-x 1 root root 12 Okt 4 17:15 @homenew
drwxr-xr-x 1 root root 206 Okt 5 16:42 @old
drwxr-xr-x 1 root root 1,3K Okt 6 10:14 snapshots
drwxr-xr-x 1 root root 16 Mär 7 2020 @swap

```

@ and @home is is what is actively running right now. Flip @ and @old (mv), reboot and I am running a different OS, or I could tell the boot loader to start @old instead of @…this is a great concept in my opinion.

---

<div class="post-metadata">

**Author:** ![anon72019930](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/f07891/32.png) [@anon72019930](https://forum.endeavouros.com/u/anon72019930)\
**Post date:** [October 6, 2020, 4:25pm UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/15 "2020-10-06T16:25:20Z")

</div>

> [@\_mk](#):
>
> while @home having its files backed up as-is

i thought you would snapshot your @home as well, or why are you going to create a separate subvol for ~/.cache? I’m curious 😀

`vorta` is a gui for `borg`. Can be found in the AUR.

> [@\_mk](#):
>
> actually I had read a similar approach the other day (were you, @anon72019930, or @TomZ?)

not me as far as i remember…

> [@TomZ](#):
>
> Flip @ and @old (mv), reboot and I am running a different OS

…wild. You really live on the edge! 😆  
I did such things for changing DE already, but not for running a whole other OS.

---

<div class="post-metadata">

**Author:** ![\_mk](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/_mk/32/15681_2.png) [@\_mk](https://forum.endeavouros.com/u/_mk)\
**Post date:** [October 7, 2020, 5:04pm UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/16 "2020-10-07T17:04:22Z")

</div>

> [@TomZ](#):
>
> An “outside-in” mount point is one of the first things I set up whenever I install my machines. Took a while for me to get my old head around the concept but now I think this is brilliant

ok, it was you, @TomZ! Yeah, at first I thought quite peculiar approach, but that way you got an incredible level of flexibility (and as @anon72019930 correctly pointed out, _you like living on the edge_ 😂 )

> [@anon72019930](#):
>
> i thought you would snapshot your @home as well, or why are you going to create a separate subvol for ~/.cache?

sorry, in the rush of answering within the 5-min break I had, I cut it to the bones…I’d snapshot both @ and @home, but while for @ snapshots constitute also the main form of external backup, for @home, due to the nature of its content (docs, pictures, projects,…), a snapshot would be a kind of “first line of defense”, while plain backup (and here still thinking which form to take) would allow me portability and accessibility in other non-btrfs platforms as well. If I oversaw anything and got anything wrong, glad to modify my view!

About _btrfs adventures_, tried subvolume ops as per

> [@\_mk](#):
>
> - `btrfs subvolume create @var-cache`
> - subsequent `rsync -aAvh @/var/cache @var-cache` to recreate the subdirectories structure
> - then map `/dev/mapper/... /var/log btrfs subvol=@var-cache,` into fstab
> - ultimately `rm -r @/var/cache` before reboot

and everything seems to work.

Cannot say the same thing about booting process, after various different approaches I keep having a boot failure and need to go thru EOS live grub to boot the actual installed system. Maybe, being quite an annoying issue per se, I’d open another thread to avoid polluting this one, more focused on btrfs itself rather than grub.

Thanks again for your kind contributions that allowed me to boost my rather limited knowledge on btrfs!

---

<div class="post-metadata">

**Author:** ![anon72019930](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/f07891/32.png) [@anon72019930](https://forum.endeavouros.com/u/anon72019930)\
**Post date:** [October 7, 2020, 6:12pm UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/17 "2020-10-07T18:12:01Z")

</div>

> [@\_mk](#):
>
> I’d snapshot both @ and @home

ah, ok.

> [@\_mk](#):
>
> If I oversaw anything and got anything wrong, glad to modify my view!

nothing that comes to my mind i regards of snapshotting @home. Putting ~/.cache in a separate subvol is indeed a good idea then.

Just some things to consider maybe about btrfs for the home partition in general. Like, if you use `VirtualBox` or the like, one should disable CoW für the VM images (or the containing folder). Those VMs usually reside in your home directory.  
 → [https://wiki.archlinux.org/index.php/btrfs#Disabling\_CoW](https://wiki.archlinux.org/index.php/btrfs#Disabling_CoW)  
same goes for DBs.  
I think there also was something that does (or did in the past?) not support the btrfs filesystem. But i can’t remember if it was Steam or the Dropbox Client or whatever…

> [@\_mk](#):
>
> I’d open another thread to avoid polluting this one, more focused on btrfs itself rather than grub.

Yeah, i would also recommend this.

---

<div class="post-metadata">

**Author:** ![TomZ](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/tomz/32/690_2.png) [@TomZ](https://forum.endeavouros.com/u/TomZ)\
**Post date:** [October 8, 2020, 12:17pm UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/18 "2020-10-08T12:17:27Z")

</div>

> [@anon72019930](#):
>
> Dropbox

Dropbox: [https://linux.slashdot.org/story/18/08/10/2120248/dropbox-is-dropping-support-for-all-linux-file-systems-except-unencrypted-ext4](https://linux.slashdot.org/story/18/08/10/2120248/dropbox-is-dropping-support-for-all-linux-file-systems-except-unencrypted-ext4)

---

<div class="post-metadata">

**Author:** ![ramblinwreck](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ramblinwreck/32/12736_2.png) [@ramblinwreck](https://forum.endeavouros.com/u/ramblinwreck)\
**Post date:** [October 8, 2020, 12:31pm UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/19 "2020-10-08T12:31:28Z")

</div>

That article is from August of 2018 and it says starting in November (I’m assuming of 2018), so perhaps something changed between then and now. Maybe they saw the error of their ways.

---

<div class="post-metadata">

**Author:** ![\_mk](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/_mk/32/15681_2.png) [@\_mk](https://forum.endeavouros.com/u/_mk)\
**Post date:** [October 8, 2020, 12:32pm UTC](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621/20 "2020-10-08T12:32:44Z")

</div>

> [@anon72019930](#):
>
> Just some things to consider maybe about btrfs for the home partition in general. Like, if you use `VirtualBox` or the like, one should disable CoW für the VM images (or the containing folder). Those VMs usually reside in your home directory.  
> → [https://wiki.archlinux.org/index.php/btrfs#Disabling\_CoW](https://wiki.archlinux.org/index.php/btrfs#Disabling_CoW)  
> same goes for DBs.

> [@TomZ](#):
>
> Dropbox

Thanks for pointing it out, particularly for the VMs: I’m gonna `chattr +C` the directory holding them.  
As for Dropbox, I’ve dropped it, so no problem 😉

[Next page](https://forum.endeavouros.com/t/adventures-with-btrfs-and-gpt/8621.md?page=2)
