LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 12-16-2004, 07:15 AM   #1
xfgao
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Rep: Reputation: 0
Angry No space left on device


Hi,

I am using RH9 with RTAI. just recently, I had a problem with " No space left on device" when I wanted to scopy some directories/files.

I then deleted some enough directories, wished to have solved the space problem, but it didn’t. It still says " No space left on device” when I try to scopy files from other machine.

Would some one there give me some advices? Please.
( I only used part of the HD space, not all of the 10GB, can I repartition to increase the space?
)

Thanks in advance.

Xiaofeng


Followings are the information:
>>>>>

[root@xg-nist src]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 3826584 3672496 0 100% /
/dev/hda1 101089 10807 85063 12% /boot
none 30760 0 30760 0% /dev/shm
[root@xg-nist src]# fdisk -l

Disk /dev/hda: 10.1 GB, 10110320640 bytes
255 heads, 63 sectors/track, 1229 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 497 3887730 83 Linux
/dev/hda3 498 529 257040 82 Linux swap

[root@xg-nist src]# more /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0


[root@xg-nist src]# parted
GNU Parted 1.6.3
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Using /dev/hda
Information: The operating system thinks the geometry on /dev/hda is 1229/255/63. Therefore, cylinder 1024 ends at 8032.499M.
(parted) print
Disk geometry for /dev/hda: 0.000-9641.953 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 101.975 primary ext3 boot
2 101.975 3898.586 primary ext3
3 3898.586 4149.602 primary linux-swap
 
Old 12-16-2004, 12:56 PM   #2
jhibbets
Red Hat
 
Registered: Sep 2003
Location: Raleigh, NC
Distribution: Red Hat Enterprise Linux v 2.1, v 3, v 4
Posts: 174

Rep: Reputation: 30
My best guess in this situation is that you are going to have to remove some unwanted/un-needed files. Perhaps some logs files in /var/log or temp files in /tmp. I'm assuming that after you reboot, you have the same problem and no file cleaning is performed on the system. Another thing to consider is your log rotate, sometimes,log files fill up fast (depending on server use) and that can be a culprit.

How did it so full in the first place? Use:
cd /;du -h | less
to help detemine where the bulk of your data exists. If your disk is filling up quickly you may want to consider adding additional hard disks. You most likely won't be able to grow your filesystem unless you used LVM during installation. Otherwise, you should be able to add a disk and copy partitions over, like /home, to your new disk. This can be tricky, but I think I wrote something about this which I will have to dig up (because I've done this before).

Another thing...until you free up some space, I think you'll be stuck with some things, you won't be able to do much as you probably already know. The kernel will reserve enough space for the system to run, particularly RAM, but I believe there is some disk space reserved as well.
 
Old 12-17-2004, 05:37 AM   #3
xfgao
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Hi, jhibbets

many thanks.

I had Drama (from AAO) software installed some time ago. When new release is available, I wanted to update, i.e install the new version.
during un-taring the drama.tar, I had the "No space" error.

Yesterday, I managed to delete one user, which gave me some space back.

mce@xg-nist />df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 3826584 3618684 13516 100% /
/dev/hda1 101089 10807 85063 12% /boot
none 30760 0 30760 0% /dev/shm

I can do something now.

I checked /var/log directory
du -h --max-depth=1

4.0K ./log/vbox
3.7M ./log/cups
24K ./log/gdm
5.8M ./log

am I able to delete some of them? Also, is there any command Tool to cleanup the space like Window's Disk Defragmenter?


"you should be able to add a disk and copy partitions over, like /home, to your new disk. This can be tricky, but I think I wrote something about this which I will have to dig up (because I've done this before)."

--- I would be grateful if you can pass this to me. I don't know if "parted command can be used after I login linux as root.



Cheers

Xiaofeng
 
Old 12-17-2004, 09:13 AM   #4
cormander
Member
 
Registered: Dec 2004
Location: Hawaii
Distribution: Fedora & CentOS
Posts: 72

Rep: Reputation: 15
You might want to consider installing the quota RPM, if you have a lot of users on your system:

http://rpm.pbone.net/index.php3/stat....i386.rpm.html

This is a great tool for limiting the amount of disk space people can use, so there won't be a single user who kills you on disk space.

-Corey
 
Old 12-20-2004, 03:54 AM   #5
xfgao
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
hi, Cormander

thanks.

I don't have many users on this PC.

Cheers

Xiaofeng
 
Old 12-22-2004, 03:33 PM   #6
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Quote:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 3826584 3618684 13516 100% /
Your one and only root partition is full. First thing you could do is examine rpm --query --all --last | less output and uninstall unneeded software packages with rpm --erase or redhat-config-packages. That would free up space. Another thing you can do is add another partition to your system and e.g. mount it on /usr and move everything from /usr onto that new partition. Check out du -h /usr to see how much space is occupied there.
 
Old 12-23-2004, 03:10 AM   #7
xfgao
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Hello Misc

many thanks

Seasons greeting
 
Old 12-23-2004, 12:07 PM   #8
ldp
Member
 
Registered: Apr 2004
Location: Belgium Antwerpen
Distribution: slackware - knoppix
Posts: 141

Rep: Reputation: 18
Hello,

I have the same problem: I cannot move two big iso files from my /tmp directory because this directory is on the / partition which uses 96% of it's allowed space.

root@cthulhu:/mnt/hdb# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 3835956 3489940 148016 96% /
/dev/hda3 3835956 267268 3370688 8% /home
/dev/hda4 4154912 138988 3801460 4% /usr/local
/dev/hdb1 381138 8240 353220 3% /mnt/hdb

I can't copy it anywhere, not even to the partitions which have enough free space.

Thus I would be interested in finding a howto on moving a subfolder from root like "opt" and/or "var" and/or "tmp" to a new partition on the hdb disk. But I don't think that it's as simple as: copy the subdir to the new partion and then adapt the /etc/fstab ?? or is it that simple?? Anybody who can help out?

Thanks!

Lieven
 
Old 12-23-2004, 12:26 PM   #9
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Quote:
I have the same problem: I cannot move two big iso files from my /tmp directory because this directory is on the / partition which uses 96% of it's allowed space.

root@cthulhu:/mnt/hdb# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 3835956 3489940 148016 96% /
/dev/hda3 3835956 267268 3370688 8% /home
/dev/hda4 4154912 138988 3801460 4% /usr/local

/dev/hdb1 381138 8240 353220 3% /mnt/hdb

I can't copy it anywhere, not even to the partitions which have enough free space.
Why not? /home and /usr/local have enough free space. Surely you can move the iso files to those partitions, e.g. /home/data.
Quote:
Thus I would be interested in finding a howto on moving a subfolder from root like "opt" and/or "var" and/or "tmp" to a new partition on the hdb disk. But I don't think that it's as simple as: copy the subdir to the new partion and then adapt the /etc/fstab ?? or is it that simple?? Anybody who can help out?
It's simple as that. You enter run-level 1 (or if possible, boot into rescue mode), then cp -a a sub directory onto a new partition, remove the files in the old sub dir, update fstab, mount the new partition, and you're done. What problems do you see?
 
Old 12-23-2004, 01:09 PM   #10
ldp
Member
 
Registered: Apr 2004
Location: Belgium Antwerpen
Distribution: slackware - knoppix
Posts: 141

Rep: Reputation: 18
ok, I could not cp or mv the two files to /mnt/hdb because I got that error "not enough space on disk" but I finally could move the files to /home/public/mkcdRec which gives me now the following situation:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 3835956 2560480 1077476 71% /
/dev/hda3 3835956 1196732 2441224 33% /home
/dev/hda4 4154912 138988 3801460 4% /usr/local
/dev/hdb1 381138 381135 0 100% /mnt/hdb

But when I try to copy them from /home/public/mkcdRec to /mnt/hdb I got the following:

root@cthulhu:/home/public# cp -R /home/public/mkcdRec/ /mnt/hdb/
cp: writing `/mnt/hdb/mkcdRec/CDrec-23.12.2004_1': No space left on device
cp: writing `/mnt/hdb/mkcdRec/CDrec-23.12.2004_2': No space left on device

And he only copies about 300MB from the first file, the second is an empty file on the /mnt/hdb

=> Looks strange to me, I don't see why he won't do it.

And about the other part: I didn't know that by just moving the wanted folder to the hdb drive and then adapting the fstab file, that it would work ok. I tought that maybe some programs or scripts wouldn't be able to find those directories anymore or maybe something I don't know about... Anyway, I like it the easy way.

But I still don't see why the copy doesn't work here...
any clues?

thanks!
 
Old 12-23-2004, 01:19 PM   #11
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Quote:
[B]ok, I could not cp or mv the two files to /mnt/hdb because I got that error "not enough space on disk" but I finally could move the files to /home/public/mkcdRec which gives me now the following situation:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 3835956 2560480 1077476 71% /
/dev/hda3 3835956 1196732 2441224 33% /home
/dev/hda4 4154912 138988 3801460 4% /usr/local
/dev/hdb1 381138 381135 0 100% /mnt/hdb

But when I try to copy them from /home/public/mkcdRec to /mnt/hdb I got the following:

root@cthulhu:/home/public# cp -R /home/public/mkcdRec/ /mnt/hdb/
cp: writing `/mnt/hdb/mkcdRec/CDrec-23.12.2004_1': No space left on device
cp: writing `/mnt/hdb/mkcdRec/CDrec-23.12.2004_2': No space left on device

And he only copies about 300MB from the first file, the second is an empty file on the /mnt/hdb

=> Looks strange to me, I don't see why he won't do it.
Look again in df output. /mnt/hdb is only around 380 MB in size.
 
Old 12-23-2004, 01:25 PM   #12
ldp
Member
 
Registered: Apr 2004
Location: Belgium Antwerpen
Distribution: slackware - knoppix
Posts: 141

Rep: Reputation: 18
Stupid that I missed that...
But it surprises me because hdb is one partition of 6.4GB I did a mkfs on it and assumed that it would enable the whole partition to be available.
 
Old 12-23-2004, 01:35 PM   #13
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
What do fdisk -l /dev/hdb and parted /dev/hdb print say?
 
Old 12-23-2004, 01:39 PM   #14
ldp
Member
 
Registered: Apr 2004
Location: Belgium Antwerpen
Distribution: slackware - knoppix
Posts: 141

Rep: Reputation: 18
The first one gives:

Disk /dev/hdb: 6448 MB, 6448619520 bytes
255 heads, 63 sectors/track, 784 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 784 6297448+ 83 Linux

But the parted program/builtin : I don't have it apparently, it's not installed.

I remember when I did the mkfs this morning it was very quickly done so probably I did something wrong there. I'll check the man again for that.

Thanks for your help
 
Old 12-23-2004, 01:53 PM   #15
misc
Senior Member
 
Registered: Apr 2003
Distribution: Red Hat + Fedora
Posts: 1,084

Rep: Reputation: 54
Sure you do have parted installed. It's just not in ordinary users' search path, but in root's default search path. Seems you didn't log in as root (use su -l for that) or use full path /sbin/parted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cp: No space left on device, but df does not agree! Correador Linux - General 5 04-18-2011 08:26 AM
Trying to dd a FC image into floppies: No space left on device guarriman Linux - General 1 05-23-2005 09:25 AM
no space left on device, but it has enough!!! help!!! sarah21 Red Hat 3 02-03-2005 08:37 PM
No space left on the device ashwinipahuja Programming 1 06-24-2004 12:05 AM
Apache not starting - No space left on device alexisb Red Hat 1 01-14-2004 10:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration