I am interested in functionality similar to what is provided via kernel parameter
by the "libata" driver that allows a disk to be ignored with "libata.force=X:00:disable".
I currently have minor mods to the hpsa driver to accept a parameter and set the
"expose_device" field when in HBA mode. Unlike RAID mode with logical devices the
driver mostly stays out of the way in HBA mode so the effort seems minimal.
In general the physical disks are discovered on each "scan" but "hpsa" opts
out of motifying the upper level SCSI layer of the added device based on the
kernel parameter.
It seems to work just fine although the "hpssacli ctrl slot=0 pd all show detail"
still shows the physical disk as "Drive exposed to OS: True" which it is NOT.
Any interest into pushing this simple function into the baseline?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Found another bug with cciss_vol_status - if there is a "gap" in the list of reported physical drives (for example a drive that has gone offline), then "cciss_vol_status" seems to stop printing drives at that entry... You can see that if you enable the debugging printout at the end of "do_report_luns()" and then compare the number of printed drives in "check_ctlr_physical_drives()" - it stops at the first "gap" due to the call to "bmic_next_phy_disk()" failing. Ah well, I'll see if I can fix that one too.
0: 9f4d20000000000000000dc8020000000000000000801001
0: 5000cca2912c922d02060001050005000000000000801101
0: 5000cca2912da58102060001070007000000000000801201
0: 5000cca2912e1cf902060001090009000000000000801301
...
Physical drives: 111
connector 1E box 1 bay 1 HP MB012000JWDFD 5PGTHWHC HPD2 OK
connector 1E box 1 bay 2 HP MB012000JWDFD 5PGU36XF HPD2 OK
connector 1E box 1 bay 3 HP MB012000JWDFD 5PGUB5KE HPD2 OK
connector 1E box 1 bay 4 HP MB012000JWDFD 8CKYKB3E HPD2 OK
connector 1E box 1 bay 5 HP MB012000JWDFD 5PGU42DC HPD2 OK
...
connector 2E box 2 bay 4 HP MB012000JWDFD 5PGU1X5C HPD2 OK
connector 2E box 2 bay 5 HP MB012000JWDFD 5PGU4V5C HPD2 OK
connector 2E box 2 bay 6 HP MB012000JWDFD 5PGTHLRC HPD2 OK
connector 2E box 2 bay 7 HP MB012000JWDFD 5PGU1WHC HPD2 OK
/dev/ciss0: (Smart HBA H241) Enclosure D6020 (S/N: 7CE952P06X) on Bus 2, Physical Port 1E status: OK.
/dev/ciss0: (Smart HBA H241) Enclosure D6020 (S/N: 7CE952P06X) on Bus 3, Physical Port 2E status: OK.
/dev/ciss0: (Smart HBA H241) Enclosure D6020 (S/N: 7CE952P09P) on Bus 4, Physical Port 1E status: OK.
/dev/ciss0: (Smart HBA H241) Enclosure D6020 (S/N: 7CE952P09P) on Bus 5, Physical Port 2E status: OK.
/dev/ciss0(Smart HBA H241:0): Non-Volatile Cache status:
Cache configured: No
It should have printed a lot more drives - up to box2 bay 35. This is two D6020 disk enclosures with 70 12TB SAS drives each and the drive in bay 8 is probably having problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am interested in functionality similar to what is provided via kernel parameter
by the "libata" driver that allows a disk to be ignored with "libata.force=X:00:disable".
I currently have minor mods to the hpsa driver to accept a parameter and set the
"expose_device" field when in HBA mode. Unlike RAID mode with logical devices the
driver mostly stays out of the way in HBA mode so the effort seems minimal.
In general the physical disks are discovered on each "scan" but "hpsa" opts
out of motifying the upper level SCSI layer of the added device based on the
kernel parameter.
It seems to work just fine although the "hpssacli ctrl slot=0 pd all show detail"
still shows the physical disk as "Drive exposed to OS: True" which it is NOT.
Any interest into pushing this simple function into the baseline?
While hpsa is currently in sustaining mode (bug fixes only) please feel free to send us your patch and we will take a look.
Thanks,
Scott
esc.storagedev@microsemi.com
I've attached a patch to version 3.4.14-115. It supports a kernel parameter, "hpsa.ignore=1,2" for example, to ignore the drives in bays 1 and 2.
Please find enclosed a patch for cciss_vol_status.c v1.12 that fixes a couple of bugs:
Last edit: Peter Eriksson 2020-05-10
Found another bug with cciss_vol_status - if there is a "gap" in the list of reported physical drives (for example a drive that has gone offline), then "cciss_vol_status" seems to stop printing drives at that entry... You can see that if you enable the debugging printout at the end of "do_report_luns()" and then compare the number of printed drives in "check_ctlr_physical_drives()" - it stops at the first "gap" due to the call to "bmic_next_phy_disk()" failing. Ah well, I'll see if I can fix that one too.
An example:
./cciss_vol_status -V /dev/ciss*
Controller: Smart HBA H241
Board ID: 0x21c8103c
Logical drives: 0
Running firmware: 5.04
ROM firmware: 5.04
Report logical luns ()
bytecount = 0, lun count = 0
Report physical luns ((extended))
bytecount = 3528, lun count = 147
0: 9f4d20000000000000000dc8020000000000000000801001
0: 5000cca2912c922d02060001050005000000000000801101
0: 5000cca2912da58102060001070007000000000000801201
0: 5000cca2912e1cf902060001090009000000000000801301
...
Physical drives: 111
connector 1E box 1 bay 1 HP MB012000JWDFD 5PGTHWHC HPD2 OK
connector 1E box 1 bay 2 HP MB012000JWDFD 5PGU36XF HPD2 OK
connector 1E box 1 bay 3 HP MB012000JWDFD 5PGUB5KE HPD2 OK
connector 1E box 1 bay 4 HP MB012000JWDFD 8CKYKB3E HPD2 OK
connector 1E box 1 bay 5 HP MB012000JWDFD 5PGU42DC HPD2 OK
...
connector 2E box 2 bay 4 HP MB012000JWDFD 5PGU1X5C HPD2 OK
connector 2E box 2 bay 5 HP MB012000JWDFD 5PGU4V5C HPD2 OK
connector 2E box 2 bay 6 HP MB012000JWDFD 5PGTHLRC HPD2 OK
connector 2E box 2 bay 7 HP MB012000JWDFD 5PGU1WHC HPD2 OK
/dev/ciss0: (Smart HBA H241) Enclosure D6020 (S/N: 7CE952P06X) on Bus 2, Physical Port 1E status: OK.
/dev/ciss0: (Smart HBA H241) Enclosure D6020 (S/N: 7CE952P06X) on Bus 3, Physical Port 2E status: OK.
/dev/ciss0: (Smart HBA H241) Enclosure D6020 (S/N: 7CE952P09P) on Bus 4, Physical Port 1E status: OK.
/dev/ciss0: (Smart HBA H241) Enclosure D6020 (S/N: 7CE952P09P) on Bus 5, Physical Port 2E status: OK.
/dev/ciss0(Smart HBA H241:0): Non-Volatile Cache status:
Cache configured: No
It should have printed a lot more drives - up to box2 bay 35. This is two D6020 disk enclosures with 70 12TB SAS drives each and the drive in bay 8 is probably having problems.