From owner-freebsd-virtualization@freebsd.org Thu Apr 30 19:06:03 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E6402C5E08 for ; Thu, 30 Apr 2020 19:06:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49ClGL4X0lz3R7Y for ; Thu, 30 Apr 2020 19:06:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 991472C5E07; Thu, 30 Apr 2020 19:06:02 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97BBA2C5E06 for ; Thu, 30 Apr 2020 19:06:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ClGL3HWWz3R7T for ; Thu, 30 Apr 2020 19:06:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6C2BC23A07 for ; Thu, 30 Apr 2020 19:06:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 03UJ62WD082958 for ; Thu, 30 Apr 2020 19:06:02 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 03UJ62SN082956 for virtualization@FreeBSD.org; Thu, 30 Apr 2020 19:06:02 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 236042] Windows Server 2016 Hyper-V snapshot triggers SCSI errors Date: Thu, 30 Apr 2020 19:06:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: decui@microsoft.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2020 19:06:03 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236042 --- Comment #13 from Dexuan Cui --- (In reply to Michael from comment #11) When you see the SCSI errors, can the live backup procedure succeed? Do you notice any instability issue (e.g.hang/panic)? Do you notice any data corruption issue (e.g. the back-up procedure says it succeeded, but later y= ou may find that the data is not really consistently backed up, i.e. 'fsck' may run while you think it should not)? If the backup procedure still succeeds, and you never notice any real issue, then I think it should be safe to ignore the SCSI error messages -- if we w= ant to get rid of the messages, it looks sys/dev/hyperv/utilities/hv_snapshot.= c is not an issue -- it looks we need to improve sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c and/or the other part of SC= SI subsystem. Linux VM on Hyper-V shows the same/similar messages when Hyper-V live backu= p is being performed (at least this was the case in June 2017): sd 2:0:0:0: [storvsc] Sense Key : Unit Attention [current] sd 2:0:0:0: [storvsc] Add. Sense: Changed operating definition sd 2:0:0:0: Warning! Received an indication that the operating parameters on this target have changed. The Linux SCSI layer does not automatically adjust these parameters. These messages in a Linux VM can be seen even if the back-up is successful,= so it looks people just ignore the messages in Linux.=20 The messages are caused as a result of the way how Hyper-V live-backup work= s: usually the VM's .vhdx file has a block size of 32MB, and during the live-backup procedure IIRC it looks a temporary .avhdx of a 2MB block size = is generated and the host returns sense key "Unit Attention" with asc 0x3f and ascq 0x2 (Changed Operating Definition); the host sends "Unit Attention" because the backing VHD block size has changed after checkpoint or backup a= nd this results in a change in the granularity of the UNMAP. Linux SCSI layer can deal with the following asc 0x3f on Unit Attention: ascq 0x3 (Inquiry Data Has Changed) ascq 0xe (Reported Luns Data Has Changed) However ascq 0x2 is ignored. The SCSI won=E2=80=99t know the UNMAP granular= ity change, it will run at probably slower UNMAP but won=E2=80=99t affect other parts. Note: I excerpted the above details from a 2017 email discussing the SCSI errors in a Linux VM on Hyper-V. My understanding is that the messages can = be safely ignored in Linux, but I'm not sure about FreeBSD, as the SCSI subsys= tem in FreeBSD may handle the sense info in a different manner.=20 I have moved on to different projects, so I am sorry I can not follow this up... I hope someone would find the info I shared here is useful, in case something has to be done in FreeBSD VM. --=20 You are receiving this mail because: You are the assignee for the bug.=