[CONTENT] Linux common parameters of /etc/fstab file

/dev/vg/lv_var /var xfs nodev,nosuid,noexec 0 0
/dev/vg/lv_var_log /var/log xfs nodev,nosuid,noexec,x-systemd.requires-mounts-for=/var 0 0

(
Add:
1) nodev parameter here means this directory can not be interpreted by devices or blocks
2) nosuid parameter here means no setuid files can be created in this directory
3) noexec parameter here means no files can be executed in this directory
4) x-systemd.requires-mounts-for=/var here parameter means /var/log directory can not be mounted until /var directory has been mounted
)

[命令] Linux 命令 arp (ARP 缓存表的管理)

内容一:ARP 缓存表的作用

在本地局域网络中,各个设备的网卡都有自己的 ARP 缓存表,用于记录局域网中各个设备 IP 地址和 MAC 地址的对应关系。

内容二:从本地 ARP 缓存表中清除某个 IP 地址的 ARP 缓存

# arp -d 192.168.0.1

(补充:这里以从本地 ARP 缓存表清楚 IP 地址 192.168.0.1 的 ARP 缓存为例)

内容三:获得 ARP 缓存

# ping 192.168.0.1


补充:
1) 这里以获取 192.168.0.1 的 ARP 缓存为例。
2) 当本地尝试连接 IP 地址 192.168.0.1 时,首先发生 ARP 报文询问 IP 地址 192.168.0.1 的 MAC 地址获得 ARP 缓存。如果此缓存长期没有被使用则会自动删除。如果记录 ARP 缓存过多,那旧的 ARP 缓存会被有限删除

[DEBUG] Linux resolve df command is stuck

Error phenomenon:

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

Analysis:

There may be some network storage disconnected

Solution:

Step One: Use mount command to check if there is any disconnected network storage here

# mount

Step Two: Use unmount command to unmount this disconnected network storage

# umount -f -l <nfs storage which is stuck>

[CONTENT] Linux recommended swap size

RHEL6 RHEL7 RHEL8 RHEL9

RAM sizeRecommended swap sizeRecommended swap size if allowing for hibernation
From 0 to 2GB 2 times the RAM size3 times the RAM size
From 2GB to 8GBThe same size of the RAM2 times the RAM size
From 8GB to 64GBAt least 4GB1.5 times the RAM size
From 64GBAt least 4GBHibernation is not recommended
RHEL6 RHEL7 RHEL8 RHEL9 Recommended swap size table

Note: A 100GB swap is recommended if system with over 140 logical processes or over 3TB RAM

Reference:

https://access.redhat.com/solutions/15244