日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

Linux在线扫描热添加的SCSI/iSCSI设备

發布時間:2023/12/1 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Linux在线扫描热添加的SCSI/iSCSI设备 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

SCSI接口具有應用范圍廣、多任務、帶寬大、CPU占用率低,以及熱插拔等優點,在服務器中廣泛的應用。

當然在虛擬化平臺支持下,也能模擬出SCSI設備,方便在虛擬機上熱添加SCSI設備(一般是硬盤)

但是在熱添加SCSI設備之后,需要手動rescan?SCSI設備。

比較常見的做法是輸入如下命令

echo "- - -" > /sys/class/scsi_host/host*/scan

CentOS/RHEL5.9開始(SUSE11/12也有這個工具)提供一個工具包sg3_utils同樣可以方便的實現rescan操作

# yum install sg3_utils # /usr/bin/rescan-scsi-bus.sh
即可rescan SCSI設備

以下是rescan-scsi-bus.sh的說明

# /usr/bin/rescan-scsi-bus.sh --help Usage: rescan-scsi-bus.sh [options] [host [host ...]] Options:-a scan all targets, not just currently existing [default: disabled]-d enable debug [default: 0]-l activates scanning for LUNs 0--7 [default: 0]-L NUM activates scanning for LUNs 0--NUM [default: 0]-w scan for target device IDs 0--15 [default: 0--7]-c enables scanning of channels 0 1 [default: 0 / all detected ones]-m update multipath devices [default: disabled]-r enables removing of devices [default: disabled]-f flush failed multipath devices [default: disabled]-i issue a FibreChannel LIP reset [default: disabled]-u look for existing disks that have been remapped-s look for resized disks and reload associated multipath devices, if applicable --alltargets: same as -a --remove: same as -r --flush: same as -f --issue-lip: same as -i --wide: same as -w --multipath: same as -m --forceremove: Remove stale devices (DANGEROUS) --forcerescan: Remove and readd existing devices (DANGEROUS) --nooptscan: don't stop looking for LUNs if 0 is not found --color: use coloured prefixes OLD/NEW/DEL --hosts=LIST: Scan only host(s) in LIST --channels=LIST: Scan only channel(s) in LIST --ids=LIST: Scan only target ID(s) in LIST --luns=LIST: Scan only lun(s) in LIST --sync/nosync: Issue a sync / no sync [default: sync if remove] --attachpq3: Tell kernel to attach sg to LUN 0 that reports PQ=3 --reportlun2: Tell kernel to try REPORT_LUN even on SCSI2 devices --largelun: Tell kernel to support LUNs > 7 even on SCSI2 devs --sparselun: Tell kernel to support sparse LUN numbering --update: same as -u --resize: same as -sHost numbers may thus be specified either directly on cmd line (deprecated) oror with the --hosts=LIST parameter (recommended). LIST: A[-B][,C[-D]]... is a comma separated list of single values and ranges(No spaces allowed.)

本文參考鏈接如下

How do I rescan an HP Smart Array for new devices without rebooting?

How to rescan the SCSI bus to add or remove a SCSI device without rebooting the computer

ADDING/REMOVING A LOGICAL UNIT THROUGH RESCAN-SCSI-BUS.SH

HOWTO: Add, Resize and Remove LUN without restarting SLES or OES Linux

轉載于:https://www.cnblogs.com/luanlengli/p/8849154.html

總結

以上是生活随笔為你收集整理的Linux在线扫描热添加的SCSI/iSCSI设备的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。