From owner-freebsd-fs@freebsd.org Wed Nov 28 01:31:32 2018 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BFA111428D1 for ; Wed, 28 Nov 2018 01:31:32 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670074.outbound.protection.outlook.com [40.107.67.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CD48782F0 for ; Wed, 28 Nov 2018 01:31:31 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM (52.132.50.155) by YTOPR0101MB1084.CANPRD01.PROD.OUTLOOK.COM (52.132.50.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.20; Wed, 28 Nov 2018 01:31:29 +0000 Received: from YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM ([fe80::9c71:6eb6:1bff:727b]) by YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM ([fe80::9c71:6eb6:1bff:727b%5]) with mapi id 15.20.1294.048; Wed, 28 Nov 2018 01:31:23 +0000 From: Rick Macklem To: Warner Losh , Kirk McKusick CC: Konstantin Belousov , FreeBSD FS , "Julian H. Stacey" , "soralx@cydem.org" Subject: Re: [bug] fsck refuses to repair damaged UFS using backup superblock Thread-Topic: [bug] fsck refuses to repair damaged UFS using backup superblock Thread-Index: AQHUhJlTgUa5G9TQ8USwP5697EmSSKVgmAwVgAA76wCAAAV0gIADj+iA////dAE= Date: Wed, 28 Nov 2018 01:31:23 +0000 Message-ID: References: , <201811280125.wAS1PZAG034119@chez.mckusick.com> In-Reply-To: <201811280125.wAS1PZAG034119@chez.mckusick.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca; x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; YTOPR0101MB1084; 6:4QIv5fKmO4rvDmWTJEpR7q79X/UgOXHTlrjA9YN/J51LdADxAvQxE67yxRFbD4KFtJj7auPnthYrrNiIi4wMU1f0BTmCRP8tKi1VrwkqgUFsayjKaMhMLTXkYun7GoP8PbC7FKCO2wnvDmvflxogOkZZnebkKCkzlYrYYz/R7gEyZXS3TvoJCfAV1TUEuFQC7PN3UAI0efBLGucUe/5q0M7yUU09hLB6D8Z2hBNMWQwyqxqbTusUbTPMRfxP06bWztkUFZ79eVHS4BNiUonPgcqAHeL6GEfcsfeDY58VnyC5uhRi6IC/ogdTBjcYgsbFmY0T9yBKq73silx2hn1vnqSqpQUbqjZy2b1vx7mHjOWfSsFnoyqbU9zGkzCs0teFNYPQCWg0pnyNRVE0Zg2Yxtyodk10378+3gkS7eMe1wxQyvG9KxjmZEGBIZY5SxacjtmTAd2pUT1o/xKLood21g==; 5:Bbe7hFE86RWSXFYfqrzgxFXvVCms9MTXL18HKeYHXzDmlguFwJvwT3L5LuczmfzaeRZafN8yVWozSQvWSgSgTi+ys4KeioMib5dgWOfbHs7t+jeEerba+QO1MJrAr3Fzn68eY+uZPpphe/ILSfvmuWCQRwA9F73VHWCeTUxgn0k=; 7:cSsZ/p+fhT6RM9qNHKHe5kxETa8DW5rDb5QAE8ZrxRBztpHRdx5DUyXMSpPcGkZGKd5I/0ziDfZglNOFZAuWEgGEExgGUDddaex3NoCPumpqBFpUKfB+1izVdIdULhRKcB70FE/4CUSEvh2N2jEnaQ== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 8302e5c8-1542-4c32-e554-08d654d1350c x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB1084; x-ms-traffictypediagnostic: YTOPR0101MB1084: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231443)(944501410)(52105112)(3002001)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:YTOPR0101MB1084; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB1084; x-forefront-prvs: 0870212862 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(376002)(346002)(366004)(136003)(199004)(189003)(6246003)(76176011)(476003)(74482002)(186003)(11346002)(53936002)(4326008)(446003)(9686003)(86362001)(25786009)(8936002)(55016002)(8676002)(7696005)(6506007)(81166006)(81156014)(54906003)(110136005)(53546011)(102836004)(46003)(39060400002)(316002)(486006)(5660300001)(786003)(14454004)(74316002)(229853002)(305945005)(2906002)(99286004)(14444005)(256004)(478600001)(68736007)(71200400001)(33656002)(71190400001)(561944003)(106356001)(105586002)(97736004)(6436002); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB1084; H:YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: q7rUKud7ruiI1x8x2OLC7L9r/sgsh+SBAnjDmau+6WXplyRjkhG9WFDXcbaGdmaQY6ceNkmiKW58BZyx1GXY6/dysncPx1DlB+GnvAT0JBg9H/H3kR9Ce8GsfFkT1Tszrw+BSsQtcumhpLxzVRf7wMzvHmyHDXrApTl8vZYrE/JBdfuaGwLquuEp2dZZu/edKUlHe0NJHUZMd97c+puIkYs6W56wo50Zv8x6wXNnY6BYtvR1kQnmYeYgrBwqK8zSpD5xnVf+yPtg4imkYDfZf0NW4XGkWm7h0ZIg7Um1qykpmSNUUg0mnRQfz6MTZPaVue9g0lXT/jCXIl6lS6hltiiCioJ00vTvCodA1Wgp0WE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 8302e5c8-1542-4c32-e554-08d654d1350c X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2018 01:31:23.2938 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1084 X-Rspamd-Queue-Id: 6CD48782F0 X-Spamd-Result: default: False [-2.28 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.929,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/17]; NEURAL_HAM_LONG(-0.96)[-0.963,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[uoguelph.ca]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com]; NEURAL_HAM_SHORT(-0.08)[-0.078,0]; RCVD_IN_DNSWL_NONE(0.00)[74.67.107.40.list.dnswl.org : 127.0.3.0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_CC(0.00)[gmail.com] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2018 01:31:32 -0000 Kirk McKusick wrote: >> From: Warner Losh >> Date: Sun, 25 Nov 2018 12:01:45 -0700 >> Subject: Re: [bug] fsck refuses to repair damaged UFS using backup super= block >> To: Kirk McKusick >> Cc: Rick Macklem , FreeBSD FS , >> "Julian H. Stacey" , >> "soralx@cydem.org" >> >> On Sun, Nov 25, 2018, 11:35 AM Kirk McKusick > >>>> From: Rick Macklem >>>> To: "soralx@cydem.org" , >>>> Kirk McKusick >>>> CC: "freebsd-fs@freebsd.org" , >>>> "Julian H. Stacey" >>>> >>>> Subject: Re: [bug] fsck refuses to repair damaged UFS using backup >>> superblock >>>> Date: Sun, 25 Nov 2018 15:25:21 +0000 >>>> >>>> It would be nice if there was a way to override the check and boot >>>> the system. (Is a loader tunable reasonable for this?) >>>> >>>> rick >>> >>> Rather than adding a loader tunable to override the check (which people >>> would have to track down in the midst of a crisis), it might be better >>> to simply have the loader print a warning when there is a mismatch and >>> proceed to try using the filesystem. If successful, an fsck could then >>> be run to try and clean it up. Does this seem reasonable? >>> >>> Kirk McKusick >> >> Yes. You have a big chicken and egg issue otherwise. And not booting >> seems like an extreme overreaction to a bad checksum. I can think >> of no use case where you'd want it. Let's let people ask for it >> with a decent use case before we do anything more than print a >> warning and soldier on... >> >> Warner > >My proposal is that when a filesystem is being mounted read-only >that superblock check-hash failures should be warnings only. This >is true not just at boot time, but always. We should probably set >the FS_NEEDSFSCK flag so that if it is updated to read-write a >warning will get printed. Since booting always starts up with >the filesystem in read-only mode, this should solve the booting >problem. Does this seem like a sensible solution? Is there a concern that a read-only mount of a corrupted non-root fs could = cause the system to panic/crash? For booting, I think Warner is correct to suggest "print a warning and sold= ier on..". However, once the system has booted (maybe only single user), I'd think it = would be better to fail the mount at least until an fsck is done on it than allow= it to be mounted read-only, unless there is no risk that doing this mount could caus= e a crash/panic. Obviously, just my opinion given that I don't know UFS. rick