3

My system uses btrfs for its root volume, with daily snapshots. I'm trying to roll back to a recent backup, but it persists in mounting the same subvolume on boot even though I updated the default subvolume and explicitly set the subvolid in /etc/fstab. What am I missing?

root@leviathan:~# btrfs su li /
ID 571 gen 1117988 top level 5 path default # the old one
ID 575 gen 1117506 top level 571 path var/lib/machines
ID 761 gen 1117964 top level 5 path 2015-11-19 # the one I'm trying to roll back to
ID 762 gen 1113475 top level 5 path 2015-11-20
ID 763 gen 1115824 top level 5 path 2015-11-21

root@leviathan:~# btrfs su sh /  # shows the old subvolume
/
        Name:                   default
        uuid:                   79ec960b-855a-4e4c-9cef-b2590e4dc6f9
        Parent uuid:            0bd42cb4-c0e2-b64c-97ca-4f5c5aa94586
        Creation time:          2015-04-30 19:56:09
        Object ID:              571
        Generation (Gen):       1117984
        Gen at creation:        636777
        Parent:                 5
        Top Level:              5
        Flags:                  -
        Snapshot(s):
                                2015-11-19
                                2015-11-20
                                2015-11-21

root@leviathan:~# btrfs su get-default /  # this is what I want, yet not what mounts
ID 761 gen 1117964 top level 5 path 2015-11-19

root@leviathan:~# cat /etc/fstab  # changed the subvolid, old line commented
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
#UUID=4fb9f5f9-1195-440c-8594-c552298c1e44  /  btrfs  defaults,subvolid=571  0  1
UUID=4fb9f5f9-1195-440c-8594-c552298c1e44  /  btrfs  defaults,subvolid=761  0  1

root@leviathan:~# update-grub2  # on a hunch that this is a GRUB problem
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.2.0-18-generic
Found initrd image: /boot/initrd.img-4.2.0-18-generic
Found linux image: /boot/vmlinuz-4.2.0-16-generic
Found initrd image: /boot/initrd.img-4.2.0-16-generic
Found memtest86+ image: /default/boot/memtest86+.elf
Found memtest86+ image: /default/boot/memtest86+.bin
done

root@leviathan:~# reboot  # doesn't help

Did I miss something to get GRUB to respect the update? Or is there something else I need?

UPDATE: I found a subvolid in the GRUB config, but changing it doesn't appear to affect anything. I feel like I'm getting close...

0

You must log in to answer this question.

Browse other questions tagged .