Link to home
Start Free TrialLog in
Avatar of mraible
mraible

asked on

Red Hat 7.3: No space left on device

I am using RedHat 7.3 and it's installed on a 20 Gig harddrive with the default settings.

I keep getting this error - I noticed this a few times a week ago when adding files to my CVS repository, but it went away when I added files slowly.

[root@drevil onpoint]# jar -xvf onpoint.war
  created: META-INF/
java.io.IOException: No space left on device
        at java.io.FileOutputStream.writeBytes(Native Method)
        at java.io.FileOutputStream.write(FileOutputStream.java:257)
        at sun.tools.jar.Main.extractFile(Main.java:716)
        at sun.tools.jar.Main.extract(Main.java:678)
        at sun.tools.jar.Main.run(Main.java:190)
        at sun.tools.jar.Main.main(Main.java:904)

I'm a linux rookie, but a Windows expert.  I think the problem is that my partition for /var or /opt is not big enough.  Those are the two partitions where I've received those errors.

If this is the problem, is there a command-line partitioning tool to resize my partitions?

Thanks,

Matt
Avatar of Julian Parker
Julian Parker
Flag of United Kingdom of Great Britain and Northern Ireland image

You may have difficulty resizing partitions on the fly, one way would be to boot the system into single user and use cfdisk to create larger partitions and then move the data over to them.

I would suggest that a backup would help before you start.

J
Avatar of mraible
mraible

ASKER

Is this a problem with partition sizes?
Yes, your disk(s) is(are) full :)

try df -h in a console, and see for yourself ;)
Avatar of mraible

ASKER

Filesystem            Size  Used Avail Use% Mounted on
/dev/hda5             372M  195M  158M  56% /
/dev/hda1              45M   14M   30M  31% /boot
/dev/hda3             4.6G  108M  4.2G   3% /home
none                  125M     0  124M   0% /dev/shm
/dev/hda2              13G  2.2G  9.8G  18% /usr
/dev/hda7             251M  251M     0 100% /var

The rpm for tomcat 4.x installs it in /var, and it seams that the rpm for Darwin Streaming Server does this as well.  

Simple solution - install the binary versions in /usr/local

Complex solution - resize partitions.

If you suggest complex solution, please post detailed instructions how to resize /var

I'm not worried about killing the machine, I just installed everything last week.  But I wouldn't mind NOT destroying everything ;-)
forgot to say, cfdisk does not come with RH7.3 but a simple search in rpmfind.net should locate a suitable copy.
ASKER CERTIFIED SOLUTION
Avatar of Julian Parker
Julian Parker
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mraible

ASKER

LVM?? Linux Virtual Machine?  a.k.a you run Linux from Windows?
Logical Volume Manager :-)

See http://www.sistina.com/products_lvm.htm

This is a very good product with familiarities with HPUX's LVM.

You could use a soft (symbolic) link.  This would allow you to physically locate files that are in /var in /usr.  Then a symbolic link would be a logical link to those files.  In essence, the system would think the files are still located in /var and you would not have to resize.

Let's say you have a directory /var/xxx (tomcat or Darwin, for example)
Make sure none of the files in /var/xxx are in use by an application
cp -R /var/xxx /usr
rm -rf /var/xxx
ln -s /usr/xxx /var

Symbolic links are identified with an "l" in the first permission bit and a -> in the name to indicate where the files are physically located.
You would see xxx -> /usr/xxx in a directory listing of /var
If you run Redhat's updating program (rhnsd) you will probably find that it is resonsible for filling your /var partition. You could turn it off and then run manually when you feel you need to.

Find the directory it stores the RPMs in (it'll have lots of files with '.rpm' and '.hdr' extensions). Save any RPMs you might be interested in and then remove all these files. That will free up 100's of MB.
Avatar of mraible

ASKER

I found 160 MB worth of file in /var/cache!  So I deleted those and moved Tomcat to /usr/local.

Thanks for all your help.  I'll reward points to jools since that's where a lot of insight came from.
Very kind, if you accept as answer, I'll pick up when I'm next online.
You do need to spend more time on this.  If the problem resulted from cached files, you will run into the same problem again.  Sounds like you found a quick but not final solution.