Re: Directory Size problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 29, 2006 at 08:55:11AM -0700, David G. Miller wrote:
> "Dan Track" <dan.track@xxxxxxxxx> wrote:
> 
> >I've got a directory /var/spool/mqueue that is at 3.6G. The problem is
> >that I've deleted everything in the directory but the size reported
> >from du -hs is still reported as 3.6G. I've shutdown all potential
> >sevices that could possibly be using teh directory e.g sendmail,
> >httpd, syslog but it hasn't helped if I run an lsof or fuser against
> >the directory I get no connections listed.
> >
> >Could someone please help me figure this weird problem out.
> Is it the directory itself that still shows 3.6G?  That is, what does ls 
> -lh /var/spool show for the mqueue directory?  Since you've already 
> disabled all of the services that may access the directory, why not nuke 
> it (rm -rf /var/spool/mqueue) and then re-create it?  Just make sure you 
> get the ownership and permissions right.
> 
> If the directory contained a large number of small files, it's possible 
> that it's just taking the file system some time to "catch up."  At a 
> previous job I had to wipe clean a very bushy directory structure with 
> several hundred thousand files between test runs.  If we could, we would 
> put this directory structure on a separate file system since it was 
> faster to unmount it, format it and remount it than it was to rm -rf the 
> directory structure.  Could something like this be going on?
> 
It is my understanding that a directory can become large if it now
contains, or EVER HAS CONTAINED a large number of entries. Once it has grown
it can be shrunk only by deleting and re-creating it. Removing its
contents does not do the trick because it is the directory itself 
that has grown. (remember, in Unix everything is a file... including
directories.)

-- 
---- Fred Smith -- fredex@xxxxxxxxxxxxxxxxxxxxxx -----------------------------
                      The eyes of the Lord are everywhere, 
                    keeping watch on the wicked and the good.
----------------------------- Proverbs 15:3 (niv) -----------------------------

Attachment: pgp6kXTAudm0n.pgp
Description: PGP signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux