LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Out of Memory /usr/local (https://www.linuxquestions.org/questions/linux-newbie-8/out-of-memory-usr-local-626207/)

npegus 03-06-2008 01:12 PM

Out of Memory /usr/local
 
Ive just run out of memory on the /usr/local folder of my redhat linux install, /usr indicates there are 4.5 Gigs free but the usr/local folder only contains 80.8 megs so I am at a loss as to why usr/local also indicates there is 0 space available. I determined the space available by checking the properties of each folder. Can anyone point me in the right direction to understand how this is possible and how to reclaim the space I imagine exists but is inaccessible for some reason

Thanks.

jailbait 03-06-2008 01:19 PM

The first thing that I would do is run fsck against the /usr partition to check the file system for errors.

----------------------
Steve Stites

Brian1 03-06-2008 03:35 PM

What does the output from the command ' df ' show?

Brian

npegus 03-07-2008 09:20 AM

re : out of memory on /usr/local
 
the df command result is

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 1027800 812808 162784 84% /
/dev/sda1 101089 9335 86535 10% /boot
/dev/sda2 2063536 33300 1925412 2% /home
none 256764 0 256764 0% /dev/shm
/dev/sdb2 10325780 5057096 4744164 52% /usr
/dev/sdb3 4087584 4081968 0 100% /usr/local
/dev/sdb1 2055600 383228 1567952 20% /var

so again system seams to be indicating there is no space available but the properties of the local folder indicates only 80 megs are used.....?????

...not sure if i continued this thread correctly by "replying" to my post..

AlucardZero 03-07-2008 09:24 AM

well, /usr/local certainly is full. did you run the fsck?

npegus 03-07-2008 09:24 AM

I tried running that fsck command but got the following so aborted

[root@tdspace root]# fsck
fsck 1.32 (09-Nov-2002)
e2fsck 1.32 (09-Nov-2002)
/dev/sda3 is mounted.

WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)?

jailbait 03-07-2008 12:09 PM

Quote:

Originally Posted by npegus (Post 3081166)

WARNING!!! Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Boot a live CD and run fsck from the live CD. Also is the file system ext2? If it is ext3 then you need to do:

fsck -t ext3 /dev/sda3

--------------------------
Steve Stites

michaelk 03-07-2008 12:51 PM

Quote:

/dev/sdb2 10325780 5057096 4744164 52% /usr
/dev/sdb3 4087584 4081968 0 100% /usr/local
/usr and /usr/local are two different partitions so used/free space in /usr does not have any bearing on used/free space in /usr/local. Since /usr/local contains several subdirectories at first glance 80MB used sounds a little light but I have know way of telling what you actually have installed.

Directories in /usr/local:
bin
games
include
lib
man
sbin
share
src

npegus 03-07-2008 02:02 PM

I was attempting to setup a backup which was writting to the usr/local folder before this happened I did run the backup a few times but expected it to simply overwrite the contents of the backup folder. I had since deleted the backup folder which of cours has not helped...

Brian1 03-07-2008 03:16 PM

Lets have a better look at df output. Use the command ' df -h ' Post the output.
Next post output of ' /sbin/fdisk -l ' needs to be run as root.

Brian

LasseW 03-08-2008 09:11 AM

Exactly how did you determine the space by checking the subdirectories ? Could you post the output of

cd /usr/local
du -sk *

npegus 03-10-2008 08:41 AM

results of df -h and /sbin/fdisk -l
 
Ok I ran df -h these are the results:
[root@tdspace root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 1004M 796M 158M 84% /
/dev/sda1 99M 9.2M 85M 10% /boot
/dev/sda2 2.0G 33M 1.9G 2% /home
none 251M 0 251M 0% /dev/shm
/dev/sdb2 9.9G 4.9G 4.6G 52% /usr
/dev/sdb1 2.0G 368M 1.6G 20% /var
/dev/cdrom 140M 140M 0 100% /mnt/cdrom
/dev/sdb3 3.9G 3.9G 0 100% /usr/local

next I ran /sbin/fdisk -l results are:
[root@tdspace root]# /sbin/fdisk -l

Disk /dev/sda: 9105 MB, 9105050112 bytes
255 heads, 63 sectors/track, 1106 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 274 534 2096482+ 83 Linux
/dev/sda3 535 664 1044225 83 Linux
/dev/sda4 665 1106 3550365 5 Extended
/dev/sda5 665 794 1044193+ 82 Linux swap

Disk /dev/sdb: 18.2 GB, 18210048512 bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 260 2088418+ 83 Linux
/dev/sdb2 261 1566 10490445 83 Linux
/dev/sdb3 1697 2213 4152802+ 83 Linux

npegus 03-10-2008 09:16 AM

Results of du -sk *
 
In /usr/local I ran du -sk * and got the following result:

[root@tdspace local]# du -sk *
4 bin
4 etc
4 games
4 include
4 lib
4 libexec
16 lost+found
87824 pgsql
4 sbin
52 share
4 src
4 testscript2

To check the space on the subdirectories I right clicked the folders and then checked the properties. /usr indicates "free space = 4.5 gigs" and /usr/local is 0...

AlucardZero 03-10-2008 02:12 PM

well, looks like your PostgreSQL install has gone haywire.

LasseW 03-12-2008 11:54 AM

umount /usr/local and then run fsck


All times are GMT -5. The time now is 01:31 AM.