Btrfs setup on Arch with btrfs-assistant and grub

Installed Arch with Btrfs setup as per default archinstall. Would like to set it up with btrfs-assistant and grub snapshots. Arch installer has a boot partition and the btrfs default set up they are using. I am still just not very good at understanding the layout of the subvolumes and i think Arch is different than the EndeavourOS install?

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 465.8G  0 disk 
├─sda1        8:1    0   511M  0 part /boot
└─sda2        8:2    0 465.3G  0 part /var/cache/pacman/pkg
                                      /home
                                      /var/log
                                      /.snapshots
                                      /

I have btrfs-assistant installed but if i install snapper-support it won’t let me create the config as it say’s it already exists. I’m still confused by the nested or not subvolumes layout and not even sure if that is how it is installed?

[ricklinux@archlinux ~]$ sudo btrfs subvol list /
[sudo] password for ricklinux: 
ID 256 gen 140 top level 5 path @
ID 257 gen 140 top level 5 path @home
ID 258 gen 136 top level 5 path @log
ID 259 gen 94 top level 5 path @pkg
ID 260 gen 11 top level 5 path @.snapshots
ID 261 gen 16 top level 256 path var/lib/portables
ID 262 gen 17 top level 256 path var/lib/machines
[ricklinux@archlinux ~]$ 

I would like to set it up similar to how i have it on EndeavourOS but i just cant wrap my head around it. I don’t see the @ / here so or @ /.snapshots if this is correct.

I don’t think I’ll ever truly understand this. :sob:

The installation is Arch KDE on Wayland. The archinstall doesn’t have a lot of the packages installed such as for WiFi, Firefox, Yay Pacseek, etc.

I know enough to do all that and i have WiFi working and Yay is installed. All of my software is installed and i only need to get the btrfs-assistant set up properly and try to understand what is different and why and how it works etc. because I only know some pieces and lack a full understanding.

Any help from the wise people will be appreciated. Eventually if i keep doing this i might get it some day! :thinking:

Delete the subvolume @.snapshots and remove it from /etc/fstab.

Then delete /.snapshots if it exists.

1 Like

What is the proper way to delete the subvolumes and also when you say delete /.snapshots. That is not actually a subvolume correct?

Is this correct?

sudo btrfs subvolume delete @ /.snapshots

I don’t see any / .snapshots if i’m looking for it in the right place? :grimacing:

[ricklinux@archlinux ~]$ ls -a
.              .bash_logout   .cache   Documents  .gtkrc-2.0  Music     Templates
..             .bash_profile  .config  Downloads  .local      Pictures  Videos
.bash_history  .bashrc        Desktop  .gnupg     .mozilla    Public    yay

No.

First mount your partition root(subvolid=5) at /mnt. Then run:

sudo umount /.snapshots
sudo btrfs subvolume delete /mnt/@.snapshots

No, that is your home directory. ls -ld /.snapshots. You should unmount as above first though.

Okay i didn’t know i had to mount the partition that has the subvolumes. So i did that which is okay. But when i unmount it say’s it’s already unmounted?

[ricklinux@archlinux ~]$ sudo mount /dev/sda2 /mnt
[sudo] password for ricklinux: 
[ricklinux@archlinux ~]$ sudo umount /.snapshots
[ricklinux@archlinux ~]$ sudo btrfs subvolume delete /mnt/@.snapshots
Delete subvolume (no-commit): '/mnt/@.snapshots'
[ricklinux@archlinux ~]$ sudo umount /dev/sda2 /mnt
umount: /mnt: not mounted.

This i don’t quite understand either. I’m always confused with these files that have the . in front of them.

[ricklinux@archlinux ~]$ ls -ld /.snapshots
drwxr-xr-x 1 root root 0 May 10 19:33 /.snapshots

Okay so i see it but how do i properly delete it from the terminal. I’m assuming it’s the hidden directory shown here?

I probably destroyed it now because i used the following not knowing what I’m doing.

[ricklinux@archlinux ~]$ sudo rm -r /.snapshots

Not sure if i did this correctly but i added snapper-support with btrfs-assistant.

[ricklinux@archlinux ~]$ sudo btrfs subvol list /
[sudo] password for ricklinux: 
ID 256 gen 271 top level 5 path @
ID 257 gen 272 top level 5 path @home
ID 258 gen 272 top level 5 path @log
ID 259 gen 264 top level 5 path @pkg
ID 261 gen 16 top level 256 path var/lib/portables
ID 262 gen 17 top level 256 path var/lib/machines
ID 263 gen 270 top level 256 path .snapshots
ID 264 gen 253 top level 263 path .snapshots/1/snapshot
ID 265 gen 256 top level 263 path .snapshots/2/snapshot
ID 266 gen 260 top level 263 path .snapshots/3/snapshot
ID 267 gen 261 top level 263 path .snapshots/4/snapshot
ID 268 gen 263 top level 263 path .snapshots/5/snapshot
ID 269 gen 269 top level 263 path .snapshots/6/snapshot
[ricklinux@archlinux ~]$ 

Edit: If i add btrfs-maintenance then it will add to the btrfs-assistant panels?

Looks fine to me.

Yes

1 Like

Thanks again @Dalto. I wish i could understand the layers to this. I’m always confused by it and unsure.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.