- 论坛徽章:
- 7
|
本帖最后由 milujite 于 2012-12-04 11:38 编辑
mike79 发表于 2012-11-29 10:41 ![]()
看了那个帖子,说的应该是我吧。09年的事情,还真是怀念~~~
那个时候我记得Linux认个新磁盘,比如SAN LU ...
认盘要重启可以说业余么,不过确实麻烦倒是真的~~
AIX什么都好,比Linux/SOLARIS都要简单,就KSH真他妈蛋疼,换个BASH这样功能强点shell会死啊。- Issue
- * How to remove or add scsi devices online?
- * Added Three Additional SCSI Devices to System - OS Doesn't Recognize
- Environment
- * Red Hat Enterprise Linux 5 update 4
- Resolution1. Add new SCSI disk on the server.
- 2. Run the command below as root:
- # echo "scsi add-single-device x y z u" > /proc/scsi/scsi
-
- x : The HOST of SCSI controller which controls the disk ("N" of scsiN)
- 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)
- z : SCSI ID of the disk (the value can be determined by which socket the disk pludged in)
- u : LUN ID of the disk (the value is 0 by default)
-
- If the values of "x", "y", "z" are not right, the system can not add the disk successfully.
- 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.
-
- For example, I add the third disk in my server, and run the command below:
- # echo "scsi add-single-device 0 0 2 0" > /proc/scsi/scsi
-
- Then check the file /proc/partition, the new disk is recognized. And you can make partitions, format, and use it normally.
-
- If you want remove a disk online, take the steps below:
- 1. Run the command below:
- # echo "scsi remove-single-device x y z u" > /proc/scsi/scsi
- The meanings of "x", "y", "z" and "u" are the same as mentioned above.
-
- 2. Remove the disk physically.
-
- 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:
- # cat /proc/scsi/scsi
- 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
-
- Then I try to remove SCSI CD-ROM:
- # echo "scsi remove-single-device 0 0 0 0" > /proc/scsi/scsi
- Check the file /proc/scsi/scsi again, notice only SCSI disk remained.
-
- Then add the SCSI CD-ROM back again:
- # echo "scsi add-single-device 0 0 0 0" > /proc/scsi/scsi
-
- Then I try to remove the only SCSI disk of my computer, as expectation, the system is kernel panic.
- # echo "scsi remove-single-device 2 0 0 0" > /proc/scsi/scsi
-
- After rebooting, everything is all right.
复制代码 |
|