Solved

Red Hat 7.3: No space left on device

Posted on 2002-07-23
13
472 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

717 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