欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

linux查看raid信息 博客分类: linux运维 linux RAID 

程序员文章站 2024-03-14 23:31:35
...
有时我们需要看一下服务器的raid信息.
1.软件raid的话可以通过 cat /proc/mdstat
  md1 : active raid1 sdb3[1] sda3[0]
      480572352 blocks [2/2] [UU]
     
  md3 : active raid1 sdb2[1] sda2[0]
      1952704 blocks [2/2] [UU]
     
  md2 : active raid1 sda1[0] sdb1[1]
      194496 blocks [2/2] [UU]

  我的是做了软raid1(sda,sdb两块硬盘).软raid会将设备标记为mdN(硬件raid不会,硬件raid对外表现就像没做raid一样)

2.也可以通过dmesg,比如我的dmesg | grep -i raid
[    1.020628] md: raid0 personality registered for level 0
[    1.024236] md: raid1 personality registered for level 1
[    1.196998] raid6: int64x1   2119 MB/s
[    1.366685] raid6: int64x2   2724 MB/s
[    1.536404] raid6: int64x4   1841 MB/s
[    1.706119] raid6: int64x8   1770 MB/s
[    1.875805] raid6: sse2x1    5876 MB/s
[    2.045514] raid6: sse2x2    6967 MB/s
[    2.215220] raid6: sse2x4    7653 MB/s
[    2.215221] raid6: using algorithm sse2x4 (7653 MB/s)
[    2.221300] raid1: raid set md3 active with 2 out of 2 mirrors
[    2.223621] raid1: raid set md2 active with 2 out of 2 mirrors
[    2.226764] raid1: raid set md1 active with 2 out of 2 mirrors
[    2.268897] md: raid6 personality registered for level 6
[    2.268899] md: raid5 personality registered for level 5
[    2.268901] md: raid4 personality registered for level 4
[    2.273807] md: raid10 personality registered for level 10

看raid1的那三行.


我的dell服务器的硬件raid利用dmesg | grep -i raid结果如下
[    4.051200] megaraid_sas 0000:03:00.0: PCI INT A -> GSI 38 (level, low) -> IRQ 38
[    4.051306] megaraid_sas 0000:03:00.0: setting latency timer to 64
[    4.169477] scsi4 : LSI SAS based MegaRAID driver.




相关标签: linux RAID