snapper 重装以后总是报错

#1

做过一次 rollback,然后清理了一下,把 /etc/下几个snapper相关的文件夹删没了,重装snapper后 /etc/snapper/ 下的文件夹没有那几个配置文件夹,从其他机子复制了一份,

$ sudo snapper get-config
键                     | 值   
-----------------------+------
ALLOW_GROUPS           |      
ALLOW_USERS            |      
BACKGROUND_COMPARISON  | yes  
EMPTY_PRE_POST_CLEANUP | yes  
EMPTY_PRE_POST_MIN_AGE | 1800 
FSTYPE                 | btrfs
NUMBER_CLEANUP         | yes  
NUMBER_LIMIT           | 50   
NUMBER_LIMIT_IMPORTANT | 10   
NUMBER_MIN_AGE         | 1800 
QGROUP                 |      
SPACE_LIMIT            | 0.5  
SUBVOLUME              | /    
SYNC_ACL               | no   
TIMELINE_CLEANUP       | yes  
TIMELINE_CREATE        | yes  
TIMELINE_LIMIT_DAILY   | 10   
TIMELINE_LIMIT_HOURLY  | 10   
TIMELINE_LIMIT_MONTHLY | 10   
TIMELINE_LIMIT_WEEKLY  | 0    
TIMELINE_LIMIT_YEARLY  | 10   
TIMELINE_MIN_AGE       | 1800 

不能创建新的配置文件,显示

$ sudo snapper create-config /
创建配置失败 (subvolume already covered)。

也不能创建快照,所有都不能
snapper.log 显示:

MIL libsnapper(5305) Snapper.cc(Snapper):91 - Snapper constructor
MIL libsnapper(5305) Snapper.cc(Snapper):92 - libsnapper version 0.5.6
MIL libsnapper(5305) Snapper.cc(Snapper):93 - config_name:root disable_filters:false
MIL libsnapper(5305) AsciiFile.cc(reload):114 - loading file /etc/snapper/configs/root
MIL libsnapper(5305) AsciiFile.cc(getValue):235 - key:SUBVOLUME value:/
MIL libsnapper(5305) AsciiFile.cc(getValue):235 - key:FSTYPE value:btrfs
MIL libsnapper(5305) AsciiFile.cc(getValue):235 - key:QGROUP value:
MIL libsnapper(5305) AsciiFile.cc(getValue):235 - key:SYNC_ACL value:no
MIL libsnapper(5305) Snapper.cc(Snapper):125 - subvolume:/ filesystem:btrfs
MIL libsnapper(5305) Snapper.cc(loadIgnorePatterns):177 - number of ignore patterns:8
WAR libsnapper(5305) FileUtils.cc(SDir):88 - THROW: open failed path:/ errno:2 (No such file or directory)
ERR libsnapper(5305) Snapshot.cc(initialize):335 - reading failed
WAR libsnapper(5305) FileUtils.cc(SDir):88 - THROW: open failed path:/ errno:2 (No such file or directory)
WAR libsnapper(5305) Client.cc(dispatch):1633 - CAUGHT: open failed path:/ errno:2 (No such file or directory)
MIL libsnapper(5305) Snapper.cc(~Snapper):136 - Snapper destructor

yast2 snapper 显示:

failed to create new snapshot:
open failed path:/ errno: (NO such file or directory);caused by 3 sender=:1.174 serial=12 reply_serial=13 path=;interface=;member= error_name=error.io_error

这是不是说没有 / 这个目录?但我在其他机子上都好好的呀?要怎么解决?

openSUSE-Gossip-20190408-20190731
#2
$ sudo btrfs subvolume list -u /
ID 288 gen 33861 top level 5 uuid 50111a41-a7e7-2248-ad2d-9c2215700a61 path .snapshots
ID 754 gen 22763 top level 288 uuid 694e80a8-8cfc-8746-ad2b-319b1fc643c5 path .snapshots/183/snapshot
ID 777 gen 22763 top level 288 uuid b75ed4……

所有.snapshot 都在,那我删掉的是什么呢?

#3

@cz12745

find /etc/snapper -type f -print 

先告诉我们你还剩下什么配置…

#4

.snapshot是btr子卷,和snapper卸载与否无关。
另外我合理怀疑你snapper从未卸载过,因此重装的时候直接跳过了。试试卸掉,删除/etc/snapper,再重装。

#5
$ sudo find /etc/snapper -type f -print
/etc/snapper/configs/root
/etc/snapper/config-templates/default
/etc/snapper/filters/base.txt
/etc/snapper/filters/lvm.txt
/etc/snapper/filters/x11.txt
/etc/snapper/zypp-plugin.conf

请问是否需要具体内容??

#6

snapper 倒是卸载了,/etc/snapper 也删除了,而我觉得出现现在的问题是我目前不在 root 卷下,我是在一个子卷下面,btrfts 说明中:

A Btrfs filesystem has a default subvolume, which is initially set to be the top-level subvolume and which is mounted if no subvol or subvolid option is specified.Changing the default subvolume with btrfs subvolume default will make the top level of the filesystem inaccessible, except by use of the subvol=/ or subvolid=5 mount options.

估计在btrfs 中将现有子卷更改为顶级子卷可以解决这个问题,但我尝试时总会告诉我对 grub 启动有损害,而我也是不熟悉英文,对分区、文件系统也是一知半解,就不敢往下继续了。

#7
$ sudo btrfs subvolume list /
ID 288 gen 33861 top level 5 path .snapshots
ID 754 gen 22763 top level 288 path .snapshots/183/snapshot
ID 777 gen……(略)ots/885/snapshot
ID 1507 gen 34900 top level 288 path .snapshots/886/snap

我目前是在 ID 1507 886子卷下面

#8

计划在明天左右常识一下 在btrfs 中将默认子卷该回到 顶级子卷,看一下是否成功。

#9

把 /etc/snapper/configs/root 删除,把 /etc/sysconfig/snapper 里 SNAPPER_CONFIGS 选项里的 root 删除。

然后再去 sudo snapper create-config /

#10

果然厉害:可以在 / 目录下看到 .snapshots 了,也能在 yast 创建快照了

$ sudo btrfs subvolume list /
ID 288 gen 33861 top level 5 path .snapshots
ID 754 gen ……(略)
ID 1512 gen 34959 top level 1507 path .snapshots
ID 1513 gen 34959 top level 1512 path .snapshots/1/snapshot

多谢多谢
不过也证明了我白看了这几天的说明文件了
:frowning:

于关闭 #11

本主题在最后一个回复创建后60分钟后自动锁定。不再允许添加新回复。