6.5. Shell 和命令行工具
现在,当按内存对进程排序时,top -u
命令至少会显示一个进程
在以前的版本中,当使用 -u < ;
> 参数执行 user
top
命令时,用户与运行命令的不同时,所有进程都会按内存排序时消失。在这个版本中,当按内存对进程排序时,
top
命令至少会显示一个进程。
要保留光标的位置,不会显示所有进程。您可以向上滚动结果来显示剩余的进程。
ReaR 现在会在安装 BIOS 和 UEFI 引导装载程序时决定存在 BIOS 引导装载程序
在以前的版本中,在混合引导装载程序设置(UEFI
和 BIOS
)中,当 UEFI
被用来引导时,Relax-and-Recover (ReaR)只恢复 UEFI
引导装载程序而不是 BIOS
引导装载程序。这会导致系统具有 GUID 分区表
(GPT
)、BIOS 引导分区,而不是 BIOS 引导装载程序。在这种情况下,ReaR 无法创建救援镜像,尝试使用 rear mkbackup
或 rear mkrescue
命令生成备份或救援镜像会失败,并显示以下错误消息:
ERROR: Cannot autodetect what is used as bootloader, see default.conf about 'BOOTLOADER'.
ERROR: Cannot autodetect what is used as bootloader, see default.conf about 'BOOTLOADER'.
有了这个更新,ReaR 决定存在 UEFI
和 BIOS
引导装载程序,恢复它们,且不会在 GPT
中带有 BIOS
引导分区的系统上遇到 BIOS
引导装载程序时失败。因此,可以备份并多次恢复具有混合 UEFI
和 BIOS
引导装载程序设置的系统。
Jira:RHEL-16864[1]
ReaR 在恢复过程中不再使用 logbsize
,sunit
和 swidth
挂载选项
在以前的版本中,当使用 MKFS_
配置设置恢复带有与原始参数的 XFS 文件系统时,Relax-and-Recover (ReaR)使用适用于原始文件系统的挂载选项挂载这个文件系统,但不适用于恢复的文件系统。因此,当 ReaR 运行 XFS
_OPTIONSmount
命令时,磁盘布局重新创建会失败,并显示以下错误消息:
wrong fs type, bad option, bad superblock on and missing codepage or helper program, or other error.
wrong fs type, bad option, bad superblock on and missing codepage or helper program, or other error.
内核日志显示以下信息之一:
logbuf size must be greater than or equal to log stripe size
logbuf size must be greater than or equal to log stripe size
alignment check failed: sunit/swidth vs. agsize
alignment check failed: sunit/swidth vs. agsize
有了这个更新,ReaR 在挂载重新创建的 XFS
文件系统时避免使用 logbsize
、sunit
和 swidth
挂载选项。因此,当使用 MKFS_XFS_OPTIONS
配置设置时,磁盘布局会成功重新创建。
Jira:RHEL-10478[1]
在有小的精简池元数据大小的系统上,ReaR 恢复不再会失败
在以前的版本中,当使用精简池保存 LVM 卷组布局时,ReaR 不会保存池元数据卷的大小。在恢复过程中,ReaR 会使用默认大小重新创建池,即使系统使用了非默认池元数据大小。
因此,当原始池元数据大小小于默认大小,且卷组中没有可用空间时,系统恢复过程中的布局重新创建会失败,并显示类似这些示例的信息:
Insufficient free space: 230210 extents needed, but only 230026 available
Insufficient free space: 230210 extents needed, but only 230026 available
或者
Volume group "vg" has insufficient free space (16219 extents): 16226 required.
Volume group "vg" has insufficient free space (16219 extents): 16226 required.
在这个版本中,恢复的系统有一个与原始系统大小相同的元数据卷。因此,恢复具有小的精简池元数据大小的系统,且卷组中没有额外的可用空间成功完成。
ReaR 现在在救援系统中保留 NetBackup 的 bprestore
命令的日志以及恢复的系统
在以前的版本中,当使用 NetBackup 集成(BACKUP=NBU
)时,ReaR 会在恢复过程中将日志从 bprestore
命令添加到退出时删除的目录。另外,ReaR 没有将命令生成的更多日志保存到恢复的系统上的 /usr/openv/netbackup/logs/bprestore/
目录下。
因此,如果 bprestore
命令在恢复过程中失败,日志会被删除,除非使用 -d
或 -D
选项运行 rear restore
命令。此外,即使恢复成功完成,/usr/openv/netbackup/logs/bprestore/
目录下的日志也会在重启后丢失,且无法检查。
在这个版本中,ReaR 在救援系统中的 /var/lib/rear/restore
目录中保留来自 bprestore
命令的日志,它在 rear restore
命令完成后保留它,直到救援系统重启为止。如果系统被恢复,则 /usr/openv/netbackup/logs/bprestore/
中的所有日志都会复制到 /var/log/rear/recover/restore
目录中,以及 /var/lib/rear/restore
中的日志。
如果在配置文件中设置了 TMPDIR
变量,ReaR 在恢复过程中不再失败
在以前的版本中,ReaR 默认配置文件 /usr/share/rear/conf/default.conf
包含以下说明:
To have a specific working area directory prefix for Relax-and-Recover specify in /etc/rear/local.conf something like export TMPDIR="/prefix/for/rear/working/directory" where /prefix/for/rear/working/directory must already exist. This is useful for example when there is not sufficient free space in /tmp or $TMPDIR for the ISO image or even the backup archive.
# To have a specific working area directory prefix for Relax-and-Recover
# specify in /etc/rear/local.conf something like
#
# export TMPDIR="/prefix/for/rear/working/directory"
#
# where /prefix/for/rear/working/directory must already exist.
# This is useful for example when there is not sufficient free space
# in /tmp or $TMPDIR for the ISO image or even the backup archive.
以上提到的指令无法正常工作,因为救援环境中
变量的值相同,如果救援镜像中指定的目录不存在,则这不正确。
TMPDIR
因此,当救援镜像引导时,在 /etc/rear/local.conf
文件中设置并导出 TMPDIR
会导致以下错误:
mktemp: failed to create file via template '/prefix/for/rear/working/directory/tmp.XXXXXXXXXX': No such file or directory cp: missing destination file operand after '/etc/rear/mappings/mac' Try 'cp --help' for more information. No network interface mapping is specified in /etc/rear/mappings/mac
mktemp: failed to create file via template '/prefix/for/rear/working/directory/tmp.XXXXXXXXXX': No such file or directory
cp: missing destination file operand after '/etc/rear/mappings/mac'
Try 'cp --help' for more information.
No network interface mapping is specified in /etc/rear/mappings/mac
或者,在运行 rear 恢复
时运行以下命令,并稍后中止:
ERROR: Could not create build area
ERROR: Could not create build area
在这个版本中,ReaR 在救援环境中取消设置 TMPDIR
变量。ReaR 还会在 /etc/rear/local.conf
中设置变量,并在设置了变量时打印警告。/usr/share/rear/conf/default.conf
中的注释已被修改为指示在环境中设置和导出 TMPDIR
,然后再执行它,而不是在
/etc/rear/local.conf
中设置它。
如果在 /etc/rear/local.conf
中使用了命令 export TMPDIR=…
,ReaR 现在打印以下警告:
Warning: Setting TMPDIR in a configuration file is deprecated. To specify a working area directory prefix, export TMPDIR before executing 'rear'
Warning: Setting TMPDIR in a configuration file is deprecated. To specify a working area directory prefix, export TMPDIR before executing 'rear'
因此,在上述配置中,恢复可以成功。
在 /etc/rear/local.conf
等配置文件中设置 TMPDIR
现已弃用,功能将在以后的版本中删除。建议您从 /etc/rear/local.conf
中删除此类设置,并在调用 ReaR 前在环境中设置和导出 TMPDIR
。