Linux server does not shut down the new hard disk method

Source: Internet
Author: User
Tags disk usage

Method 1:

1. In the boot state, after inserting the disk, execute the command: echo "---" >/sys/class/scsi_host/host0/scan

2. See if the command for step 1 is valid and can be verified in/var/log/messages

3, execute fdisk-l command to see if you can see the new disk, if not see, you can change the above host0 to Host1 or host2, and so try again



Method 2:

1. Insert the disk, make the/PROC/SCSI directory, and then less./SCSI to see the current SCSI disk usage

    [email protected]:/proc/scsi# ls
device_info  scsi
[email protected]:/ proc/scsi# less SCSI
attached devices:
Host:scsi0 channel:00 id:00 lun:00
  vendor:ata     &N Bsp Model:kingston svp200s rev:501a
  Type:   direct-access               &N Bsp    ansi  scsi revision:05
host:scsi0 channel:00 id:01 lun:00
  vendor:ata     &N Bsp Model:toshiba dt01aca2 rev:mx4o
  Type:   direct-access               &N Bsp    ansi  scsi revision:05
host:scsi1 channel:00 id:00 lun:00
  vendor:ata     &N Bsp MODEL:WDC wd20eurs-63s rev:80.0
  Type:   direct-access               &N Bsp    ansi  SCSI revision:05
You can find 4 parameter usage of the disk, namely the primary adapter identity, the SCSI channel on the primary adapter, the SCSI ID of the device, and the LUN number of the device.

2. Add disk with command: echo "scsi add-single-device W x y z" >/proc/scsi/scsi

Specify the parameter values W, x, Y, and z as follows:
W is the host adapter ID, the first adapter is 0 (0)
X is the SCSI channel on the host adapter, the first channel is 0 (0)
Y is the SCSI identity of the device
Z is the LUN number, the first LUN is 0 (0)
Note: You can use this command to delete a disk: echo "scsi remove-single-device W x y z" >/proc/scsi/scsi

3. Partitioning and formatting disks using the FDISK-L command

Linux server does not shut down the new hard disk method

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.