Due to troubles in the past, I did not use btrfs so far, but now it seems to be the right time to give it an other trial.
Is it recommended to have the whole disk on btrfs, as the auto setup suggests it?
I am on a notebook and have a default developer workflow, c++ python docker …
Is it better to make the guided option and switch /home to xfs, or shall I take the default and btrfs the whole disk?
All new installs have a single btrfs partition using the whole drive:
3400G:~ # fdisk -l -o device,size,type /dev/nvme0n1
Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: Samsung SSD 950 PRO 512GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A84F222E-0177-499B-A7EA-BDA6F31E2196
Device Size Type
/dev/nvme0n1p1 100M EFI System
/dev/nvme0n1p2 476.8G Linux filesystem
3400G:~ #
Whenever I modify an existing drive I convert all openSUSE systems to btrfs.
Older systems have single metadata. I convert them all to DUP: btrfs balance start -mconvert=DUP /.
Weekly maintenance schedule:
3400G:~ # systemctl list-timers btr*
NEXT LEFT LAST PASSED UNIT ACTIVATES
Sun 2023-01-01 00:00:00 CET 4 days left Mon 2022-12-26 06:39:54 CET 1 day 16h ago btrfs-balance.timer btrfs-balance.service
Sun 2023-01-01 00:00:00 CET 4 days left Tue 2022-12-27 22:50:04 CET 30s ago btrfs-defrag.timer btrfs-defrag.service
Sun 2023-01-01 00:00:00 CET 4 days left Thu 2022-12-22 14:13:20 CET 5 days ago btrfs-scrub.timer btrfs-scrub.service
Sun 2023-01-01 00:00:00 CET 4 days left Tue 2022-12-27 22:27:46 CET 22min ago btrfs-trim.timer btrfs-trim.service
4 timers listed.
Pass --all to see loaded but inactive timers, too.
3400G:~ #
No home on BTRFS is not snapshot normally. Do not think of snapper as some sort of data backup you lose the drive you lose your data. That is not backup… Snapper allows you to roll back to a previous version of the set of folders being snapped. They normally happen before and after an update.
@a4z this is the layout I use on some of my systems…
On Tumbleweed desktop, docker and others is on xfs partitions / is btrfs… But I don’t use snapshots, but I do use cronopete to backup every three hours to sdb1.
Tumbleweed Desktop
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 465.8G 0 disk
└─sda1 8:1 0 465.8G 0 part /archive
sdb 8:16 0 238.5G 0 disk
└─sdb1 8:17 0 238.5G 0 part /run/media/username/f6cxxb3a-06xx-4e1a-b7x8-3xx32135b4e3
nvme0n1 259:0 0 953.9G 0 disk
├─nvme0n1p1 259:1 0 248M 0 part /boot/efi
├─nvme0n1p2 259:2 0 60G 0 part /var
│ /srv
│ /root
│ /opt
│ /boot/grub2/x86_64-efi
│ /boot/grub2/i386-pc
│ /
├─nvme0n1p3 259:3 0 100G 0 part /home
├─nvme0n1p4 259:4 0 20G 0 part /usr/local
├─nvme0n1p5 259:5 0 100G 0 part /var/lib/docker
├─nvme0n1p6 259:6 0 300G 0 part /var/lib/libvirt
├─nvme0n1p7 259:7 0 370G 0 part /data
└─nvme0n1p8 259:8 0 3.6G 0 part [SWAP]
MicroOS server (snapshots available all btrfs)
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 119.2G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 20G 0 part /usr/local
│ /opt
│ /srv
│ /boot/grub2/i386-pc
│ /home
│ /boot/writable
│ /boot/grub2/x86_64-efi
│ /.snapshots
│ /root
│ /
└─sda3 8:3 0 98.7G 0 part /var
MicroOS Desktop (dual boot, snapshots and all btrfs)
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 119.2G 0 disk
├─sda1 8:1 0 260M 0 part /boot/efi
├─sda2 8:2 0 16M 0 part
├─sda3 8:3 0 59.5G 0 part
├─sda4 8:4 0 521M 0 part
└─sda5 8:5 0 59G 0 part /usr/local
/opt
/home
/srv
/boot/writable
/boot/grub2/x86_64-efi
/boot/grub2/i386-pc
/.snapshots
/var
/root
/
The doc says snapper excludes every Btrfs subvolume.
That means it should be fine to have the whole disk as btrfs. /home, docker, and other data will not be in the snapshot.
I understand that it can be done by personal flavor, home on xfs, or in one huge partition.
So this thread is solved for me.
Thanks a lot for the feedback!
@a4z I would suggest a web search on btrfs/docker, you might want to allocate it to it’s own subvolume, or have /var separate subvolume. I don’t use docker much at all these days, prefer podman, rancher-desktop etc.