Ask Your Question

[Solved] Fedora 25 - BTRFS + Snapper

asked 2017-03-24 16:12:36 -0500

ahhhreccek2710 gravatar image

updated 2017-03-28 09:00:00 -0500

Hello, I would like to install Fedora with BTRFS + Snapper. How can I set the layout of a subvolumes (for example just like):

/.snapshots .

Is it possible using Anaconda? If not, how to do it on installed system? I tried btrfs subvolume create, but I receive error - mountpoint exists

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2017-03-28 09:02:25 -0500

ahhhreccek2710 gravatar image

updated 2017-03-28 09:12:19 -0500

Hello, Two days ago I zeroed my hard drive and created a new GPT table. I didn't understand how to create a partition layout with BTRFS in Anaconda. Today I know that it is very simple. Subvols need to be added with a specific mount point (eg /opt, /srv, /tmp, etc) and see if they are in the good BTRFS group (I have 2 groups, system and data). Anaconda can't use Btrfs scheme, which was previously prepared (eg from LiveDVD). Anaconda needs to format / but the option is unavailable (LUKS + BTRFS, all partitions were decrypted). Now everything works well. Thank you for the help and support :) Regards :)

btrfs subvolume list /
ID 257 gen 247 top level 5 path root
ID 258 gen 204 top level 5 path opt
ID 259 gen 204 top level 5 path srv
ID 260 gen 211 top level 5 path tmp
ID 261 gen 204 top level 5 path usrlocal
ID 262 gen 204 top level 5 path varcrash
ID 263 gen 251 top level 5 path varlog
ID 264 gen 44 top level 5 path varopt
ID 265 gen 204 top level 5 path varspool
ID 266 gen 251 top level 5 path vartmp
ID 269 gen 204 top level 257 path .snapshots
snapper ls
Rodzaj | # | Pre # | Data | Użytkownik | Wyczyszczono | Opis    | Dane użytkownika 
single | 0 | | | root | | current |

edit flag offensive delete link more


i believe i'm about to configure my system in a very similar manner as you did but don't quite understand your point about anaconda in combination with LUKS and BTRFS. did you end up using anaconda in this scenario or did you create the subvolumes manually and manually copy the data to them (and if so, probably booted from the live-medium to do so?)?

red gravatar imagered ( 2017-08-08 03:14:02 -0500 )edit

follow-up to my previous comment: manually creating subvolumes + moving the data from the btrfs partition which holds the whole system-tree (as installed by anaconda) through a live-cd did not work out for me. seems system-root was not found any more albeit i've edited fstab and grub.cfg. however, when selecting storage configuration -> custom (encrypt my data also selected) and in the dialog following the LUKS-password setup chosing Btrfs as part-scheme yielded a running fedora 26 system with root and home in separate subvolumes. manually added snapshot-subvol for snapper.

red gravatar imagered ( 2017-08-11 03:02:14 -0500 )edit

answered 2017-03-25 08:36:44 -0500

tim8723 gravatar image

I tried that too, failing because I did not understand Anaconda's "top down" approach to disk setup. I do it all the time on other distros. The best way to utilize btrfs is to create a single filesystem and then create everything as a subvolume of that. A good explanation is in the btrfs wiki: see the stuff about "flat" subvolume layout.

edit flag offensive delete link more


PS - Your post has motivated me to try reinstalling with Anaconda, again. I will report back on what I learn...

tim8723 gravatar imagetim8723 ( 2017-03-25 09:21:06 -0500 )edit

I wiped my partition table today, and reinstalled Fedora 25 to btrfs, using the automatic setting for partitions after selecting that I wanted btrfs. It created the desired "flat layout" of / and /home (both being subvolumes of the btrfs root subvolume). All that would need to be done to achieve your desired subvolume scheme would be to temporarily mount the root subvolume, create all of your subvolumes directly under it, and edit fstab to mount them at boot.

tim8723 gravatar imagetim8723 ( 2017-03-27 13:11:47 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-03-24 16:12:36 -0500

Seen: 659 times

Last updated: Mar 28 '17