btrfs 在启动时挂载了错误的子卷

btrfs 在启动时挂载了错误的子卷

我的系统使用 btrfs 作为其根卷,并每日进行快照。我试图回滚到最近的备份,但即使我更新了默认子卷并在 中明确设置了子卷 ID,它仍然会在启动时安装相同的子卷/etc/fstab。我遗漏了什么?

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

我是否遗漏了某些内容来让 GRUB 遵守更新?还是我还需要其他东西?

更新:我在 GRUB 配置中发现了一个 subvolid,但更改它似乎不会影响任何东西。我觉得我快要成功了……

相关内容