Linux self-command to view the basic RAID information tutorial in the system

Source: Internet
Author: User
Tags dmesg

Now many servers are equipped with raid, general software RAID or motherboard comes with raid is not software-assisted, you can understand the basic RAID through the system commands, of course, the best use of hardware RAID cards, usually with the hard drive status details.

This article mainly introduces the use of Linux with the command to view the basic RAID information system, under a stand-alone server for software RAID. Of course, if the VPS is used, the array information is generally not visible.

First, basic RAID information

Cat/proc/mdstat

You can see the basic RAID level, as well as the sync information, as shown in RAID1 two hard drives are synchronizing ing.

Second, the hard disk interface situation

Cat/proc/scsi/scsi

You can see that there are 2 hard drives.

Third, RAID interface information

DMESG |grep-i raid

Add:

View RAID information and disk information under Linux system

Software RAID: can only be viewed through the Linux system itself
 
Cat/proc/mdstat
 
You can see information such as RAID levels, status, and so on.
 
Hardware RAID: The best way to see it is through the management tools of an installed RAID manufacturer, with CmdLine and a graphical interface. For example, the Adaptec company's hardware card can be viewed through the following commands:
 
#/usr/dpt/raidutil-l All
 
You can see very detailed information.
 
Of course more cases are not installed with the appropriate management tools, only to rely on Linux itself generally I know two ways:
 
# DMESG |grep-i raid
 
# CAT/PROC/SCSI/SCSI
 
The information displayed is similar to that of the raid manufacturer, model, and level, but it is not possible to view the information on each piece of hard disk.

The following information as a case, the command is
# fdisk-l
disk/dev/sda:145.9 GB, 145999527936 bytes
255 heads, Sectors/track, 17750 cylinders
Units = Cylinders of 16065 * 8225280 bytes

Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 104391 Linux
/dev/sda2 17750 142472452+ 8e Linux LVM


# CAT/PROC/SCSI/SCSI

Attached devices:
Host:scsi0 channel:00 id:00 lun:00
  vendor:seagate  model:  st3146356ss& nbsp;     rev:hs09
  type:   direct-access                     ANSI SCSI revision:05
Host:scsi0 channel:00 id:01 lun:00
  vendor:seagate  model:st3146356ss      R EV:HS09
  type:   direct-access                     ANSI SCSI revision:05
host:scsi0 channel:01 id:00 lun:00   vendor:dell     model:virtual disk     rev:1028
  Type:& nbsp;  direct-access                     ANSI SCSI revision:05

You can see from the above information that the server has two disks. Brand is Seagate, disk code for ST3146356SS, if you are familiar with the details of the disk code naming rules, you will easily determine the size of the disk 146G. According to the results of Fdisk can be judged, the server is to take two pieces of 146G hard disk to do RAID1.

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.