Sometimes you want to know that there are a few disks on the server, if you do not do raid, you can simply use the fdisk-l can be seen.
But I did raid, so I couldn't see it. So how do I check the raid on the server?
Software RAID: can only be viewed by the Linux system itself
Cat/proc/mdstat
You can see information such as RAID level, status, and so on.
Hardware RAID: The best way to do this is through the management tools of the installed RAID vendors, with CmdLine and graphical interfaces. such as the Adaptec company's hardware card can be viewed by the following command:
#/usr/dpt/raidutil-l All
You can see very detailed information.
Of course, more often than not install the appropriate management tools, only rely on the Linux itself, generally I know two ways:
# DMESG |grep-i raid
# CAT/PROC/SCSI/SCSI
The information displayed is similar to the raid manufacturer, model, level, but cannot view each block of hard disk information.
The following information is used as a case, and the command
# 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 rev:hs09
Type:direct-access ANSI SCSI revision:05
Host:scsi0 channel:00 id:01 lun:00
Vendor:seagate MODEL:ST3146356SS rev:hs09
Type:direct-access ANSI SCSI revision:05
Host:scsi0 channel:01 id:00 lun:00
Vendor:dell model:virtual DISK rev:1028
Type:direct-access ANSI SCSI revision:05
As you can see from the above information, the server has two disks. Brand is Seagate, the disk code is ST3146356SS, if you are familiar with the detailed disk code naming rules, you will easily determine the size of the disk is 146G. According to the results of Fdisk can be determined that the server is to take two 146G hard disk RAID1.
How to determine if a disk is raid under Linux