我有一个 btrfs 文件系统,并且正在运行 OpenSuse 15。它已多次升级到新的 OpenSuse。第一次安装可能不在 btrfs 上。我的根分区有点拥挤,我无法确定它是否安全,以及如何删除我认为可能是“不需要”的 snapper 快照。
> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 41G 35G 5.1G 88% /
这里有什么东西看起来像一个很好的删除候选者吗?也许是 17G qgroup?
> btrfs qgroup show /
qgroupid rfer excl
-------- ---- ----
0/5 16.00KiB 16.00KiB
0/257 16.00KiB 16.00KiB
0/258 14.67MiB 14.67MiB
....
0/710 11.28GiB 372.00KiB
1/0 28.32GiB 17.04GiB
255/269 16.00KiB 16.00KiB
Snapper 列出了以下快照:
> snapper list
Type | # | Pre # | Date | User | Cleanup | Description | Userdata
-------+-----+-------+--------------------------+------+---------+-----------------------+--------------
single | 0 | | | root | | current |
single | 1 | | Sat Mar 10 04:01:52 2018 | root | | first root filesystem |
pre | 177 | | Mon Mar 11 00:37:41 2019 | root | number | zypp(zypper) | important=yes
post | 178 | 177 | Mon Mar 11 00:52:40 2019 | root | number | | important=yes
...
pre | 283 | | Sat Sep 21 02:35:12 2019 | root | number | zypp(zypper) | important=no
post | 284 | 283 | Sat Sep 21 02:36:04 2019 | root | number | | important=no
pre | 285 | | Sun Sep 22 12:51:57 2019 | root | number | yast snapper |
post | 286 | 285 | Sun Sep 22 12:53:04 2019 | root | number | |
给我更多的gobbledygook:
> btrfs subvol show /
@/.snapshots/1/snapshot
Name: snapshot
UUID: 4eed144d-9dee-6447-8cd5-75c756bf2367
Parent UUID: df2738e0-3b0e-3d42-9cd0-da8252d015be
Received UUID: -
Creation time: 2018-03-10 04:01:52 -0800
Subvolume ID: 259
Generation: 936168
Gen at creation: 11
Parent ID: 258
Top level ID: 258
Flags: -
Snapshot(s):
@/.snapshots/177/snapshot
@/.snapshots/178/snapshot
@/.snapshots/179/snapshot
@/.snapshots/180/snapshot
@/.snapshots/220/snapshot
@/.snapshots/221/snapshot
@/.snapshots/234/snapshot
@/.snapshots/235/snapshot
@/.snapshots/267/snapshot
@/.snapshots/268/snapshot
@/.snapshots/281/snapshot
@/.snapshots/282/snapshot
@/.snapshots/283/snapshot
@/.snapshots/284/snapshot
@/.snapshots/285/snapshot
@/.snapshots/286/snapshot
@/.snapshots/287/snapshot
@/.snapshots/288/snapshot
@/.snapshots/289/snapshot
@/.snapshots/290/snapshot
请让我知道还有什么其他信息可以提供帮助。
由于您使用的是 snapper,因此最好使用它的工具来管理这些快照。
rm
无论如何都无法删除 BTRFS 快照;)要删除所有快照(“当前”除外),请运行:
sudo snapper delete 1-290