Instructions for hot-swappable hard drives under Linux

Source: Internet
Author: User

Sometimes we need to add hot-swappable SCSI hard drives to the online system, we cannot stop at this time, we can add the new hard disk to the system with the following instructions

# echo "scsi add-single-device 0 0 1 0" >/PROC/SCSI/SCSI//Add HDD
# echo "scsi remove-single-device 0 0 1 0" >/proc/scsi/scsi//delete HDD

For the four numbers in the directive, the SCSI, channel, ID, and LUN numbers, respectively
We can view this information for SCSI drives in the system by following the instructions below

# MORE/PROC/SCSI/SCSI
Attached devices:
Host:scsi0 channel:00 id:00 lun:00//four digits meaning
Vendor:seagate MODEL:ST373405LC rev:0003
Type:direct-access ANSI SCSI revision:03
Host:scsi0 channel:00 id:06 lun:00
Vendor:super model:gem318 rev:0
Type:processor

For servers that support hot-swappable SCSI technology, SCSI hard drives and tape drives can be added and removed online under Linux in the following ways:
To add a hard disk or a tape drive:

The first step: the new hard disk or tape drive to do physical connection;
Step two: Run the command as root in the Linux system:
echo "scsi add-single-device x y z u" ">/proc/scsi/scsi


which

X is the SCSI controller number where the hard disk or tape drive resides;
Y is the number of the SCSI channel where the hard disk or tape drive resides;
Z is the SCSI ID number of the hard disk or tape drive;
U is the LUN number of the hard disk or tape drive is 0 by default
If the x y z parameter is incorrect, the system is unable to identify the added hard disk and the tape drive can be verified by the CAT/PROC/SCSI/SCSI command to add success.
This command will return the details of all SCSI devices identified in the system, error maker, model capacity, type of media access, etc.
To remove a hard disk or a tape drive:
First step: Run the command as root in the Linux system:

echo "scsi remove-single-device x y z u" >/proc/scsi/scsi

The definition of x y z u ibid.
Step three: Physically disconnect the hard disk or the tape drive.

Instructions for hot-swappable hard drives under Linux

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.