From owner-freebsd-questions@freebsd.org Sun Jan 31 22:12:49 2021 Return-Path: Delivered-To: freebsd-questions@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 69EA94E9A7B for ; Sun, 31 Jan 2021 22:12:49 +0000 (UTC) (envelope-from matt@gsicomp.on.ca) Received: from outbound1a.ore.mailhop.org (outbound1a.ore.mailhop.org [54.213.22.21]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4DTQLS3GkWz4m3P for ; Sun, 31 Jan 2021 22:12:47 +0000 (UTC) (envelope-from matt@gsicomp.on.ca) ARC-Seal: i=1; a=rsa-sha256; t=1612131166; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=T6CeDFm1GfbeIYZJv1U8Txb8Akp+PvEHXc9jr8VaQWmubzVblPLFQrY05rYmzgdnOV/aItoKp5ScZ ynW4YoGaEW2csgUYYLs1ur4v1CionseSzBE1FvD96A7LYSi4hVfo8kOBW/OdS12r94+jxiDnpfJl27 qSKc79BFNaIjKZl6UzZJnt4V0uyc9ISXJk8Qp1cNaQeahzeKzME5NeMOANnisvbkfFawKQH1K0iD6g YPZNmmkHB5SMICh5G6Dz/TinKsmLM3r4ILS71Hsv/Agk/CYQ7eVjnx6mnqSjmfsFyjIo1QoBzjIQB4 2ddppwYitI9sLMlq7LtVaFy8MVW3Dpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:content-type:mime-version:message-id:date:subject: to:from:dkim-signature:dkim-signature:from; bh=nB3cdhU/YxcV5muKofmVgI42/crb/tKWyRXBaAavmUU=; b=cJdJzNqmAGHb4SH4S0zaEITdAE4Gs8f8BaJ/V/naX1ep8dP1N4KE/8xAvHMFVZRlf7yHKXo1ZUAFx +P0EDF5Yxx3USk5S5rwJVZRckgszhkWNPU3ejPuRGZ9kZLIiRw+IM0mX25zsZyQkkxQxGuYzIC2aTk KmtWY+QXpk+z82y04OcMEwbXqyLk8KGjfymX9WRWW+38XM1+IgBp2yHbXfLgbNDs1hz4xZUmEnJHsZ PDEmr3lcT3qL0mdaeuQHZEY85+lHnjxDpF4+yVC/Xzgy7SvgliJWdBHTSzTQhy7XSAwit3FyBL1cjF 4eH0c9EkznJYzktBLXLu4Qn+uEaK66g== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=pass smtp.mailfrom=gsicomp.on.ca smtp.remote-ip=162.243.98.91; dmarc=none header.from=gsicomp.on.ca; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gsicomp.on.ca; s=duo-1597798936401-95ae6877; h=content-transfer-encoding:content-type:mime-version:message-id:date:subject: to:from:from; bh=nB3cdhU/YxcV5muKofmVgI42/crb/tKWyRXBaAavmUU=; b=ZgJ9quHiAM9zSsFolv9kRt7NJ1KgXKO4qd647aZAJQdEVUgv8Mig1TzdQLT9TNTCCtCd2hRXaj5tM p2Hz+6fWmGyoRLUj3K7R/q4ajiR5C5QHurZ0OwQ4xag3IX2ZkV/o5YgPeQbkVPO4ILDrtZ3i9sASXD rBtBkGDOnQ9gTn6g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:content-type:mime-version:message-id:date:subject: to:from:from; bh=nB3cdhU/YxcV5muKofmVgI42/crb/tKWyRXBaAavmUU=; b=w2pHqi/5jVmBmGt1/7oHWmkhHBqAHaX3pOTJ0scTbVYrtaX3nehOlnaFUl702juvWHY5MxzL7569M sxQt51vWy/8Rk/tVnMJSVsxG+hcO19FPzVGGiV0/cJXzJ8ur/XgShknJ8BH/HiW5yeGaZee4VaMV9h ZHlHfmkl3XTd3ZOhzl5UIVOw4vYezRfdTb1aqZprSA5JHSv2eXUcM/7nQKS+fZlvt7j2u4bCd7jBnK InMGGCL9C05FFchh1hnYtxLaKZfcnNcZ5uUBarmaJ/NZcaP0Dss19uCjj/AfFSyiQbi4Gus86Vnm5X omGxv2PxZhcD6s3wFn3AB6swpH11NnQ== X-Originating-IP: 162.243.98.91 X-MHO-RoutePath: bWVtbWVydG8= X-MHO-User: 71920582-6411-11eb-9805-2759e409b1e0 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from mail.salamander.gsicomp.on.ca (salamander.gsicomp.on.ca [162.243.98.91]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id 71920582-6411-11eb-9805-2759e409b1e0; Sun, 31 Jan 2021 22:12:45 +0000 (UTC) Received: by mail.salamander.gsicomp.on.ca (Postfix, from userid 2000) id 9A58340326; Sun, 31 Jan 2021 17:12:44 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on salamander.gsicomp.on.ca X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 Received: from HEXEN (dhcp-108-168-19-149.cable.user.start.ca [108.168.19.149]) by mail.salamander.gsicomp.on.ca (Postfix) with ESMTPA id 25ED940251 for ; Sun, 31 Jan 2021 17:12:44 -0500 (EST) From: "Matt Emmerton" To: Subject: Help recovering damaged drive - fsck segfaults, read-only mount looks ok Date: Sun, 31 Jan 2021 17:12:40 -0500 Message-ID: <012a01d6f81e$3103d390$930b7ab0$@gsicomp.on.ca> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Content-Language: en-ca Thread-Index: Adb4HgAi8fRdlmv6TjGX5aleV2eQiQ== X-Rspamd-Queue-Id: 4DTQLS3GkWz4m3P X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gsicomp.on.ca header.s=duo-1597798936401-95ae6877 header.b=ZgJ9quHi; dkim=pass header.d=outbound.mailhop.org header.s=dkim-high header.b=w2pHqi/5; arc=pass (outbound.mailhop.org:s=arc-outbound20181012:i=1); dmarc=none; spf=pass (mx1.freebsd.org: domain of matt@gsicomp.on.ca designates 54.213.22.21 as permitted sender) smtp.mailfrom=matt@gsicomp.on.ca X-Spamd-Result: default: False [-4.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_XOIP(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:54.213.22.21]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[gsicomp.on.ca:+,outbound.mailhop.org:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[54.213.22.21:from]; ASN(0.00)[asn:16509, ipnet:54.213.0.0/16, country:US]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; ARC_ALLOW(-1.00)[outbound.mailhop.org:s=arc-outbound20181012:i=1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gsicomp.on.ca:s=duo-1597798936401-95ae6877,outbound.mailhop.org:s=dkim-high]; FREEFALL_USER(0.00)[matt]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[gsicomp.on.ca]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[54.213.22.21:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[54.213.22.21:from]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jan 2021 22:12:49 -0000 Hi, I have a FreeBSD-11 machine that I recently upgraded to FreeBSD-12. It has a Sii RAID-1 pair of 1TB drives. A week ago this system got unexpectedly powered off and when it came back up, mount refuses to mount my RAID-1 FS because it is durty. fsck runs, but segfaults. It's clear that the corruption is confusing fsck and causing the trap. If I force a mount in readonly mode, I can inspect the drive and at first glance, everything seems valid. Since this machine is used for backups, I have lots of other medata (eg, checksums) and I'm slowly working through to see if anything important is damaged. >From some of the stuff that fsck is finding, it's clear that the corruption is in a rather large-and-deep directory tree that was recently deleted. It's possible that the 'rm -rf' for this was running in the background when the system lost power. Is there any way to have fsck be more "selective" in what it checks/repairs? It's been a long time since I've done low-level filesystem surgery, but it seems to me that if I can prevent it from going off into the weeds (and trying to repair inode entries that are no longer relevant), all will be well. Any advice? I have thought about doing some inspection with "ls -i" and then being very selective in the inodes I get fsck to repair, but that seems challenging to get right. Regards, -- Matt Emmerton