From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C15E0C433ED for ; Tue, 27 Apr 2021 08:21:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8148E61182 for ; Tue, 27 Apr 2021 08:21:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230325AbhD0IVt (ORCPT ); Tue, 27 Apr 2021 04:21:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:34322 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbhD0IVt (ORCPT ); Tue, 27 Apr 2021 04:21:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id CCEEAB001; Tue, 27 Apr 2021 08:21:04 +0000 (UTC) To: Martin Wilck , "erwin@erwinvanlonden.net" , "Ulrich.Windl@rz.uni-regensburg.de" , "martin.petersen@oracle.com" Cc: "jejb@linux.vnet.ibm.com" , "linux-scsi@vger.kernel.org" , "dgilbert@interlog.com" , "dm-devel@redhat.com" , "systemd-devel@lists.freedesktop.org" , Hannes Reinecke , "hch@lst.de" References: <06489ea37311fe7bf73b27a41b5209ee4cca85fe.camel@suse.com> <685c40341d2ddef2fe5a54dd656d10104b0c1bfa.camel@suse.com> <6086A0B2020000A100040BBE@gwsmtp.uni-regensburg.de> <59dc346de26997a6b8e3ae3d86d84ada60b3d26b.camel@suse.com> <15e1a6a493f55051eab844bab2a107f783dc27ee.camel@suse.com> From: Hannes Reinecke Organization: SUSE Linux GmbH Subject: Re: [dm-devel] RFC: one more time: SCSI device identification Message-ID: <2a6903e4-ff2b-67d5-e772-6971db8448fb@suse.de> Date: Tue, 27 Apr 2021 10:21:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <15e1a6a493f55051eab844bab2a107f783dc27ee.camel@suse.com> Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org On 4/27/21 10:10 AM, Martin Wilck wrote: > On Tue, 2021-04-27 at 13:48 +1000, Erwin van Londen wrote: >>> >>> Wrt 1), we can only hope that it's the case. But 2) and 3) need work, >>> afaics. >>> >> In my view the WWID should never change.  > > In an ideal world, perhaps not. But in the dm-multipath realm, we know > that WWID changes can happen with certain storage arrays. See  > https://listman.redhat.com/archives/dm-devel/2021-February/msg00116.html  > and follow-ups, for example. > And it's actually something which might happen quite easily. The storage array can unmap a LUN, delete it, create a new one, and map that one into the same LUN number than the old one. If we didn't do I/O during that interval upon the next I/O we will be getting the dreaded 'Power-On/Reset' sense code. _And nothing else_, due to the arcane rules for sense code generation in SAM. But we end up with a completely different device. The only way out of it is to do a rescan for every POR sense code, and disable the device eg via DID_NO_CONNECT whenever we find that the identification has changed. We already have a copy of the original VPD page 0x83 at hand, so that should be reasonably easy. I had a rather lengthy discussion with Fred Knight @ NetApp about Power-On/Reset handling, what with him complaining that we don't handle is correctly. So this really is something we should be looking into, even independently of multipathing. But actually I like the idea from Martin Petersen to expose the parsed VPD identifiers to sysfs; that would allow us to drop sg_inq completely from the udev rules. Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions Germany GmbH, 90409 Nürnberg GF: F. Imendörffer, HRB 36809 (AG Nürnberg) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2BF3C433ED for ; Tue, 27 Apr 2021 08:21:24 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 198B061182 for ; Tue, 27 Apr 2021 08:21:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 198B061182 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-174-048FukUjNdq5S66MnwXnFQ-1; Tue, 27 Apr 2021 04:21:20 -0400 X-MC-Unique: 048FukUjNdq5S66MnwXnFQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 412451006C81; Tue, 27 Apr 2021 08:21:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ABF9C1002388; Tue, 27 Apr 2021 08:21:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 22FB144A58; Tue, 27 Apr 2021 08:21:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13R8LBGY023719 for ; Tue, 27 Apr 2021 04:21:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9DC00568C3; Tue, 27 Apr 2021 08:21:11 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 99BC850174 for ; Tue, 27 Apr 2021 08:21:09 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1DDE1A2880D for ; Tue, 27 Apr 2021 08:21:09 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-409-NOi-ouvSNQqGiAlamTODEw-1; Tue, 27 Apr 2021 04:21:06 -0400 X-MC-Unique: NOi-ouvSNQqGiAlamTODEw-1 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id CCEEAB001; Tue, 27 Apr 2021 08:21:04 +0000 (UTC) To: Martin Wilck , "erwin@erwinvanlonden.net" , "Ulrich.Windl@rz.uni-regensburg.de" , "martin.petersen@oracle.com" References: <06489ea37311fe7bf73b27a41b5209ee4cca85fe.camel@suse.com> <685c40341d2ddef2fe5a54dd656d10104b0c1bfa.camel@suse.com> <6086A0B2020000A100040BBE@gwsmtp.uni-regensburg.de> <59dc346de26997a6b8e3ae3d86d84ada60b3d26b.camel@suse.com> <15e1a6a493f55051eab844bab2a107f783dc27ee.camel@suse.com> From: Hannes Reinecke Organization: SUSE Linux GmbH Message-ID: <2a6903e4-ff2b-67d5-e772-6971db8448fb@suse.de> Date: Tue, 27 Apr 2021 10:21:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <15e1a6a493f55051eab844bab2a107f783dc27ee.camel@suse.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 13R8LBGY023719 X-loop: dm-devel@redhat.com Cc: Hannes Reinecke , "systemd-devel@lists.freedesktop.org" , "linux-scsi@vger.kernel.org" , "dm-devel@redhat.com" , "dgilbert@interlog.com" , "jejb@linux.vnet.ibm.com" , "hch@lst.de" Subject: Re: [dm-devel] RFC: one more time: SCSI device identification X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable On 4/27/21 10:10 AM, Martin Wilck wrote: > On Tue, 2021-04-27 at 13:48 +1000, Erwin van Londen wrote: >>> >>> Wrt 1), we can only hope that it's the case. But 2) and 3) need work, >>> afaics. >>> >> In my view the WWID should never change.=A0 >=20 > In an ideal world, perhaps not. But in the dm-multipath realm, we know > that WWID changes can happen with certain storage arrays. See=A0 > https://listman.redhat.com/archives/dm-devel/2021-February/msg00116.html= =A0 > and follow-ups, for example. >=20 And it's actually something which might happen quite easily. The storage array can unmap a LUN, delete it, create a new one, and map that one into the same LUN number than the old one. If we didn't do I/O during that interval upon the next I/O we will be getting the dreaded 'Power-On/Reset' sense code. _And nothing else_, due to the arcane rules for sense code generation in SAM. But we end up with a completely different device. The only way out of it is to do a rescan for every POR sense code, and disable the device eg via DID_NO_CONNECT whenever we find that the identification has changed. We already have a copy of the original VPD page 0x83 at hand, so that should be reasonably easy. I had a rather lengthy discussion with Fred Knight @ NetApp about Power-On/Reset handling, what with him complaining that we don't handle is correctly. So this really is something we should be looking into, even independently of multipathing. But actually I like the idea from Martin Petersen to expose the parsed VPD identifiers to sysfs; that would allow us to drop sg_inq completely from the udev rules. Cheers, Hannes --=20 Dr. Hannes Reinecke=09=09 Kernel Storage Architect hare@suse.de=09=09=09 +49 911 74053 688 SUSE Software Solutions Germany GmbH, 90409 N=FCrnberg GF: F. Imend=F6rffer, HRB 36809 (AG N=FCrnberg) -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel