Storage Snapshots bug?

If a disk had multiple patitions, it would not roll back.
There are no errors on the web UI.

Reproduced environment
FreedomBox version 24.3.
Mini PC N5105 (booted from UEFI)
Proxmox VM (booted from UEFI)

Thank you very much in advance.
(I am using a translation site)

When you say “it would not roll back”, what is “it”?
The entire system? One of the partitions? If a specific partition, which one?

And when you say “multiple partitions”, what do you mean? Its fairly normal for linux installs to have two or three partitions out of the box. Did you have another partition besides the part of the disk you installed FBX to ?

Hi Leo,

I believe that storage snapshots is built around your FreedomBox having a single BTRFS filesystem mounted at /. You should confirm that matches your setup to diagnose a problem in snapshots. You can post the output from the mount command if you are not sure, and we’ll have a look with you.

An experienced Linux user may be familiar with multiple partitions and filesystems layout (/, /usr, /home, etc.), but snapshots will not span those filesystems even if all filesystems are btrfs. I could imagine a situation where a snapshot would be expected to contain a file from /home or /usr, but when wanted the file would not be there because the target was on a different mounted filesystem.

The snapshot situation is a bit of a trap for experienced linux users, in my opinion, and I fell into it with my last FreedomBox build. I’m now running a single btrfs filesystem mounted at /.

My disk partitions are for /boot, swap, and /.

Sorry for the lack of words.

I will send you the result of the mount command. (Proxmox VM)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1965616k,nr_inodes=491404,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=397116k,mode=755,inode64)
/dev/sda2 on / type btrfs (rw,relatime,ssd,space_cache=v2,subvolid=256,subvol=/@rootfs)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12915)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /.snapshots type autofs (rw,relatime,fd=45,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=14375)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/dev/sda2 on /.snapshots type btrfs (rw,relatime,ssd,space_cache=v2,subvolid=257,subvol=/@rootfs/.snapshots)
tmpfs on /run/user/10000 type tmpfs (rw,nosuid,nodev,relatime,size=397112k,nr_inodes=99278,mode=700,uid=10000,gid=100,inode64)

I will also send you the results of the lsblk command. (Proxmox VM)

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda      8:0    0   32G  0 disk
├─sda1   8:1    0  512M  0 part /boot/efi
└─sda2   8:2    0 31.5G  0 part /.snapshots
                                /
sr0     11:0    1 1024M  0 rom
zram0  252:0    0  1.9G  0 disk [SWAP]

Thank you very much.

That is the arrangement that you want for all of your files to be included in snapshots.

Knowing that will you answer Timmy’s questions?

We apologize.
I was wrong about the multiple patinations.

Are you saying that a btrfs install with debian netinst.iso will not rollback because / is a subvolume?

Thank you in advance for your help.

It means that clicking the rollback button in “Storage Snapshots” in plinth is not reflected.

Digging through his mount command output

/dev/sda2 on /.snapshots type btrfs 

looks like there is a second partition that’s in root.

@leo Question - if you are running FBX within Proxmox, why not set up a scheduled VM backup and just use that?

I’m also running FBX in a Proxmox VM and I just use Proxmox for backups.

We have about 5 Freedomboxes running.
(at home, at a friend’s house, and at work)
I like it because it is very easy to run a mail server.
I set up this Proxmox VM to reproduce a situation where I could not roll back.

The Proxmox VM booted from a downloadable freedombox image can be rolled back. However, the miniPC running at home was a legacy BIOS machine that could not boot.

I may be able to run it on Proxmox at home.

Thank you very much.

I’ve shoe-horned Proxmox on things as silly as a Wyse terminals (got running cluster of three for simple test purposes). Doubt a Wyse terminal would run FBX at all.

Lowest I’ve run it on (with Matrix as the only real service in FBX) was a Ryzen 5 1600X system (running alongside a gitea VM).

I think that one happens automatically by btrfs. I have that, but never told the partitioner to do such a thing at install time.

1 Like

Hi @leo

I think your partitions are correct for snapshots to be working in FreedomBox. I do not worry about the second mount point for /dev/sda2 on /.snapshots. I believe that is how btrfs normally works.

You tell me that you did a rollback. Did you use the FreedomBox page to do this?

How full is your disk? You can check with df -h /

Leo, it looks like you are exposing your systems. Will you remove that last post for your safety please?

After this let me suggest that you start a new support post and carefully fill out all the sections with the information you have. Somebody who knows more about this than I do may get back with you.

Please don’t post your host name, user names, or passwords, this board is available to the public.

It was thoughtless. Deleted.