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.
--- 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 @@
+ { 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;
+ }