Received: by 10.192.245.15 with SMTP id i15csp1233277imn; Sun, 11 Mar 2018 09:42:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELuGCeJ2cUyWBhdkYkz3ICC3XaYUplp2Y0xLiB5kFpZwWlqMzoHPl6t9uA0bTC1345rwH+Ww X-Received: by 10.101.91.3 with SMTP id y3mr4371538pgq.149.1520786578814; Sun, 11 Mar 2018 09:42:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520786578; cv=none; d=google.com; s=arc-20160816; b=UoDpRn46PCkLSqrNpVuJewk48qptTr6h1YI8Sm8VD9ZRfsXg1oldyNhGJo/CRMxUsY VEvtT8g56xLr03euF61hCoZGVkSA9wD/6jhyDEJF+1j5ahQEyRoF+BKaEuXRssDHZLdL faLp4IM6Zxhnaj3LnSUuFfGAyt4u3KVSesaxNXUbh4K5+DPsviqFz+8xW5kNRnksk0SF Q/delv3y1JfIH1dxN04JNc5J5hvZ1VHaPeIogD8mNN98LH3ejz+MI1d0QSMb66g7FZJx EOSqh7vmOkqJILKPVQNzjbKfSYvfPgytmBSXXDQZolw66orutsQhRbx23AssyY1oVa0g qeow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=wYi/+9Jp/yTCCImXlLrHexT3Ooxw4HLlPgo+W8Xu7Y4=; b=BM8Kc4M2ZfpVLDBJ1vkDncjsptq8UmFUfoi2ycxgkY4t3vZV4c52XWAq72mxuA8QpX v1bXB7oYi5jeCfpJaw5nNlMDL/V+MKR+QtJY4R7s8h9bkXyMmQjkIFHoM8e0DMp3f3Br um5aTBZKszXYi3CNooZBRQKkeKnNpmvyo5jlFW07pvnpVVQadfG62Q6TiamTQtJnmwV7 fWyMuGno5nOmzIjnhe2a/aT4xs1vLOj7u7uc407LsmqoxRb99xaDCFmITw/IGk0gXPL3 vSqzDQm3rw8D/HY2STaBT9OLxKCXDLaS0k5pLpSuuvHwoF8oSuEVw3FOmcmWBMWOANbk WTsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k17si249187pgf.534.2018.03.11.09.42.44; Sun, 11 Mar 2018 09:42:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932217AbeCKQlv (ORCPT + 99 others); Sun, 11 Mar 2018 12:41:51 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:51011 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932153AbeCKQlu (ORCPT ); Sun, 11 Mar 2018 12:41:50 -0400 Received: by mail-wm0-f44.google.com with SMTP id w128so12124262wmw.0 for ; Sun, 11 Mar 2018 09:41:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=wYi/+9Jp/yTCCImXlLrHexT3Ooxw4HLlPgo+W8Xu7Y4=; b=g8fBg/DsGrdr8ZfkuFzcsXLx6IFhhFtrp77iBOFtFMPjzepiF8//w8rmiC2gN8WWrE QXFkeAfCycPMKyshhhWRdRNUoxX4huhEf0jKvv/V2fhbTI2/tcbI/bXQSEhBFCI0ZDN5 KCFbkLpJg33MCaj28H9508nfkUPFAq6DO//vk77e2coz7Ulf7KENMOC4nzAkilqRMG38 hwy0Ha+09jDc0jZKSlRiVxkK/CiSuPMuHsBZjegeuJBHU7flhccdX/yzPx2SqtCJQHVL 9Ias73TaTtLcxPuzSKmCQSIyPprTs7ByC1q8JTUgXV+TOK1T3n3SuJui/4iTtat93WU+ zmPQ== X-Gm-Message-State: AElRT7GGDQ2MMUPnYXdMmFk/NLKS31WpMV2JJxylWaB0b8cL6q9Jn9YX d6IxTKsb4q6eEUM4CvanqUpT5A== X-Received: by 10.80.224.71 with SMTP id g7mr7347389edl.47.1520786509017; Sun, 11 Mar 2018 09:41:49 -0700 (PDT) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id j55sm3843104ede.14.2018.03.11.09.41.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Mar 2018 09:41:48 -0700 (PDT) Subject: Re: [Possible REGRESSION, 4.16-rc4] Error updating SMART data during runtime and could not connect to lvmetad at some boot attempts To: Martin Steigerwald Cc: Linux Kernel Mailing List , Thorsten Leemhuis , Tejun Heo References: <27165802.vQ9JbjrmvU@merkaba> <6020448.5HgvTYnRh2@merkaba> From: Hans de Goede Message-ID: <5e7417f9-e928-406f-e8e2-5ed5b8165451@redhat.com> Date: Sun, 11 Mar 2018 17:41:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <6020448.5HgvTYnRh2@merkaba> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 11-03-18 17:28, Martin Steigerwald wrote: > Hans de Goede - 11.03.18, 15:37: >> Hi Martin, >> >> On 11-03-18 09:20, Martin Steigerwald wrote: >>> Hello. >>> >>> Since 4.16-rc4 (upgraded from 4.15.2 which worked) I have an issue >>> with SMART checks occassionally failing like this: >>> >>> smartd[28017]: Device: /dev/sdb [SAT], is in SLEEP mode, suspending checks >>> udisksd[24408]: Error performing housekeeping for drive >>> /org/freedesktop/UDisks2/drives/INTEL_SSDSA2CW300G3_[…]: Error updating >>> SMART data: Error sending ATA command CHECK POWER MODE: Unexpected sense >>> data returned:#0120000: 0e 09 0c 00 00 00 ff 00 00 00 00 00 00 00 50 >>> 00 ..............P.#0120010: 00 00 00 00 00 00 00 00 00 00 00 00 00 >>> 00 00 00 ................#012 (g-io-error-quark, 0) merkaba >>> udisksd[24408]: Error performing housekeeping for drive >>> /org/freedesktop/UDisks2/drives/Crucial_CT480M500SSD3_[…]: Error updating >>> SMART dat a: Error sending ATA command CHECK POWER MODE: Unexpected sense >>> data returned:#0120000: 01 00 1d 00 00 00 0e 09 0c 00 00 00 ff 00 00 >>> 00 ................#0120010: 00 0 0 00 00 50 00 00 00 00 00 00 00 >>> 00 00 00 00 ....P...........#012 (g-io-error-quark, 0) >>> >>> (Intel SSD is connected via SATA, Crucial via mSATA in a ThinkPad T520) >>> >>> However when I then check manually with smartctl -a | -x | -H the device >>> reports SMART data just fine. >>> >>> As smartd correctly detects that device is in sleep mode, this may be an >>> userspace issue in udisksd. >>> >>> Also at some boot attempts the boot hangs with a message like "could not >>> connect to lvmetad, scanning manually for devices". I use BTRFS RAID 1 >>> on to LVs (each on one of the SSDs). A configuration that requires a >>> manual >>> adaption to InitRAMFS in order to boot (basically vgchange -ay before >>> btrfs device scan). >>> >>> I wonder whether that has to do with the new SATA LPM policy stuff, but as >>> I had issues with >>> >>> 3 => Medium power with Device Initiated PM enabled >>> >>> (machine did not boot, which could also have been caused by me >>> accidentally >>> removing all TCP/IP network support in the kernel with that setting) >>> >>> I set it back to >>> >>> CONFIG_SATA_MOBILE_LPM_POLICY=0 >>> >>> (firmware settings) >> >> Right, so at that settings the LPM policy changes are effectively >> disabled and cannot explain your SMART issues. >> >> Still I would like to zoom in on this part of your bug report, because >> for Fedora 28 we are planning to ship with CONFIG_SATA_MOBILE_LPM_POLICY=3 >> and AFAIK Ubuntu has similar plans. >> >> I suspect that the issue you were seeing with >> CONFIG_SATA_MOBILE_LPM_POLICY=3 were with the Crucial disk ? I've attached >> a patch for you to test, which disabled LPM for your model Crucial SSD (but >> keeps it on for the Intel disk) if you can confirm that with that patch you >> can run with >> CONFIG_SATA_MOBILE_LPM_POLICY=3 without issues that would be great. > > I think I can do that during the week with 4.16-rc5 then. Great, thank you. > Is it possible to override that setting at boot time with a kernel parameter? Yes the Kconfig determines the default value for the ahci.mobile_lpm_policy cmdline option, and that (setting the default val) is all it does, changing that option has the same result as changing the Kconfig option and rebuilding. > It would make it easier to switch between the policies for testing. Ack, as said the plan is to make CONFIG_SATA_MOBILE_LPM_POLICY=3 the default for Fedora 28, so it is in my own interest to make it easy to test different settings :) Regards, Hans