From owner-freebsd-bugs@freebsd.org Sun Aug 28 10:56:56 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA715B78A31 for ; Sun, 28 Aug 2016 10:56:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9BE7B70 for ; Sun, 28 Aug 2016 10:56:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u7SAuuK0060214 for ; Sun, 28 Aug 2016 10:56:56 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 212211] mrsas (4) does not allow smartctl to access S.M.A.R.T data from physical drive hidden under /dev/daX Date: Sun, 28 Aug 2016 10:56:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: stesin@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Aug 2016 10:56:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212211 Bug ID: 212211 Summary: mrsas (4) does not allow smartctl to access S.M.A.R.T data from physical drive hidden under /dev/daX Product: Base System Version: 10.3-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: stesin@gmail.com CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org Given FreeBSD 10.3 system with LSI MegaRAID 9271-8i SATA/SAS RAID controlle= r. Recommended (and supported) driver for this newer controller is mrsas (4). mrsas (4) provides OS with virtual drives /dev/daXX - although I found that /dev/passX devices are also created for whatever purpose (/dev/daN has corresponding /dev/passN) in case it matters. Each /dev/daXX hides some (1 or more) physical SAS/SATA drives hidden under= it. Using MegaCLI utility, you can list PDs which of these are located by: - either with a pair of values [EnclosureID:SlotID], - or with the "device ID" which LSI MegaRAID somehow assigns to them. I have fresh actual smartmontools installed: 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 any physical drive attached to MegaRAID, i.e. of an SSD which MegaRAID assigned device ID is 12, and it is hidden un= der /dev/da0 virtual drive. But what I actually 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D 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 /]#=20 Ok, I understand: /dev/da0 is not a physical drive, maybe it's a striped ar= ray of 2 drives, smartctl gets confused, this is expected behavior. Looking deeper, I discovered, that Linux version of smartctl is aware of th= is situation, it allows the following syntax, where "-d megaraid,12" should te= ll that we are dealing with LSI MegaRAID and we actually want to question the = disk with "device ID" 12. Tried with Ubuntu live CD, it actually works well. But on FreeBSD this mode is not supported: [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' =3D=3D=3D=3D=3D=3D=3D> VALID ARGUMENTS ARE: ata, scsi, nvme[,NSID], sat[,au= to][,N][+TYPE], usbcypress[,X], usbjmicron[,p][,x][,N], usbprolific, usbsunplus, 3ware,N, hpt,L/M/N, cciss,N, areca,N/E, atacam, auto, test <=3D=3D=3D=3D=3D=3D=3D Use smartctl -h to get a usage summary [root@chort /]# I already opened the ticket at https://www.smartmontools.org/ticket/734 but= I think that a clarification is needed here: does mrsas (4) support this kind= of queries at all, as of today? Do we need some modifications to mrsas (4) in order to support the syntax l= ike: smartctl -a -d megaraid,12 or even better, smartctl -a -d 'megaraid,[9:11' or both? Or this is completely on the side of smartmontools? Thanks in adva= nce! WBR, Andrii Stesin --=20 You are receiving this mail because: You are the assignee for the bug.=