电脑不识别新硬盘系统

发布时间: 2023-04-16 07:03 阅读: 文章来源:转载
Linux 添加新硬盘无法识别[无需重启]的解决方法

1、查看硬盘

[root@linux-host1 ~]# lsblk NAMEMAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda8:0020G0 disk ├─sda18:101G0 part /boot└─sda28:2019G0 part ├─centos-root 253:0017G0 lvm/└─centos-swap 253:102G0 lvm[SWAP]sr011:011G0 rom # 没有检查到sdb的硬盘

2、查看当前系统有多少个host目录

[root@linux-host1 ~]# ls /sys/class/scsi_host/ -ltotal 0lrwxrwxrwx. 1 root root 0 Sep 16 12:42 host0 -> ../../devices/pci0000:00/0000:00:10.0/host0/scsi_host/host0lrwxrwxrwx. 1 root root 0 Sep 16 12:42 host1 -> ../../devices/pci0000:00/0000:00:07.1/ata1/host1/scsi_host/host1lrwxrwxrwx. 1 root root 0 Sep 16 12:42 host2 -> ../../devices/pci0000:00/0000:00:07.1/ata2/host2/scsi_host/host2

3、有多少个host就往多少个host目录里面文件scan追加"- - -"

[root@linux-host1 ~]# echo "- - -"> /sys/class/scsi_host/host0/scan[root@linux-host1 ~]# echo "- - -"> /sys/class/scsi_host/host1/scan[root@linux-host1 ~]# echo "- - -"> /sys/class/scsi_host/host2/scan

4、再次检查硬盘是否已经识别到

[root@linux-host1 ~]# lsblk NAMEMAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda8:0020G0 disk ├─sda18:101G0 part /boot└─sda28:2019G0 part ├─centos-root 253:0017G0 lvm/└─centos-swap 253:102G0 lvm[SWAP]sdb8:16020G0 disk
•••展开全文
相关文章