HP ssacli tool use

Under the linux system, the disk is replaced, but for the HP array card, the common MegaCli, storcli and percli can not get the disk information. At this time, the special tool ssacli is needed.
rpm package download address: https://downloads.linux.hpe.com/SDR/repo/mcp/centos/7/x86_64/current/

View raid card information (including controller status, Cache status, battery status)

# ssacli ctrl all show status

View raid details

# ssacli ctrl slot=0 show config detail

View raid status

# ssacli ctrl slot=0 ld all show

View all logical drive information of slot 0 array A

# ssacli ctrl slot=0 array A ld all show

View all physical drive information of slot 0 array A

# ssacli ctrl slot=0 array A pd all show

View hard disk

#ssacli ctrl slot=0 pd all show status / / view the physical hard disk status
 #ssacli ctrl slot=0 pd all show / / view the physical hard disk

Create raid10

# ssacli ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4,2I:1:5,2I:1:6 raid=1+0

Create a raid5 array with disks 3, 4 and 5

# ssacli ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4,2I:1:5 raid=5

Create raid1

# ssacli ctrl slot=1 create type=ld drives=1I:1:1-1I:1:2 raid=1

Delete raid

# ssacli ctrl slot=1 array B delete forced

Cache:

To view cache information:

# ssacli ctrl all show config detail | grep -i cache

Turn off physical disk cache

# ssacli ctrl slot=0 modify drivewritecache=disable

Open Logical Disk Cache

# ssacli ctrl slot=0 logicaldrive 2 modify caching=enable

Enable raid write cache without battery

# ssacli ctrl slot=0 modify nobatterywritecache=enable

Set read / write percentage

# ssacli ctrl slot=0 modify cacheratio=10/90

indicator light:

Turn on the led light of array B disk

# ssacli ctrl slot=0 array B modify led=on

Turn on the led light of disk 3

# ssacli ctrl slot=0 pd 1I:1:3 modify led=on

Practical exercises:

Node disk information lsblk:

NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda            8:0    0 279.4G  0 disk 
├─sda1         8:1    0    24M  0 part 
├─sda2         8:2    0   200M  0 part 
├─sda3         8:3    0   250M  0 part /boot
└─sda4         8:4    0 278.8G  0 part 
  ├─os-root  253:0    0 274.7G  0 lvm  /
  └─os-swap  253:1    0     4G  0 lvm  [SWAP]
sdb            8:16   0   1.7T  0 disk 
└─sdb1         8:17   0   1.7T  0 part /var/lib/ceph/osd/ceph-4
sdc            8:32   0   1.7T  0 disk 
└─sdc1         8:33   0   1.7T  0 part /var/lib/ceph/osd/ceph-80
sdd            8:48   0   1.7T  0 disk 
└─sdd1         8:49   0   1.7T  0 part /var/lib/ceph/osd/ceph-67
sde            8:64   0   1.7T  0 disk 
└─sde1         8:65   0   1.7T  0 part /var/lib/ceph/osd/ceph-9
sdf            8:80   0   1.7T  0 disk 
└─sdf1         8:81   0   1.7T  0 part /var/lib/ceph/osd/ceph-22
sdg            8:96   0   1.7T  0 disk 
└─sdg1         8:97   0   1.7T  0 part /var/lib/ceph/osd/ceph-30
sdh            8:112  0   1.7T  0 disk 
└─sdh1         8:113  0   1.7T  0 part /var/lib/ceph/osd/ceph-47
sdi            8:128  0   1.7T  0 disk 
└─sdi1         8:129  0   1.7T  0 part /var/lib/ceph/osd/ceph-24
sdj            8:144  0   1.7T  0 disk 
└─sdj1         8:145  0   1.7T  0 part /var/lib/ceph/osd/ceph-56
sdk            8:160  0   1.7T  0 disk 
└─sdk1         8:161  0   1.7T  0 part /var/lib/ceph/osd/ceph-39
sdl            8:176  0   1.7T  0 disk 
└─sdl1         8:177  0   1.7T  0 part /var/lib/ceph/osd/ceph-86
sdm            8:192  0   1.7T  0 disk 
└─sdm1         8:193  0   1.7T  0 part /var/lib/ceph/osd/ceph-72
nvme0n1      259:0    0   1.5T  0 disk 
├─nvme0n1p1  259:1    0    20G  0 part 
├─nvme0n1p2  259:2    0    20G  0 part 
├─nvme0n1p3  259:3    0    20G  0 part 
├─nvme0n1p4  259:4    0    20G  0 part 
├─nvme0n1p5  259:5    0    20G  0 part 
├─nvme0n1p6  259:6    0    20G  0 part 
├─nvme0n1p7  259:7    0    20G  0 part 
├─nvme0n1p8  259:8    0    20G  0 part 
├─nvme0n1p9  259:9    0    20G  0 part 
├─nvme0n1p10 259:10   0    20G  0 part 
├─nvme0n1p11 259:11   0    20G  0 part 
└─nvme0n1p12 259:12   0    20G  0 part 

View all logical drive information of slot 0 array A

[root@node-9 ~]#  ssacli ctrl slot=0 array A ld all show

Smart Array P840ar in Slot 0 (Embedded)

   Array A

      logicaldrive 1 (279.37 GB, RAID 1, OK)

[root@node-9 ~]# 

[root@node-9 ~]#  ssacli ctrl slot=0 array M ld all show

Smart Array P840ar in Slot 0 (Embedded)

   Array M

      logicaldrive 13 (1.64 TB, RAID 0, OK)

View all physical information of slot 0 array A

[root@node-9 ~]#  ssacli ctrl slot=0 array M pd all show

Smart Array P840ar in Slot 0 (Embedded)

   Array M

      physicaldrive 2I:2:6 (port 2I:box 2:bay 6, SAS HDD, 1.8 TB, OK)

To view all physical hard disk information:

[root@node-9 ~]# ssacli ctrl slot=0 pd all show status

   physicaldrive 1I:3:1 (port 1I:box 3:bay 1, 300 GB): OK
   physicaldrive 1I:3:2 (port 1I:box 3:bay 2, 300 GB): OK
   physicaldrive 1I:3:3 (port 1I:box 3:bay 3, 1.8 TB): OK
   physicaldrive 1I:3:4 (port 1I:box 3:bay 4, 1.8 TB): OK
   physicaldrive 1I:3:5 (port 1I:box 3:bay 5, 1.8 TB): OK
   physicaldrive 1I:3:6 (port 1I:box 3:bay 6, 1.8 TB): OK
   physicaldrive 1I:3:7 (port 1I:box 3:bay 7, 1.8 TB): OK
   physicaldrive 1I:3:8 (port 1I:box 3:bay 8, 1.8 TB): OK
   physicaldrive 2I:2:1 (port 2I:box 2:bay 1, 1.8 TB): OK
   physicaldrive 2I:2:2 (port 2I:box 2:bay 2, 1.8 TB): OK
   physicaldrive 2I:2:3 (port 2I:box 2:bay 3, 1.8 TB): OK
   physicaldrive 2I:2:4 (port 2I:box 2:bay 4, 1.8 TB): OK
   physicaldrive 2I:2:5 (port 2I:box 2:bay 5, 1.8 TB): OK
   physicaldrive 2I:2:6 (port 2I:box 2:bay 6, 1.8 TB): OK

To view all logical hard disk information:

[root@node-9 ~]#  ssacli ctrl slot=0 ld all show

Smart Array P840ar in Slot 0 (Embedded)

   Array A

      logicaldrive 1 (279.37 GB, RAID 1, OK)

   Array B

      logicaldrive 2 (1.64 TB, RAID 0, OK)

   Array C

      logicaldrive 3 (1.64 TB, RAID 0, OK)

   Array D

      logicaldrive 4 (1.64 TB, RAID 0, OK)

   Array E

      logicaldrive 5 (1.64 TB, RAID 0, OK)

   Array F

      logicaldrive 6 (1.64 TB, RAID 0, OK)

   Array G

      logicaldrive 7 (1.64 TB, RAID 0, OK)

   Array H

      logicaldrive 8 (1.64 TB, RAID 0, OK)

   Array I

      logicaldrive 9 (1.64 TB, RAID 0, OK)

   Array J

      logicaldrive 10 (1.64 TB, RAID 0, OK)

   Array K

      logicaldrive 11 (1.64 TB, RAID 0, OK)

   Array L

      logicaldrive 12 (1.64 TB, RAID 0, OK)

   Array M

      logicaldrive 13 (1.64 TB, RAID 0, OK)

[root@node-9 ~]# 

To view all physical hard disk information + Array logical information:

[root@node-9 ~]# ssacli ctrl slot=0 pd all show 

Smart Array P840ar in Slot 0 (Embedded)

   Array A

      physicaldrive 1I:3:1 (port 1I:box 3:bay 1, SAS HDD, 300 GB, OK)
      physicaldrive 1I:3:2 (port 1I:box 3:bay 2, SAS HDD, 300 GB, OK)

   Array B

      physicaldrive 1I:3:3 (port 1I:box 3:bay 3, SAS HDD, 1.8 TB, OK)

   Array C

      physicaldrive 1I:3:4 (port 1I:box 3:bay 4, SAS HDD, 1.8 TB, OK)

   Array D

      physicaldrive 1I:3:5 (port 1I:box 3:bay 5, SAS HDD, 1.8 TB, OK)

   Array E

      physicaldrive 1I:3:6 (port 1I:box 3:bay 6, SAS HDD, 1.8 TB, OK)

   Array F

      physicaldrive 1I:3:7 (port 1I:box 3:bay 7, SAS HDD, 1.8 TB, OK)

   Array G

      physicaldrive 1I:3:8 (port 1I:box 3:bay 8, SAS HDD, 1.8 TB, OK)

   Array H

      physicaldrive 2I:2:1 (port 2I:box 2:bay 1, SAS HDD, 1.8 TB, OK)

   Array I

      physicaldrive 2I:2:2 (port 2I:box 2:bay 2, SAS HDD, 1.8 TB, OK)

   Array J

      physicaldrive 2I:2:3 (port 2I:box 2:bay 3, SAS HDD, 1.8 TB, OK)

   Array K

      physicaldrive 2I:2:4 (port 2I:box 2:bay 4, SAS HDD, 1.8 TB, OK)

   Array L

      physicaldrive 2I:2:5 (port 2I:box 2:bay 5, SAS HDD, 1.8 TB, OK)

   Array M

      physicaldrive 2I:2:6 (port 2I:box 2:bay 6, SAS HDD, 1.8 TB, OK)

[root@node-9 ~]# 

Locate the physical disk, logical disk, and drive letter relationship:
The disk position can be accurately determined by lighting.

[root@node-9 ~]# ssacli ctrl slot=0 show config detail | grep -E "Array|Disk Name|physicaldrive|Size" | grep -vE "Strip|Logical"
Smart Array P840ar in Slot 0 (Embedded)
   Total Cache Size: 2.0
      physicaldrive 1I:3:5 (port 1I:box 3:bay 5, SAS HDD, 1.8 TB, OK)
      physicaldrive 1I:3:6 (port 1I:box 3:bay 6, SAS HDD, 1.8 TB, OK)
      physicaldrive 1I:3:7 (port 1I:box 3:bay 7, SAS HDD, 1.8 TB, OK)
      physicaldrive 1I:3:8 (port 1I:box 3:bay 8, SAS HDD, 1.8 TB, OK)
      physicaldrive 1I:3:4 (port 1I:box 3:bay 4, SAS HDD, 1.8 TB, OK)
      physicaldrive 1I:3:3 (port 1I:box 3:bay 3, SAS HDD, 1.8 TB, OK)
      physicaldrive 1I:3:2 (port 1I:box 3:bay 2, SAS HDD, 300 GB, OK)
      physicaldrive 1I:3:1 (port 1I:box 3:bay 1, SAS HDD, 300 GB, OK)
      physicaldrive 2I:2:5 (port 2I:box 2:bay 5, SAS HDD, 1.8 TB, OK)
      physicaldrive 2I:2:6 (port 2I:box 2:bay 6, SAS HDD, 1.8 TB, OK)
      physicaldrive 2I:2:4 (port 2I:box 2:bay 4, SAS HDD, 1.8 TB, OK)
      physicaldrive 2I:2:3 (port 2I:box 2:bay 3, SAS HDD, 1.8 TB, OK)
      physicaldrive 2I:2:2 (port 2I:box 2:bay 2, SAS HDD, 1.8 TB, OK)
      physicaldrive 2I:2:1 (port 2I:box 2:bay 1, SAS HDD, 1.8 TB, OK)
   Array: A
      Array Type: Data 
         Size: 279.37 GB
         Disk Name: /dev/sda 
            physicaldrive 1I:3:2 (port 1I:box 3:bay 2, SAS HDD, 300 GB, OK)
            physicaldrive 1I:3:1 (port 1I:box 3:bay 1, SAS HDD, 300 GB, OK)
      physicaldrive 1I:3:1
         Size: 300 GB
      physicaldrive 1I:3:2
         Size: 300 GB
   Array: B
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdb 
      physicaldrive 1I:3:3
         Size: 1.8 TB
   Array: C
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdc 
      physicaldrive 1I:3:4
         Size: 1.8 TB
   Array: D
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdd 
      physicaldrive 1I:3:5
         Size: 1.8 TB
   Array: E
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sde 
      physicaldrive 1I:3:6
         Size: 1.8 TB
   Array: F
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdf 
      physicaldrive 1I:3:7
         Size: 1.8 TB
   Array: G
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdg 
      physicaldrive 1I:3:8
         Size: 1.8 TB
   Array: H
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdh 
      physicaldrive 2I:2:1
         Size: 1.8 TB
   Array: I
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdi 
      physicaldrive 2I:2:2
         Size: 1.8 TB
   Array: J
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdj 
      physicaldrive 2I:2:3
         Size: 1.8 TB
   Array: K
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdk 
      physicaldrive 2I:2:4
         Size: 1.8 TB
   Array: L
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdl 
      physicaldrive 2I:2:5
         Size: 1.8 TB
   Array: M
      Array Type: Data 
         Size: 1.64 TB
         Disk Name: /dev/sdm 
      physicaldrive 2I:2:6
         Size: 1.8 TB
[root@node-9 ~]# 

Keywords: Operation & Maintenance Ceph osd Linux SDK

Added by flumpy on Tue, 26 May 2020 19:04:53 +0300