当我以 root 身份运行 bleachbit 时,我得到了类似交换文件错误的信息。我以前从未见过这些错误,想知道是否有简单的方法可以修复它?
输出如下:
debug: DeepScan.scan: searches= {'/root': [u'^\\.DS_Store$', u'\\.[Bb][Aa][Kk]$', u'[a-zA-Z]{1,4}~$', u'^~wr[a-z][0-9]{4}\\.tmp$', u'^ppt[0-9]{4}\\.tmp$', u'^Thumbs\\.db$', u'^Thumbs\\.db:encryptable$']}
debug: running cmd ['swapon', '-s']
debug: detected swap devices: None
debug: wipe_memory() pid 10751 waiting for child pid 10764
debug: new nice value 19
debug: physical free: 6.66GB (6656237568 B)
info: allocating and wiping 2.66GB (2662291865 B) of memory
debug: physical free: 3.99GB (3991920640 B)
info: allocating and wiping 1.6GB (1596768256 B) of memory
debug: physical free: 2.39GB (2391945216 B)
info: allocating and wiping 956.8MB (956778086 B) of memory
debug: physical free: 1.44GB (1442086912 B)
info: allocating and wiping 576.8MB (576834764 B) of memory
debug: physical free: 893.4MB (893407232 B)
info: allocating and wiping 357.4MB (357362892 B) of memory
debug: physical free: 562.5MB (562454528 B)
info: allocating and wiping 225MB (224985088 B) of memory
warning: child process returned code 9
debug: re-enabling swap
wrote 2 files and 212277846016 bytes in 690 seconds at 307.47 MB/s
0 bytes and 14030430 inodes available to non-super-user
16576512 bytes and 14030430 inodes available to super-user
debug: DeepScan.scan: searches= {'/root': [u'^\\.DS_Store$', u'\\.[Bb][Aa][Kk]$', u'[a-zA-Z]{1,4}~$', u'^~wr[a-z][0-9]{4}\\.tmp$', u'^ppt[0-9]{4}\\.tmp$', u'^Thumbs\\.db$', u'^Thumbs\\.db:encryptable$']}
debug: running cmd ['swapon', '-s']
debug: disabling swap
debug: running cmd ['swapoff', '-a', '-v']
debug: detected swap devices: ['/dev/sda5']
info: wiping swap device '/dev/sda5'
Error in execution of <bleachbit.Command.Function instance at 0x7f44ad7c36c8>
Traceback (most recent call last):
File "/usr/share/bleachbit/bleachbit/Worker.py", line 84, in execute
for ret in cmd.execute(self.really_delete):
File "/usr/share/bleachbit/bleachbit/Command.py", line 134, in execute
for func_ret in self.func():
File "/usr/share/bleachbit/bleachbit/Memory.py", line 270, in wipe_memory
wipe_swap_linux(devices, proc_swaps)
File "/usr/share/bleachbit/bleachbit/Memory.py", line 248, in wipe_swap_linux
'swap device %s is larger than expected' % device)
RuntimeError: swap device /dev/sda5 is larger than expected
wrote 2 files and 212279988224 bytes in 806 seconds at 263.36 MB/s
0 bytes and 14030424 inodes available to non-super-user
16535552 bytes and 14030424 inodes available to super-user
答案1
日志中关键的一行是这个错误:
交换设备 /dev/sda5 比预期大
BleachBit 有一些安全协议,以防止在尝试擦除内存时意外擦除错误的分区,并且在 BleachBit 版本 1.12 中,安全限制为 8,589,934,592 字节(8 千兆字节)。
这个限制是硬编码的,在下一个版本中我将其加倍到 16 千兆字节。
现在您可以:
- 取消选中系统 - 内存禁用清理内存
- 编辑内存.py在您的系统上。将 8 * 1024 ** 3 更改为较大的值,类似于此补丁。
- 等待下一个版本
答案2
你是以 root 身份运行的吗?如果你lsblk
在终端中运行,sda5 分区有多大?它显示“比预期的要大”
尝试将其缩小到 RAM 的两倍(如果这是问题所在)
我从未使用过 BleachBit,但这些是我唯一的想法......