View raid information and disk information in CentOS

Source: Internet
Author: User

View raid information and disk information in CentOS
Sometimes you want to know how many disks are on the server. If raid is not performed, you can simply use fdisk-l to see it.
But after raid, we can't see it. So how can I check whether raid is performed on the server?

Software raid: can only be viewed in Linux
 
Cat/proc/mdstat
 
The raid level and status are displayed.
 
Hardware raid: the best solution is to use the installed raid vendor's management tools to check whether there is a broken line or a graphical interface. For example, the Adaptec hardware card can be viewed through the following command:
 
#/Usr/dpt/raidutil-L all
 
The detailed information is displayed.
 
Of course, in more cases, there is no corresponding management tool installed. If you only need to rely on Linux itself, I generally know two methods:
 
# Dmesg | grep-I raid
 
# Cat/proc/scsi
 
The displayed information is similar to the raid manufacturer, model, and level. However, you cannot view the information of each hard disk.

The following information is used as a case. The command is
# Fdisk-l
Disk/dev/sda: 145.9 GB, 145999527936 bytes
255 heads, 63 sectors/track, 17750 cylinders
Units = cylinders of 16065*512 = 8225280 bytes

Device BootStartEndBlocksIdSystem
/Dev/sda1*11310439183 Linux
/Dev/sda21417750142472452 + 8 eLinux LVM


# Cat/proc/scsi

Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: SEAGATEModel: ST3146356SSRev: HS09
Type: Direct-AccessANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: SEAGATEModel: ST3146356SSRev: HS09
Type: Direct-AccessANSI SCSI revision: 05
Host: scsi0 Channel: 01 Id: 00 Lun: 00
Vendor: DellModel: VIRTUAL DISKRev: 1028
Type: Direct-AccessANSI SCSI revision: 05

The above information shows that the server has two disks. The brand is Seagate and the disk code is ST3146356SS. If you are familiar with the detailed disk code naming rules, you can easily determine that the disk size is 146 GB. Based on the results obtained by fdisk, we can determine that the server is raid1 made of two 146gb hard disks.

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.