Can not remove directory
Robert Watson
rwatson at freebsd.org
Thu Oct 9 20:50:04 PDT 2003
On Thu, 9 Oct 2003, Boris Kovalenko wrote:
> Can not remove directory /usr/obj/usr/src/gnu/usr.bin/cc/cc1 rm:
> /usr/obj/usr/src/gnu/usr.bin/cc/cc1: Directory not empty
What's going on is that the background file system checker hasn't adjusted
down the reference counts for the directory in question. I've run into
this on a couple of occasions, and Kirk and I have bantered about possible
fixes. Basically, the only inconsistencies permitted by soft updates are
freed space being unavailable for reuse, and elevated reference counts.
The background file system checker walks through the file system metadata
in a snapshot to move blocks to the free list and adjust reference counts.
The problem will clear by itself once bgfsck catches up; as a workaround,
just move it out of the way somewhere in the same file system until bgfsck
is done. Or you can manually clear up the reference if you're willing to
risk it :-). A normal fsck in single-user would also clear it up.
Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org Network Associates Laboratories
>
> bash-2.05b# pwd; ls -la
> /usr/obj/usr/src/gnu/usr.bin/cc/cc1
> total 4
> drwxr-xr-x 2 root wheel 512 Oct 9 08:54 .
> drwxr-xr-x 13 root wheel 512 Oct 9 08:54 ..
>
> bash-2.05b# pwd; ls -la
> /usr/obj/usr/src/gnu/usr.bin/cc
> total 26
> drwxr-xr-x 13 root wheel 512 Oct 9 08:54 .
> drwxr-xr-x 21 root wheel 512 Oct 9 11:23 ..
> drwxr-xr-x 2 root wheel 512 Oct 9 08:55 c++
> drwxr-xr-x 2 root wheel 512 Oct 9 08:55 c++filt
> drwxr-xr-x 2 root wheel 512 Oct 9 08:54 cc1
> drwxr-xr-x 2 root wheel 512 Oct 9 08:55 cc1obj
> drwxr-xr-x 2 root wheel 1024 Oct 9 08:55 cc1plus
> drwxr-xr-x 2 root wheel 512 Oct 9 08:55 cpp
> drwxr-xr-x 2 root wheel 512 Oct 9 08:55 cpp0
> drwxr-xr-x 2 root wheel 512 Sep 26 10:34 doc
> drwxr-xr-x 2 root wheel 512 Oct 9 08:55 gcov
> drwxr-xr-x 2 root wheel 512 Oct 9 08:55 protoize
> drwxr-xr-x 2 root wheel 512 Oct 9 08:55 tradcpp0
>
> What is wrong? Current system is 5.1-RELEASE-p8
>
> Yours truly,
> Boris Kovalenko
>
>
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
>
More information about the freebsd-current
mailing list