报错代码:
History:
- Can't hardlink/copy /var/tmp/...... to /var/cache/zypp/packages/......
- Can't provide ./x86_64/......
Abort, retry, ignore? [a/r/i] (a):
分析:
如果对应的目录存储空间不够,就会出现此类报错
解决方法:
扩大对应的存储空间或者在对应的目录里删除无用的数据
History:
- Can't hardlink/copy /var/tmp/...... to /var/cache/zypp/packages/......
- Can't provide ./x86_64/......
Abort, retry, ignore? [a/r/i] (a):
如果对应的目录存储空间不够,就会出现此类报错
扩大对应的存储空间或者在对应的目录里删除无用的数据
Input df command and the command is stuck
Can not us cd / command to access /(root) directory
Can not us ls / command to display /(root) directory
There may be some network storage disconnected
# mount
(Add: At this moment, we can see at least one remote storage mount to local directory. If we cd to this directory, system command prompt will output target is busy)
# umount -f <nfs storage which is stuck>
Or:
# umount -l <nfs storage which is stuck>
Or:
# umount -f -l <nfs storage which is stuck>
For RHEL 6, RHEL 7, RHEL 8, RHEL 9
RAM size | Recommended swap size | Recommended swap size if allowing for hibernation |
From 0 to 2GB | 2 times the RAM size | 3 times the RAM size |
From 2GB to 8GB | The same size of the RAM | 2 times the RAM size |
From 8GB to 64GB | At least 4GB | 1.5 times the RAM size |
From 64GB | At least 4GB | Hibernation is not recommended |
Note: A 100GB swap is recommended if system with over 140 logical processes or over 3TB RAM
https://access.redhat.com/solutions/15244
Linux 的 swappiness 参数用于控制虚拟内存 (交换分区) swap 的使用。
swappiness 参数的默认值是 60,也就是说当物理内存使用率达到 40 时,开始使用虚拟内存 (交换分区) swap。
当 swappiness 参数的值是 0 时,则只有当物理机内存耗尽了以后才会使用虚拟内存 (交换分区) swap。
当 swappiness 参数的值是 100 时,则立刻使用虚拟内存 (交换分区) swap。
# swapon -s
# swapon -a
# swapoff -a
# swapoff -a && swapon -a
# sysctl -p swappiness=60
或者:
# sysctl vm.swappiness=60
或者:
# echo 60 > /proc/sys/vm/swappiness
(补充:这里以把 swappiness 的值设置成 60 为例)
(
注意:
1) 临时设置重启后失效
2) 临时设置了以后不会马上生效,只有当系统重新调用内存以后才会生效
)
# vim /etc/sysctl.conf
添加以下内容:
......
vm.swappiness=60
(补充:这里以把 swappiness 的值设置成 60 为例)
# sysctl -p
# cat /proc/sys/vm/swappiness
# sysctl vm.swappiness
默认情况下,journal 的日志存储在 /run/log/journal,而 /run 目录只是一个临时目录。
将 Storage 参数设置为 persistent 后,journal 的日志将存储在 /var/log/journal,/var/log 则是一个永久的目录。
# vi /etc/systemd/journald.conf
将部分内容修改如下:
[Journal]
......
Storage=persistent
......
# systemctl restart systemd-journald.service
https://linuxconfig.org/introduction-to-the-systemd-journal