#734 closed enhancement (fixed)
-d megaraid,N is not implemented, FreeBSD 10.3 w/ LSI MegaRAID 9271-8i SATA/SAS and mrsas (4) driver
Reported by: | Andrii Stesin | Owned by: | Alex Samorukov |
---|---|---|---|
Priority: | minor | Milestone: | Release 7.3 |
Component: | all | Version: | 6.5 |
Keywords: | megaraid freebsd | Cc: | Kyle Butt |
Description (last modified by )
FreeBSD 10.3 system with LSI MegaRAID 9271-8i SATA/SAS RAID controller.
Recommended (and supported) driver for this newer controller is mrsas (4) (and old mfi (4) driver is neither supported by LSI nor actively developed, it supports new controllers in some obsolete ineffective way).
mrsas (4) gives virtual drives to the OS as devices /dev/daXX although I found that /dev/passX devices are also created (/dev/daN has corresponding /dev/passN) in case it matters.
I have
smartctl 6.5 2016-05-07 r4318 [FreeBSD 10.3-STABLE amd64] (local build)
I want to get S.M.A.R.T. status of an SSD which MegaRAID-assigned device ID is 12, and it is hidden under /dev/da0 virtual drive.
Now what I get:
[root@chort /]# smartctl -a /dev/da0 smartctl 6.5 2016-05-07 r4318 [FreeBSD 10.3-STABLE amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: LSI Product: MR9271-8i Revision: 3.46 User Capacity: 199,481,098,240 bytes [199 GB] Logical block size: 512 bytes >> Terminate command early due to bad response to IEC mode page A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. [root@chort /]# [root@chort /]# smartctl -a /dev/pass0 smartctl 6.5 2016-05-07 r4318 [FreeBSD 10.3-STABLE amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Vendor: LSI Product: MR9271-8i Revision: 3.46 User Capacity: 199,481,098,240 bytes [199 GB] Logical block size: 512 bytes >> Terminate command early due to bad response to IEC mode page A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. [root@chort /]# [root@chort /]# smartctl -a -d megaraid,12 /dev/da0 smartctl 6.5 2016-05-07 r4318 [FreeBSD 10.3-STABLE amd64] (local build) Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org /dev/da0: Unknown device type 'megaraid,12' =======> VALID ARGUMENTS ARE: ata, scsi, nvme[,NSID], sat[,auto][,N][+TYPE], usbcypress[,X], usbjmicron[,p][,x][,N], usbprolific, usbsunplus, 3ware,N, hpt,L/M/N, cciss,N, areca,N/E, atacam, auto, test <======= Use smartctl -h to get a usage summary [root@chort /]#
Can anything be done about this? I badly need to monitor S.M.A.R.T. status of my SAS/SATA drives under the MegaRAID...
Thanks in advance!
WBR,
Andrii
Change History (14)
comment:1 by , 8 years ago
follow-up: 3 comment:2 by , 8 years ago
Description: | modified (diff) |
---|---|
Keywords: | megaraid freebsd added; MegaRAID removed |
Milestone: | → undecided |
Priority: | major → minor |
Type: | defect → enhancement |
There is no -d megaraid,N
device type in the FreeBSD version of smartmontools because in the past it worked with the mfip.ko
module and /dev/passX
device (see also Supported RAID-Controllers page).
If the new driver does not support this, please provide information about its SCSI pass-through I/O-control (if any).
comment:3 by , 8 years ago
Replying to chrfranke:
There is no
-d megaraid,N
device type in the FreeBSD version of smartmontools because in the past it worked with themfip.ko
module and/dev/passX
device (see also Supported RAID-Controllers page).
If the new driver does not support this, please provide information about its SCSI pass-through I/O-control (if any).
Dear chrfranke, thank you much for your responsive reaction. Sorry I'm not a developer so I can't tell you for sure, but what FreeBSD man page for mrsas (4) actually states, "the mrsas name is derived from the phrase "MegaRAID SAS HBA", which is substantially different than the old "MegaRAID" Driver mfi(4) which does not connect targets to the cam(4) layer and thus requires a new driverwhich attaches targets to the cam(4) layer." This makes me guess that mrsas (4) behaves "better" right now.
comment:4 by , 8 years ago
One more word, as I see that MegaCLI command line utility is able to get SMART info from behind the MegaRAID - it is technically possible, am I correct?
comment:5 by , 8 years ago
Do we need any modifications to mrsas (4) in order to support the syntax like:
smartctl -a -d megaraid,12
or even better,
smartctl -a -d 'megaraid,[9:11]'
or both? Whom shall I ask for details? Thanks in advance!
comment:6 by , 8 years ago
- It is possible.
- Best think is to implement smth like mrsasp which exports drives.
- I think i can implement megaraid-like functionality if someone will provide me access to such hw
comment:7 by , 8 years ago
Few notes:
- https://github.com/freebsd/freebsd/blob/master/sys/dev/mrsas/mrsas_linux.c implements emulation of the linux ioctl used by MegaCli.
- There is a native ioctl interface defined here: https://github.com/freebsd/freebsd/blob/master/sys/dev/mrsas/mrsas.h, probably it is MRSAS_REQ_TYPE_PASSTHRU and mrsas_pthru_frame structure.
From what i see - adding megaraid (or mrsas?) support should be trivial
comment:8 by , 7 years ago
If someone interesting to see progress on this ticket - please provide me ssh access to hardware :)
comment:9 by , 7 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
Ok, i got access to such hw (one of my BSD servers works with a such controller) and will try to work on this.
comment:10 by , 7 years ago
Progress so far:
- I implemented quick & dirty port of the Linux megaraid code to the FreeBSD.
truss
shows that ioctl looks <> the same. - Now server reboots on issuing identify command. Server is located remotely, so hard to tell what is the root cause.
- Need to find some time to play with dtrace and find the problem
As usual - help is wanted. I will attach my patch to this ticket.
comment:11 by , 4 years ago
Cc: | added |
---|
Was there any progress on this? I don't see the patch attached to the ticket. I have a megaraid 9361-8i that I would like to monitor. I'm a developer and would be glad to help out in any way that I can.
comment:12 by , 3 years ago
Patch to support mrsas could be found at https://github.com/smartmontools/smartmontools/pull/117. Testing is welcome.
comment:14 by , 3 years ago
Milestone: | undecided → Release 7.3 |
---|
And yes, smartd does not work either.