On Monday 23 January 2006 11:09 am, Gary Wallace <[EMAIL PROTECTED]> 
wrote:
> I am running FC4 64-bit on a R3240US laptop.  The system is a dual boot
> with XP.  I am have problems running out of disk space.  df -h shows
> that I have 33GB assigned to /dev/mapper/VolGroup00-LogVol00 and that I
> am using 31GB.  I do not think I am using that much as I have very
> little on the system besides FC4.  When a trace through the installation
> to find sources of disk usage I find a /var/log/lastlog is 1.2 TB
> (impossible).  Could this be my problem?  Anyone know how to fix this?

Hi, Gary.

I also have a 3240 and I've got a 60GB drive.  I'll assume yours is also.

If "df" shows that you're using 31GB, then the filesystem has 31GB of space 
allocated. :-(  While log files are common culprits; they should be 
automatically rotated so that they never consume more than a few MB.  
However, running "man lastlog" came up with the following:

> The lastlog file is a database which contains info on the last login of
> each user. You should not rotate it. It is a sparse file, so its size on
> the disk is much smaller than the one shown by ls -l (which can indicate a
> really big file if you have a high UID). You can display its real size
> with ls -s.

The "-s" option to ls shows the actual amount of disk space and not what the 
size field of the inode contains.  On my system, I get:

bash$ ls -ls lastlog
32 -rw-r--r--  1 root tty 292876 2006-01-21 12:38 lastlog
bash$

As you can see, only 32K is actually used.

As a general sysadmin tool, I run the following command every morning at 
4:15am (when I'm not using the box) to gather information.  I can then skim 
through the file to find size information without having to wait for it to 
run interactively:

#!/bin/sh
PATH=/bin:/usr/bin
du -k /[!ap]* | sort -rn -o /allsizes

The du command uses the same disk space number as "ls -s", but it adds up 
all of the space in the listed directories so that you can see a total.  
The use of the wildcard on the du command prevents it from scanning files 
and directories in the root directory that start with "a" or "p".  On my 
machine, this means /allsizes, /alltimes, and /allfiles (I have other 
scripts that create those files and I don't want them to appear in this 
listing).  It also leaves out /proc (since /proc doesn't take up any space 
at all).

The result is a list of directories and how much space they contain.  Here 
are the first few lines from my file:

bash$ head /allsizes
17469621        /home
17469191        /home/crash
7804386 /home/crash/.Azureus
7802870 /home/crash/.Azureus/downloads
5811030 /usr
5262649 /vmware
4274292 /home/crash/.Azureus/downloads/RPG
3652071 /home/crash/Xfer
3528578 /home/crash/.Azureus/downloads/iso
3419749 /home/crash/public_html
bash$

My normal user login on this machine is "crash", hence the reference to my 
home directory.  (I didn't realize my public_html was so large.  Time to go 
looking for fat to trim.)  If you wanted to ignore your home directory, 
just do a grep on "/home/crash" and tell it to print the lines that DO NOT 
match the search pattern:

bash$ grep -v /home/crash /allsizes
5811030 /usr
5262649 /vmware
...
bash$

Hope that helps.
-- 
Frank J. Edwards
Edwards & Edwards Consulting, LLC
Voice: (813) 996-7954
Email: [EMAIL PROTECTED]
Large Attachments To: [EMAIL PROTECTED]

Attachment: pgpMh3HGcw5lv.pgp
Description: PGP signature

_______________________________________________
LinuxR3000 mailing list
[email protected]
http://lists.pcxperience.com/cgi-bin/mailman/listinfo/linuxr3000
Wiki at http://prinsig.se/weekee/

Reply via email to