Linux-related SCSI commands

Source: Internet
Author: User

Linux Related SCSI Command

As a result of storage capacity in the previous period, more storage operations, the following records the commonly used operations;

LSSCSI command: Display SCSI Device Information

#lsscsi

[0:0:0:2] Disk IBM 1726-4xx FAStT 0617/dev/sdb

[0:0:0:3] Disk IBM 1726-4xx FAStT 0617/DEV/SDC

[0:0:0:4] Disk IBM 1726-4xx FAStT 0617/DEV/SDD

[0:0:0:5] Disk IBM 1726-4xx FAStT 0617/dev/sde

Explanation: [H (HBA): C (Hba_channel): T (target): L (LUN ID)]

scsi_id command: Querying SCSI Device ID number;

#scsi_id –G–U–S/DEV/SDA

3600a0b80000b174b000000d63efc5c8c

Or

#/lib/udev/scsi_id--page=0x83--whitelisted--DEVICE=/DEV/SDA

3600a0b80000b174b000000d63efc5c8c

HBA wwwn:cat/sys/class/fc_host/host*/node_name

DISK wwwn:ls-l/dev/disk/by_id|grep-v part

Manually Delete path :

First Offlne

echo Offline >/sys/block/device-name/device/state

Then remove

Echo 1 >/sys/block/device-name/device/delete

Manually add path :

echo "c t L" >/sys/class/scsi_host/hostn/scan

echo "scsi Add-single-device 0 0 0 0" >/PROC/SCSI/SCSI

Linux-related SCSI commands

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.