Solved

Red Hat 7.3: No space left on device

Posted on 2002-07-23
13
458 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
 
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
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.

 
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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux Mint 18 31 77
Linux as a middle box 7 64
gdb doesn't stop on breakpoint 2 50
Check if a filw is immutable for a certain amount of time 6 48
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). …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now