Add and remove scsi devices in linux

Source: Internet
Author: User
Add and remove the scsi device-linux Enterprise Application-Linux server application. For more information, see the following section. I have made a lot of scsi devices before. I should have accumulated some experience, but I still forget a lot of details.

How many scsi hard disks are tested today? How to test, of course, hot swapping. This time, the hard disk is continuously hot-swapped on dell1750 to test whether there is a bad disk.

First of all, we need to know that 1750 and 1750 and above are different from each other. These old hard disks are inserted into the machine's empty slot. This time, 3rd slots are used, so the command, echo "scsi add-single-device 0 0 2 0">/proc/scsi, the start id is 0. Remember to use the root permission. The above parameter meaning, please refer to original: linux add scsi hard disk notes: http://hi.baidu.com/zheng918/blo... 06342262d09fe7.html

# Cat/proc/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: MAXTOR Model: ATLAS10K4_36SCA Rev: DFM0
Type: Direct-Access ansi scsi revision: 03
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: COMPAQ Model: bd04255a24 Rev: HPB6
Type: Direct-Access ansi scsi revision: 03
Host: scsi0 Channel: 00 Id: 06 Lun: 00
Vendor: PE/PV Model: 1x3 scsi bp Rev: 1.1
Type: Processor ansi scsi revision: 02
Host: scsi0 Channel: 00 Id: 02 Lun: 00
Vendor: QUANTUM Model: ATLAS10K3_73_SCA Rev: 120G
Type: Direct-Access ansi scsi revision: 03

You can see the hard disk with id 2 added, and then use fdisk-l to see the hard disk. If you see the 73G hard drive added, you will know that this disk is not broken. And how to partition and format it.

Fdisk-l
Disk/dev/sdc: 73.4 GB, 73407820800 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065*512 = 8225280 bytes

Device Boot Start End Blocks Id System
/Dev/sdc1 1 8924 71681998 + 83 Linux

If the test is successful, the device will be removed. The root permission is also required to delete the information that has just been echo to proc, echo "scsi remove-single-device 0 0 0 2 0">/proc/scsi, remember that the ID number is the same as the previous one, and then unplug the hard disk.

This is a very simple action. It is very useful for cainiao to skip it.

From: http://hi.baidu.com/zheng918

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.