Linux, add and remove SCSI hard-line

2010-11-21  来源:本站原创  分类:OS  人气:84 

<! - @ Page {margin: 2cm} P {margin-bottom: 0.21cm} A: link {color: # 0000ff} ->

In the server machine in case of non-stop to the server, add a SCSI hard drive, the system recognizes the new hard drive inserted, concrete steps are as follows:

The first step: the new hard disk into the machine;

Step two: run command as root:

echo "scsi add-single-device xyzu"> / proc / scsi / scsi

Of which:

x is the drive where the SCSI controller number (usually the machine on a SCSI controller, so that is 0);

y is the drive where the SCSI channel number (usually 0 is the single-channel, multi-channel depends on which channel a);

z is the hard drive SCSI ID number (which can be inserted through the concrete to determine the hard disk slot);

u is the hard disk lun number (default is 0)

Since I am into the third hard drive, so I run the command:

echo "scsi add-single-device 0 0 2 0"> / proc / scsi / scsi

If the xyz parameter is incorrect, the system can not recognize the added hard drive, you can view / proc / scsi / scsi file contents to determine whether the added successfully. Add good that this file will be more than one device. This file contains all system SCSI devices to identify detailed information, including manufacturer, model, media access types.

I run the above command to view the file / proc / scsi / scsi, found more than one device (the last one):

Attached devices:

Host: scsi0 Channel: 00 Id: 00 Lun: 00

Vendor: MAXTOR Model: ATLASU320_18_SCA Rev: B120

Type: Direct-Access ANSI SCSI revision: 03

Host: scsi0 Channel: 00 Id: 01 Lun: 00

Vendor: IBM Model: IC35L036UCDY10-0 Rev: S28F

Type: Direct-Access ANSI SCSI revision: 03

Host: scsi0 Channel: 00 Id: 06 Lun: 00

Vendor: ESG-SHV Model: SCA HSBP M17 Rev: 1.15

Type: Processor ANSI SCSI revision: 02

Host: scsi0 Channel: 00 Id: 02 Lun: 00

Vendor: IBM Model: IC35L146UCDY10-0 Rev: S26B

Type: Direct-Access ANSI SCSI revision: 03

Then look at / proc / partition file and found out the hard drive has been identified! Then you can partition, format, use, and the use of parted partitioning tool does not require rebooting the system, so the whole process is to add hard drive without rebooting of.

If you want to remove the hard drive, you can do:

The first step: run the command as root:

echo "scsi remove-single-device xyzu"> / proc / scsi / scsi

xyzu defined above

The second step: physically disconnecting the drive connection.

相关文章
  • Linux, add and remove SCSI hard disk online 2010-11-21

    <! - @ Page {margin: 2cm} P {margin-bottom: 0.21cm} A: link {color: # 0000ff} -> In the server case of non-stop to the server, add a SCSI hard disk, allow the system to recognize the newly inserted hard disk, follow these steps: The first step: the

  • Linux, add and remove SCSI hard-line 2010-11-21

    <! - @ Page {margin: 2cm} P {margin-bottom: 0.21cm} A: link {color: # 0000ff} -> In the server machine in case of non-stop to the server, add a SCSI hard drive, the system recognizes the new hard drive inserted, concrete steps are as follows: The fi

  • Linux add / remove users and user groups 2010-04-28

    Linux add / remove users and user groups 1, build the user: adduser phpq / / New phpq Users passwd phpq / / user password to phpq 2, the construction of the Working Group groupadd test / / New test of the Working Group 3, new users and increase the w

  • linux add user sudo privileges 2010-10-19

    linux add user sudo privileges: Sometimes, linux sudo to run the following command, will prompt similar to: quietheart is not in the sudoers file. This incident will be reported. Here, quietheart is the user name, and then fail to execute the sudo co

  • linux add route under way and the arguments detailed 2010-04-01

    linux add route under way: A: Use the route Command Add Using the route command to add the route, the machine reboot or after restarting the routing on the network card failure, and methods: / / Add the route to the host # Route add-host 192.168.168.

  • SQL statement with the Add or Remove to modify the field and some of the basic operation of the table with the field 2010-12-04

    SQL statement with the Add or Remove to modify the field 1. Increase the field alter table docdsp add dspcode char(200) 2. Delete field ALTER TABLE table_NAME DROP COLUMN column_NAME 3. Modify the field type ALTER TABLE table_name ALTER COLUMN column

  • asp.net in server-side controls dynamically add and remove 2010-12-31

    asp.net in server-side controls dynamically add and remove PlaceHolder: control container itself does not appear, mainly used to put the server control to show only its child elements (which he controls) Server controls dynamically add and remove <A>

  • I used the Linux command rm - remove files or directories, careful system destruction 2011-04-01

    I used the Linux command rm - remove files or directories This link: http://codingstandards.iteye.com/blog/983531 (reproduced please indicate the source) Use Description The rm command is commonly used commands to delete a file or directory (remove f

  • Flex in the container dynamically add and remove sub-components 2010-03-22

    Problem Program at run time needed to add and remove from the container sub-components instead of using the Repeater or DataProvide control. Solution Or use the addChild method to add sub-components addChildAt, empathy, or use removeChildAt removeAll

  • oracle java split function to achieve a similar function, and remove the blank line 2010-03-28

    Code is the Internet is, in this basis, modified to remove the blank lines to achieve Features: cutting with the specified input string delimiters, return to one-dimensional array, each array element is a sub-string. Source: CREATE OR REPLACE TYPE ty

  • Remove spaces and line breaks in the string 2010-05-11

    1. Remove spaces and line breaks before and after the string: To the left spaces replace (/ (^ \ s *) / g, ""), to the right spaces replace (/ (\ s * $) / g, ""). string questionName = " a b c "; questionName = questionName.r

  • JS array array array methods on add and remove elements 2010-08-31

    js add and remove array elements have been relatively confused, today finally found detailed information, and would let one I tested the code ^ - ^ var arr = new Array (); arr [0] = "aaa"; arr [1] = "bbb"; arr [2] = "ccc"; /

  • In a container dynamically add and remove sub-objects 2010-11-04

    In a container dynamically add and remove sub-objects Dynamically Add and Remove Children from a Container Problem Repeater is not in use or under the control DataProvider, but also a container at run time to add and remove child objects. Solutions O

  • javascript eval function implementation using regular expressions to remove carriage returns, line feeds and comments 2010-12-24

    var txtValue = document.getElementById (txtId). value; txtValue = txtValue.replace (/ \ / \ * ((\ n | \ r |.)*?) \ * \ / / mg, ""); / / remove multi-line comments /*..*/ txtValue = txtValue.replace (/ (\ s +) \ / \ /(.*) \ n / g ,"");

  • Flex DataGrid rows to remove the last line of no data 2010-12-29

    Remove the last line of empty rows DataGrid. . <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Model> <datas> <book&

  • In the Solaris system with zones installed, add and remove software packages 2011-02-11

    Chapter 26 in the Solaris system with zones installed, add and remove packages and patches (task) Solaris 10 1 / 06: In this release, this chapter has been completely revised. This chapter describes the installation of a non-global zones on the lates

  • oracle time to add or remove partition table partition storage partitioning process of additions and deletions partition table, including pl / sql 2010-09-21

    oracle time to add or remove partition table partition storage partitioning process of additions and deletions partition table, including pl / sql The time is the time to create the partition as the partition table field, the field type is timestamp

  • Linux add / remove users and groups 2011-06-16

    1, build the user: adduser phpq // New phpQ user passwd phpq // Set a password to the phpQ user 2, the construction of the Working Group groupadd test // New test team 3, the new users while increasing the working group useradd -g test phpq // New ph

  • To add or remove services linux boot process 2010-12-06

    In the Linux system, a Services, start, stop and restart usually through / etc / init.d directory script to control. However, start or change the run level, is in the / etc / rcX.d to search for in the script. Where X is the runlevel number. This art

  • For the linux boot process to add or remove services 2010-12-06

    In the Linux system, a Services, start, stop and restart usually is / etc / init.d directory script to control. However, start or change run levels, in the / etc / rcX.d to search for in the script. Where X is the runlevel number. This article will e