From nobody Tue Sep 26 11:30:42 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RvyGp687Lz4v2bh for ; Tue, 26 Sep 2023 11:30:42 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RvyGp2Ywqz3Mt7 for ; Tue, 26 Sep 2023 11:30:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695727842; a=rsa-sha256; cv=none; b=TXjHTj/8dsyPvZGPyMwKaJ2Hdq3SEEtlecszawdYt/TgoAdzLUvrkVmDodSoqBGsvhU+do rzjzOSlpQRmzxHvb+6eayG2s9k9Wokfyfmf/nODdX3zPvc23WXp1UlX9UVe25uiF5ny6SC mL0Z20Xxju7UiDKTPFxj6MmOwAZFftwSx8gy9NXT5APAxs5aS1VUb/D3M9x9YxirB6Z2u1 TmyYgTmD7isRhU9vZmc2TJLB70n/X/MFRVQx6J6U6jeY1f+BR3JS63nco+oWfjfbeK6g97 6vo9hP91sneomsc/m3rI87gnfYNgEtDHvRXNUU4mvsFWC3JbFeGK7tL3a0RbhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695727842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Q8m2x3CK9O5888WQaYupB/5Ge5KG+hAZ7LFT33WYJI=; b=HHZNAIkPmpg6pLoHMjhTYA0Gu7dOjsSwtNZ030PWlbYJySJuatg8Gq2MAdDraV9UsEX9oJ Bic8etNAqopGOJ2/H2QfFUyS31+jFNnuJQiOgVIha0SflFVFswL9NG+eCv8JdUHsZQsSK7 srgfqCJj1GTwxIOGfj26rnc56aSo1qd+vNKoueZ3zs3PveDD7LLREj1Z86qHx6hMURxz5y MheGtzdG0LFI+bskYMM14gyvdrKVlU8u+Og6/dxcD0woipWb9rDVzGZx+0StWVb+97w7MJ fAB8M2alZchLD2g2y2ycASShgnjP2W3TdwhX4q4eTH814OSdYkmYK3ikPMffJQ== 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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RvyGp1gTKzvFC for ; Tue, 26 Sep 2023 11:30:42 +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 38QBUgWe061164 for ; Tue, 26 Sep 2023 11:30:42 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38QBUg98061163 for bugs@FreeBSD.org; Tue, 26 Sep 2023 11:30:42 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: bugs@FreeBSD.org Subject: [Bug 274103] geom_mirror should not use underlying provider with WRITE_PROTECTED flag Date: Tue, 26 Sep 2023 11:30:42 +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: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: ant_mail@inbox.ru X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: 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 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 List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274103 Bug ID: 274103 Summary: geom_mirror should not use underlying provider with WRITE_PROTECTED flag Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: ant_mail@inbox.ru This is a horror story with production server that hanged and did not reboo= t. This was a rare case that one can't predict and it related to logic inside geom_gmirror so I think it is actual for all version of FreeBSD. Background: There was two SAS HDD: Toshiba and Seagate ST1800MM0129. Both are GPT partitioned and three UFS paritition are mirrored on each othe= r. Failure: There was an error from Seagate disk logged in /var/messages. Error seemed serious. Because of no ability to physically remove Seagate from system the= re=20 was a decision do logically detach it from system. It've been realized by series of command like "gmirror detach". There was a long time of each command. One command hangs, other command seems complete = but mirror status stayed the same. Because of this there was a decision to rebo= ot. After reboot system hangs during geom_mirror initialization. Also tried a FreeBSD 13-STABLE USB-stick but result was the same. Cause: (this is mostly reconstruction because there was no time to explore problem meaningfully) After reboot (reinitialization?) Seagate ST1800MM0129 goes to read-only mode because of internal hardware failure. It appear in camcontrol(?) with flag MEDIUM: WRITE_PROTECTED. Geom_mirror unexpect this case and attach it as us= ual as part of a mirror. But with the first attempt to write to it hangs. Summary: geom_mirror must check each mirror component for WRITE_PROTECTED flag and do not attach such a component to a mirror (at least during initialization) P.S. Solution for people in this situation: use Seagate SeaChest tools for FreeBSD to engage self-wiping process on failure disk. Disk will become cle= an and geom_mirror will initialize successfully. --=20 You are receiving this mail because: You are the assignee for the bug.=