免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 20978 | 回复: 5
打印 上一主题 下一主题

linux(Redhat,suse)系统如何在线扫描新增磁盘阵列? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-04-03 12:17 |只看该作者 |倒序浏览
Redhat 5.4新挂接了一台IBM DS4800存储分区,单根光纤连接,
存储端映射完以后主机端fdisk -l无法发现新设备,在线应用系统,不能重启,不能影响业务应用。
求方法,拜谢!

论坛徽章:
0
2 [报告]
发表于 2011-04-03 13:11 |只看该作者
类似AIX系统中cfgmgr命令,求解!

论坛徽章:
0
3 [报告]
发表于 2011-04-03 21:55 |只看该作者
这个以前我没遇到过~~~~~~

论坛徽章:
0
4 [报告]
发表于 2012-04-26 11:12 |只看该作者
安装sg3_utils ,是一个Linux的开发包,用来直接使用 SCSI 命令集访问设备
sg3_utils-1.25-4.el5.x86_64
sg3_utils-devel-1.25-4.el5.i386
sg3_utils-devel-1.25-4.el5.x86_64
sg3_utils-libs-1.25-4.el5.i386
sg3_utils-libs-1.25-4.el5.x86_64
执行scsi_rescan命令扫描  /usr/bin/scsi-rescan

实际上也是调用下面命令:
echo "1" > /sys/class/fc_host/host/issue_lip

                    这个命令会产生一个LIP操作(Loop Initialization Protocol)
                    echo "- - -" > /sys/class/scsi_host/hosth/scan
                   这个命令会扫描SCSI总线。注意要把hosth换成正确的hosts.

论坛徽章:
3
CU十二周年纪念徽章
日期:2013-10-24 15:41:34狮子座
日期:2014-03-27 15:44:382015年辞旧岁徽章
日期:2015-03-03 16:54:15
5 [报告]
发表于 2012-04-26 13:57 |只看该作者
rescan-scsi-bus.sh

论坛徽章:
7
双子座
日期:2013-09-09 15:55:31CU大牛徽章
日期:2013-09-18 15:22:06CU大牛徽章
日期:2013-09-18 15:22:20CU大牛徽章
日期:2013-09-18 15:22:26CU大牛徽章
日期:2013-09-18 15:22:31CU大牛徽章
日期:2013-09-18 15:22:37CU大牛徽章
日期:2013-09-18 15:22:46
6 [报告]
发表于 2012-04-26 15:11 |只看该作者
本帖最后由 milujite 于 2012-04-26 15:12 编辑
  1. Issue
  2.         * How to remove or add scsi devices online?
  3.         * Added Three Additional SCSI Devices to System - OS Doesn't Recognize

  4. Environment
  5.         * Red Hat Enterprise Linux 5 update 4

  6. Resolution1. Add new SCSI disk on the server.
  7. 2. Run the command below as root:
  8. # echo "scsi add-single-device x y z u" > /proc/scsi/scsi

  9. x : The HOST of SCSI controller which controls the disk ("N" of scsiN)
  10. y : SCSI Channel of disk (the value is 0 when it's a single channel; If there are multi-channels, the value is determined by which channel the disk belongs to)
  11. z : SCSI ID of the disk (the value can be determined by which socket the disk pludged in)
  12. u : LUN ID of the disk (the value is 0 by default)

  13. If the values of "x", "y", "z" are not right, the system can not add the disk successfully.
  14. Check the file /proc/scsi/scsi and determine whether the disk can be added successfully. If added successfully, the content of file /proc/scsi/scsi may contain the information of the new disk. The file /proc/scsi/scsi contains the information of every device which system can recognize. The information includes vendor, model type, media type and so on.

  15. For example, I add the third disk in my server, and run the command below:
  16. # echo "scsi add-single-device 0 0 2 0" > /proc/scsi/scsi

  17. Then check the file /proc/partition, the new disk is recognized. And you can make partitions, format, and use it normally.

  18. If you want remove a disk online, take the steps below:
  19. 1. Run the command below:
  20. # echo "scsi remove-single-device x y z u" > /proc/scsi/scsi
  21. The meanings of "x", "y", "z" and "u" are the same as mentioned above.

  22. 2. Remove the disk physically.

  23. For example, I have a SCSI disk and a SCSI CD-ROM which are both on the motherboard. After booting my computer, the contents of file /proc/scsi/scsi are as follows by default:
  24. # cat /proc/scsi/scsi
  25. Attached devices:Host: scsi2 Channel: 00 Id: 00 Lun: 00  Vendor: ATA      Model: Hitachi HTS54168 Rev: SB2O  Type:   Direct-Access                    ANSI  SCSI revision: 05Host: scsi0 Channel: 00 Id: 00 Lun: 00  Vendor: HL-DT-ST Model: CDRW/DVD GCCT10N Rev: A100  Type:   CD-ROM                           ANSI  SCSI revision: 05

  26. Then I try to remove SCSI CD-ROM:
  27. # echo "scsi remove-single-device 0 0 0 0" > /proc/scsi/scsi
  28. Check the file /proc/scsi/scsi again, notice only SCSI disk remained.

  29. Then add the SCSI CD-ROM back again:
  30. # echo "scsi add-single-device 0 0 0 0" > /proc/scsi/scsi

  31. Then I try to remove the only SCSI disk of my computer, as expectation, the system is kernel panic.
  32. # echo "scsi remove-single-device 2 0 0 0" > /proc/scsi/scsi

  33. After rebooting, everything is all right.
复制代码
参考这个吧,成功在RHEL上在线识别EVA 4400。其他存储也一样,要求比较高点,要知道SCSI的各个ID。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP