重庆思庄Oracle、Redhat认证学习论坛

标题: centos 不重启在线刷新磁盘 [打印本页]

作者: mahan    时间: 2023-10-15 11:54
标题: centos 不重启在线刷新磁盘
查找磁盘所在scsi目录
ll /sys/class/scsi_host/
root@data01 ~]# ll /sys/class/scsi_host/
ls: cannot access ls: No such file or directory
/sys/class/scsi_host/:
total 0
lrwxrwxrwx 1 root root 0 Mar 23 10:49 host0 -> …/…/devices/pci0000:00/0000:00:07.1/ata1/host0/scsi_host/host0
lrwxrwxrwx 1 root root 0 Mar 23 10:49 host1 -> …/…/devices/pci0000:00/0000:00:07.1/ata2/host1/scsi_host/host1
lrwxrwxrwx 1 root root 0 Mar 23 10:49 host2 -> …/…/devices/pci0000:00/0000:00:10.0/host2/scsi_host/host2
[root@data01 ~]#

看有几个目录,分别在目录下插入刷新磁盘
[root@data01 ~]# echo "- - -" > /sys/class/scsi_host/host0/scan
[root@data01 ~]# echo "- - -" > /sys/class/scsi_host/host1/scan
[root@data01 ~]# echo "- - -" > /sys/class/scsi_host/host2/scan
[root@data01 ~]#

新磁盘已经刷新出现在系统里,sdc
[root@data01 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 40G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 39G 0 part
├─centos-root 253:0 0 35G 0 lvm /
└─centos-swap 253:1 0 4G 0 lvm [SWAP]
sdb 8:16 0 100G 0 disk
└─sdb1 8:17 0 99G 0 part
└─data_vg0-data_lv0 253:2 0 99G 0 lvm /data
sdc 8:32 0 50G 0 disk
sr0 11:0 1 1024M 0 rom







欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2