Date: Wed, 28 Nov 2018 15:44:40 +0000 From: Rick Macklem <rmacklem@uoguelph.ca> To: Kirk McKusick <mckusick@mckusick.com> Cc: Warner Losh <imp@bsdimp.com>, Konstantin Belousov <kostikbel@gmail.com>, FreeBSD FS <freebsd-fs@freebsd.org>, "Julian H. Stacey" <jhs@berklix.com>, "soralx@cydem.org" <soralx@cydem.org> Subject: Re: [bug] fsck refuses to repair damaged UFS using backup superblock Message-ID: <YTOPR0101MB11621E634B328D96D1B1B123DDD10@YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM> In-Reply-To: <201811280759.wAS7xabP040527@chez.mckusick.com> References: <YTOPR0101MB11624C6EA47C4AA2F14945A1DDD10@YTOPR0101MB1162.CANPRD01.PROD.OUTLOOK.COM>, <201811280759.wAS7xabP040527@chez.mckusick.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YTOPR0101MB11621E634B328D96D1B1B123DDD10>