From owner-freebsd-fs@freebsd.org Wed Nov 28 15:44:43 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 18D701157FAE for ; Wed, 28 Nov 2018 15:44:43 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660044.outbound.protection.outlook.com [40.107.66.44]) (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 1EE6C799D6 for ; Wed, 28 Nov 2018 15:44:41 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM (52.132.50.155) by YTOPR0101MB1164.CANPRD01.PROD.OUTLOOK.COM (52.132.50.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1339.21; Wed, 28 Nov 2018 15:44:40 +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.050; Wed, 28 Nov 2018 15:44:40 +0000 From: Rick Macklem To: Kirk McKusick CC: Warner Losh , 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////dAGAAG6iAIAAgAKN Date: Wed, 28 Nov 2018 15:44:40 +0000 Message-ID: References: , <201811280759.wAS7xabP040527@chez.mckusick.com> In-Reply-To: <201811280759.wAS7xabP040527@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; YTOPR0101MB1164; 6:DpSh8z3ypsp3lralEXofLJCwAs1e4eemqwlAhkmwKueVKta2YSma4zWzzobpP0vW+mg//dq3n9ge5F/JwHwvI8J0SEu3xza4lAb6t8WLLOMaFhYNpRkG11TFf3Ugy0A8qf2Zdl/5/LITl/kmLFMMYfy6IMIO81rtwWMp00OJBqeSIOFpXaRWk38TXK/A2cIqCuR6bCMuwUIayr0BBu6+bd7oj9lItW5lh9N8rat5bmg0rhnaeWaD4zNw6Rwx2w748l5GTc39AtOPEli9etv0Abghlut22RDEmktKf8Uzf5aSASfFf9thmLwH3PyztPimIO+XYlEQcaSYus2TI/gkcWVigifcHpMtrIfjIuhxDnUiKdemSUV2W2Me45rsz+ysu+wpWkWViSGed+M31n51C95BJBDEZlLHDV7y23vstTkGWbIOiY5hInvfsReuPtTDl4lQ9/SL5jQgis5KnzBxRA==; 5:RqWQnKLlZqO3H8OK4qT5mUeGBzthp5qUJpwYw+qdM7vsz/k9taUzirKt/6EdcPZrrl8UGCSLKFwsPZb/jgsr1UelUllJMl3WYSCsbDgxLivivX5m5sxMwYO/HSW4+3RdU0bzxcg9/qCSys5rHXAHAnWipC9AZVZziW6ZKE+lDpQ=; 7:kBZdPOg2qfnqizpxIqz1K3n7DZ6+iIE6xEzW+yvDVHCiOLHfmFJCh+jvSqBS2jFAkQAnRpW2G/cBdM5YweVKbMPFbO90LecO4rsLtMmNGzExTcIIUbaUMnY/Es21AvGRZQ1N4mukt8qzKfdTdDKRfA== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 442faf51-957a-42f4-8f39-08d6554868b1 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:YTOPR0101MB1164; x-ms-traffictypediagnostic: YTOPR0101MB1164: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(5005006)(8121501046)(3231443)(999002)(944501410)(52105112)(93006095)(93001095)(3002001)(10201501046)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:YTOPR0101MB1164; BCL:0; PCL:0; RULEID:; SRVR:YTOPR0101MB1164; x-forefront-prvs: 0870212862 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(366004)(346002)(136003)(376002)(189003)(199004)(2906002)(99286004)(86362001)(71190400001)(71200400001)(14454004)(316002)(476003)(55016002)(6506007)(81166006)(9686003)(81156014)(486006)(305945005)(256004)(46003)(14444005)(229853002)(8676002)(478600001)(8936002)(68736007)(186003)(6916009)(106356001)(105586002)(25786009)(561944003)(33656002)(5660300001)(6436002)(6246003)(76176011)(53936002)(97736004)(786003)(74316002)(4326008)(102836004)(54906003)(7696005)(39060400002)(74482002)(446003)(11346002); DIR:OUT; SFP:1101; SCL:1; SRVR:YTOPR0101MB1164; H:YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-microsoft-antispam-message-info: rVDqRhshi8d2WKBTBUz17FuwJWV0SqiVeKOkdhPnZyGCk9pVUxC80KbTIXHrMwyfZSZ5xChxgnh9ILFjO1zRGxy0SSgHPHMpTwoH29L6FpZ8H1WBLGh5HzF4fJqeLI0QTzwyGRHDqGvxrbybwqylBePZkkZNiPbYTEKSnmJyZDAY2fbxs/70Cmc236mJ8fV+mMki4UcmnWmpsUWZb3xpCnofAwP7UxAPIuDEvkak9oLXvq1Lpjwk0iqUBTFLL7tOnA9rWFmZwt+SXHQoYPfIPRaKYkoeo7WaTY9VGiKYJSfAm2SVlQBnj17FghPrJcLvbJEfFBfphcVzHEmt/W53S9j7Adpl2+Bi1qNgRr48QZ8= 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: 442faf51-957a-42f4-8f39-08d6554868b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2018 15:44:40.1196 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTOPR0101MB1164 X-Rspamd-Queue-Id: 1EE6C799D6 X-Spamd-Result: default: False [-2.13 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.926,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.961,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)[]; NEURAL_SPAM_SHORT(0.07)[0.065,0]; MX_GOOD(-0.01)[cached: mx2.hc184-76.ca.iphmx.com]; RCVD_IN_DNSWL_NONE(0.00)[44.66.107.40.list.dnswl.org : 127.0.3.0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[] 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 15:44:43 -0000 Kirk McKusick wrote: [stuff snipped] I wrote: >> >> For booting, I think Warner is correct to suggest "print a warning >> and soldier 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 cause >> a crash/panic. Oops, I realize I missed a key phrase in the above (run on) sentence. The key phrase was "for file systems other than root". I was basically trying to say what bde@ said. >> Obviously, just my opinion given that I don't know UFS. >> >> rick > >Since the initial boot does a read-only mount, my proposal will have >the effect that the boot will "print a warning and soldier on..". > >The root filesystem has to be intact enough to be able to read the >boot code and one or more kernel and configuration files from it. >If it is able to get that far, it will most likely be able to >read-only mount it and get /sbin/init and /bin/sh off it to get to >a single-user prompt. > >By setting the FS_NEEDSFSCK flag on the filesystem, a full fsck >will be run as part of trying to come up and will fail to single >user if the fsck is not successful. Yep. Certainly sounds reasonable to me for the root fs. I had intended the above to refer to other file systems than root. rick