Opened 11 years ago

Closed 11 years ago

#268 closed defect (fixed)

smartd should avoid port multiplier devices on FreeBSD

Reported by: charlesrandall Owned by: somebody
Priority: major Milestone: Release 6.2
Component: all Version: 6.1
Keywords: freebsd Cc:

Description

When scanning for devices, smartd uses the FreeBSD cam subsystem to iterate through all of the devices on the system. When it encounters a SATA port multipler (e.g., /dev/pmp0) it sends commands to that device that eventually timeout. This delays boot by several minutes on a large system.

Running "smartd -q onechceck" produces errors like this for each port multiplier encountered,

Device: /dev/pmp8, opened
(pass53:mvsch10:0:15:0): ATA_IDENTIFY. ACB: ec 00 00 00 00 40 00 00 00 00 01 00
(pass53:mvsch10:0:15:0): CAM status: ATA Status Error
(pass53:mvsch10:0:15:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT )
(pass53:mvsch10:0:15:0): RES: 51 04 00 00 00 00 00 00 00 00 00
(pass53:mvsch10:0:15:0): ATAPI_IDENTIFY. ACB: a1 00 00 00 00 40 00 00 00 00 01 00
(pass53:mvsch10:0:15:0): CAM status: Command timeout
Device: /dev/pmp8, not ATA, no IDENTIFY DEVICE Structure
Unable to register ATA device /dev/pmp8

These devices should be avoided on FreeBSD. The attached patch avoids them when running "smartd -d onecheck" but it is not clear if that is sufficient or even the right place to make such a change.

Change History (3)

comment:1 by charlesrandall, 11 years ago

--- os_freebsd.cpp.orig 2013-04-11 21:38:29.000000000 +0000
+++ os_freebsd.cpp 2013-04-11 22:15:08.000000000 +0000
@@ -1826,7 +1826,13 @@

check all devices on CAM bus
for (i = 0; i < (int)scsinames.size(); i++) {

if(strcmp(scsinames[i].c_str(), test_name)==0)

  • { our disk device is CAM

+ { our disk device is CAM
+ if(strncmp(scsinames[i].c_str(),
+ "/dev/pmp", strlen("/dev/pmp")) == 0) {
+ pout("Skipping port multiplier [%s]\n", scsinames[i].c_str());
+ set_err(EINVAL);
+ return 0;
+ }

if ((cam_dev = cam_open_device(test_name, O_RDWR)) == NULL) {

open failure
set_err(errno);

comment:2 by Christian Franke, 11 years ago

Milestone: Release 6.2

comment:3 by Alex Samorukov, 11 years ago

Resolution: fixed
Status: newclosed

fixed in r3821, thanks

Note: See TracTickets for help on using tickets.