Solved

Red Hat 7.3: No space left on device

Posted on 2002-07-23
13
465 Views
Last Modified: 2013-12-15
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
0
Comment
Question by:mraible
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 19

Expert Comment

by:jools
ID: 7172369
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
0
 
LVL 1

Author Comment

by:mraible
ID: 7172387
Is this a problem with partition sizes?
0
 

Expert Comment

by:moto-moi
ID: 7172738
Yes, your disk(s) is(are) full :)

try df -h in a console, and see for yourself ;)
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 1

Author Comment

by:mraible
ID: 7172769
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 ;-)
0
 
LVL 19

Expert Comment

by:jools
ID: 7172772
forgot to say, cfdisk does not come with RH7.3 but a simple search in rpmfind.net should locate a suitable copy.
0
 
LVL 19

Accepted Solution

by:
jools earned 100 total points
ID: 7172789
Loads of space in /usr so that would be quick and easy!

Just for info, if I were to resize my partitions (and I would only do this if I had the space!) I would do something like;

SCENARIO#1

o Full Backup

o Boot Single user

o Identify any free space. May need to specify the device file for some controllers but generally defaults to showing all info.
  # fdisk -l

o Use some of the free space to create a spare partition.
  # cfdisk /dev/hda (or whatever!)

o Mount it.
  # mkfs -t ext2 /dev/hda<p> (where <p> is the new partition #)
  # mkdir /newvar
  # mount /dev/hda<p> /newvar

o Copy the data across.
  # cd /var
  # find . -print | cpio -puvdm /newvar

o Modify the /et/fstab file to mount the new partition as /var.

SCENARIO#2
o Identify any free space. May need to specify the device file for some controllers but generally defaults to showing all info.
  # fdisk -l

o Use some of the free space to create a spare partition.
  # cfdisk /dev/hda (or whatever!)


o Mount it.
  # mkfs -t ext2 /dev/hda<p> (where <p> is the new partition #)
  # mkdir /var/cvs # Or whatever you like!
  # mount /dev/hda<p> /var/cvs (SEE BELOW)

o Modify the /et/fstab file to mount the new partition as /var.

Install the software to the new mount point, don't forget to remove the old data Before you mount the parition over the directory.

Just some ideas.

I use LVM which allows me to resize partitions quite easily but thats another story.

J
0
 
LVL 1

Author Comment

by:mraible
ID: 7172942
LVM?? Linux Virtual Machine?  a.k.a you run Linux from Windows?
0
 
LVL 19

Expert Comment

by:jools
ID: 7173002
Logical Volume Manager :-)

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

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

0
 
LVL 1

Expert Comment

by:dkloes
ID: 7173100
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
0
 
LVL 4

Expert Comment

by:MFCRich
ID: 7174135
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.
0
 
LVL 1

Author Comment

by:mraible
ID: 7178731
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.
0
 
LVL 19

Expert Comment

by:jools
ID: 7179730
Very kind, if you accept as answer, I'll pick up when I'm next online.
0
 
LVL 1

Expert Comment

by:dkloes
ID: 7179768
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.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question