Date: Fri, 13 Mar 2020 17:08:08 +0100 From: Polytropon <freebsd@edvax.de> To: freebsd@dreamchaser.org Cc: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: "directory not empty", "no such file or directory" errors on upgrade Message-ID: <20200313170808.e9b1f4ad.freebsd@edvax.de> In-Reply-To: <38fde868-7d2b-d396-449b-973ac9c39963@dreamchaser.org> References: <c6e1a79d-2ce9-52a3-9039-d5f3b727cc49@dreamchaser.org> <20200312235749.5e10fb02.freebsd@edvax.de> <38fde868-7d2b-d396-449b-973ac9c39963@dreamchaser.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 13 Mar 2020 07:04:24 -0600, Gary Aitken wrote: > On 3/12/20 4:57 PM, Polytropon wrote: > > On Thu, 12 Mar 2020 13:03:27 -0600, Gary Aitken wrote: > >> Upgrading from 11.2-RELEASE to 11.3-RELEASE > >> > >> The final invoke of freebsd-update install completed with the following > >> messages: > >> > >> ///usr/src/sys/pc98/include/acpica_machdep.h no such file or directory > >> rmdir: ///usr/src/contrib/ofed/usr.lib directory not empty > >> rmdir: ///usr/src/contrib/ofed/usr.bin directory not empty > >> rmdir: ///usr/src/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer directory not empty > >> rmdir: ///usr/src/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer directory not empty > >> > >> The upgraded system has no > >> /usr/src/sys/pc98/ directory > >> > >> The files in > >> /usr/src/contrib/ofed/usr.lib > >> /usr/src/contrib/ofed/usr.bin > >> /usr/src/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer > >> /usr/src/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer > >> > >> appear to be old versions left over from the original 11.2 install > >> > >> Hints on the proper way to fix this? > > > > When I read such messages, the first thing that comes to mind > > is filesystem inconsistency. Reboot into single-user mode and > > run a forced (!) fsck on all file systems, maybe repeat it if > > needed. > > fsck reported all clean. Okay - that would have been the most obvious problem. :-) > > You probably don't have > > > > background_fsck="NO" > > > > in your /etc/rc.conf which in my opinion should be the default > > setting (instead of YES). See "man 8 fsck" for further options > > that might be needed. > > Thanks for the reminder; I used to have it set but on this rebuilt- > after-a-crash system lost it. As I said, I don't understand why this isn't the default. A faster boot process into a potentially unstable filesystem environment does not justify delegating low-level filesystem check (and repair, and if needed, user interaction) into the background. > > Things like "directory not empty" can also be due to files that > > haven't been removed. This is possible if the schg (immutable) > > flag has been set for a file; use "chflags noschg <file>"; see > > "man 1 chflags" for details. > > > > First step: Always rule out the obvious. ;-) > > The remaining question is: > Are those directories supposed to be repopulated > with more recent versions? Or should they simply be removed? > If they need to be repopulated, how does one repopulate them? You can entirely remove /usr/src. Depending on your source retrieval method (freebsd-update, the "src" component, or a normal SVN checkout) will create any directories beneath /usr/src as they are needed. Probably a fresh new start for /usr/src would be a good idea. A way to identify offending files that stop you from removing /usr/src completely could be the following: # ls -Rlao /usr/src | grep "schg" However, it's rather untypical to have immutable files in the /usr/src subtree; they did at least sometimes appear (in the past) in /usr/obj. It could be possible that some other tool wrote to /usr/src and modified things it wasn't supposed to touch... -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200313170808.e9b1f4ad.freebsd>