LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   no space left in / (https://www.linuxquestions.org/questions/linux-general-1/no-space-left-in-215723/)

fallen26 08-10-2004 06:43 AM

no space left in /
 
Hi All,
i have setup a server in RH9, i have installed postgres and CGI on it, now the problem is the there is no space left in /, how can i increase space in / as i have empty space available in /boot and /tmp. how can i increase space in / as system is not allowing users to create database init.

regards

Asad

rjlee 08-10-2004 07:00 AM

This rather depends on how much space you have available.

If you've just made a clean install, then it may be tidiest to do a new install, repartitioning the hard disks giving more space to the / partition.

Otherwise, you can copy a directory recursively like this:
Code:

cp -rp --no-dereference /var/ /boot
This will create a copy of your /var directory under your /boot partition.
If this completes successfully (and you don't run out of space on /boot!) then you can delete the original /var/ partition with:
Code:

rm -rf /var
And then link /var to the copy (/boot/usr) with:
Code:

ln -h /var /boot/usr
Note: Don't do this with /usr unless you are very careful. Programs like the “ln” command live under /usr and deleting them while running could cause all sorts of problems.

Also, make sure that the directory you're linking isn't mounted as a seperate partition.

You may also be able to clean up some space by running
Code:

strip /usr/bin/*
to remove unused code and resources from your system executables.

You can gain some more space by using gzexe to compress executable files. They will uncompress into memory when you try to run them, so you take both a performance hit and a RAM hit.

If you have free space in /tmp and RAM to space, then you could try deleting everything under /tmp, unmounting it, remounting /tmp as a tmpfs (in-memory) filesystem (see this thread on tmpfs), and remounting the /tmp partition somewhere where you need more space.

Hope that helps,

— Robert J. Lee


All times are GMT -5. The time now is 07:54 AM.