物理上换完盘,fdisk -l可以看到新盘,mkfs.xfs格式化后,可以用blkid看到硬盘uuid,将uuid更新至/etc/fstab文件中。去掉前面的注释。mount -a挂载却挂载不上。
后查看messages日志,报错信息如下:
Dec 10 23:08:39 localhost kernel: XFS (sdb): Mounting V5 Filesystem
Dec 10 23:08:39 localhost kernel: XFS (sdb): Ending clean mount
Dec 10 23:08:39 localhost systemd: Unit cslc-hdd002.mount is bound to inactive unit dev-disk-by\x2duuid-4028ce01\x2d2a83\x2d487b\x2d89ee\x2d983ea101cd76.device. Stopping, too.
Dec 10 23:08:39 localhost systemd: Unmounting /cslc/hdd002...
Dec 10 23:08:39 localhost root: [euid=root]:root pts/3 2022-12-10 17:41 (4.9.1.100):[/root] 2022-12-10 23:08:39 mount -a
Dec 10 23:08:39 localhost kernel: XFS (sdb): Unmounting Filesystem
Dec 10 23:08:39 localhost systemd: Unmounted /cslc/hdd002.
上网一查,得知是换盘之前没有umount之前的故障盘导致的,挂载点和之前的硬盘还存在绑定关系,所以新盘挂不上,解决方法:
systemctl daemon-reload
重新mount -a就ok啦!!!