• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 504
  • Last Modified:

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
0
mraible
Asked:
mraible
  • 5
  • 4
  • 2
  • +2
1 Solution
 
joolsCommented:
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
 
mraibleAuthor Commented:
Is this a problem with partition sizes?
0
 
moto-moiCommented:
Yes, your disk(s) is(are) full :)

try df -h in a console, and see for yourself ;)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
mraibleAuthor Commented:
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
 
joolsCommented:
forgot to say, cfdisk does not come with RH7.3 but a simple search in rpmfind.net should locate a suitable copy.
0
 
joolsCommented:
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
 
mraibleAuthor Commented:
LVM?? Linux Virtual Machine?  a.k.a you run Linux from Windows?
0
 
joolsCommented:
Logical Volume Manager :-)

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

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

0
 
dkloesCommented:
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
 
MFCRichCommented:
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
 
mraibleAuthor Commented:
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
 
joolsCommented:
Very kind, if you accept as answer, I'll pick up when I'm next online.
0
 
dkloesCommented:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 5
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now