LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Out of disk space? (https://www.linuxquestions.org/questions/linux-hardware-18/out-of-disk-space-506627/)

Tux-O-Matic 12-01-2006 01:33 PM

Out of disk space?
 
I recently ran out of disk space on my hard drive (go ahead...laugh...I have a 5G hard drive), so I can't log into the GUI or do any file writing. The command line output said that I didn't have enough room in the /tmp/ folder. When I looked, I was surprised to find that all the files were small text files, barely enough to make a dent in disk size.
I was also confused when I typed
Quote:

df -hP
and I saw that I still had 11% left of the disk drive. So then i deleted two large folders, and I still couldn't log in.
Another strange problem is that the last time I loaded files, I could turn off my computer, log out of the GUI, and log back in. Since then I haven't really saved anything, and one day I couldn't get into my GUI account.
So, does anyone know what's wrong? I'm not able to give you exact command line information because 1) I can't save anything, and 2) I don't have Internet.
Also, does anyone know if there's a command-line version of Open-Office.org?

dracolich 12-02-2006 01:44 PM

Is your disk split into partitions? Check /etc/fstab. What was the output of df -hP?

It is more than likely ok to delete everything that's in /tmp. I added a line to my shutdown procedure to clear /tmp.

syg00 12-02-2006 03:52 PM

If you can run the Fedora CD as a liveCD, do so and have a look around your harddisk. Personally I think Knoppix is best for this. It will enable you to see the disk, and work on it if you remount it as write enabled. As suggested above, perhaps just delete the /tmp, and maybe have a look for logs that aren't being cleared out. Try something like
Code:

du <disk mount point> -x | sort -nr | less
This will give you a (reverse) sorted list of biggest space occupiers (will take a while).

Tux-O-Matic 12-04-2006 02:30 PM

I've heard there's important stuff in the /tmp folder, though. If I delete the whole folder, won't I be ruined?

dracolich 12-04-2006 03:38 PM

It's been my understanding that it depends a bit on what programs you're running and what you're doing at the time. For example, KDE keeps some user information in /tmp while a session is running. But after you log out of KDE those files are no longer being accessed. And the next time you start KDE it'll replace them with new information anyway. But if they get deleted while KDE is in session then it could cause KDE to become unstable or even crash (but just for that session).

Another example is cd burning. /tmp is often the location used for the temporary image and if something happens to it before the process is complete the program might become unstable or simply just spit an error message.

Hope this helps.

Tux-O-Matic 12-04-2006 05:10 PM

Yeah, it does. Thanks. Do you think the problem was due to my small 5G hard drive?

dracolich 12-04-2006 06:04 PM

5GB is fine for the FC installation itself, but when you start working and saving stuff and downloading stuff it'll fill up pretty fast. I don't know exactly how much FC takes as I use Slackware, which is around 2GB for a full install. One option would be to use one or more usb drives for documents and downloads(keep backups somewhere!). Also, as syg00 mentioned, check your log files. Especailly system and messages. If they don't get rotated often via cron jobs they'll get very large. Then look for packages you don't need, such as additional window managers you'll never use. If that doesn't help enough you can make /tmp a separate mount in /etc/fstab using tmpfs(memory instead of disk). IMO, I think if you can manage everything except the tmpfs suggestion you can free several hundred MB.

Tux-O-Matic 12-06-2006 04:13 PM

I would love to have an extra USB drive if it worked. Whenever I stick in any USB device, nothing happens. When I typed in
Code:

dmesg
nothing came up. I tried to mount it from the
Code:

/dev/bus/usb/001/
directory (there's a file named "001" in that directory), but that didn't work.
I know this is off-topic. Do you know what's wrong? I heard that it was broken, but I didn't jar it in any way.
If I may have to replace it, do you know how much a new USB port will cost? Is it best that a professional installs it, or am I fine if I know comptuer hardware?

Also, I deleted the /tmp/ directories, but now I can't write to the drive unless I'm the root. Whenever I try to save something, an alert pops up telling me I don't have disk space or I don't have permissions. So, I typed the following the command line, being the root:
Quote:

chmod -R g+r+w+x /home/<my directory>/
I saw that the user's directory permissions were already readable/writable/executable, so I figured I didn't need to do chmod for that.

Electro 12-06-2006 05:36 PM

If you deleted /tmp, say good bye to X11 and many other programs that require it. Recreate /tmp with a 1777 permission.

In order to use USB storage device, you will need to make sure sd_mod and usb-storage modules are loaded. Also you have to have SCSI support enabled in the kernel. Assuming you already have these modules loaded. It should come up. Sometimes using cdrecord -scanbus will make it come up. Though USB has a limit currect capacity. If you have a keyboard, a mouse, and a USB flash drive, putting a second USB flash drive may not work. You will have to invest in a powered USB hub.

Tux-O-Matic 12-09-2006 05:37 PM

I don't know if it's just my hard drive because I keep getting the same error:
Quote:

Your session only lasted 10 seconds. If you have not logged out yourself, this could mean that there is some instillation problem or
that you may be out of disk space. Try logging in with one of the
failsafe sessions to see if you can fix the problem.
[Checkbox] View details (~/.xsession-errors file)
Code:

/etc/gmd/PreSession/Default: Registering your session with wtmp and utmp
/etc/gmd/PreSession/Default: running: /usr/bin/sessreg -a -w /var/log/wtmpt -u /var/run/utmp -x "/var/gmd:0.xservers" -h "" -l "0:" "root" Not enough free disk space on /tmp


I keep freeing disk space (even deleting everything in the /tmp folder), but nothing works.

Also, I've found that I can only write to my account being sudo-user or super-user. I've tried [CODE]chmod -R u+r+w+x <home folder>[CODE], but that still didn't fix it. Do you know what the problem is?

syg00 12-09-2006 06:42 PM

Did you read Electros post ??? - particularly the first couple of sentences.
What does "df" show ?.

Tux-O-Matic 12-11-2006 03:54 PM

df shows the amount of space total, used, and free on logical volumes.

praveenkumartm 01-13-2007 08:28 PM

Query :

Your session only lasted 10 seconds. If you have not logged out yourself, this could mean that there is some instillation problem or
that you may be out of disk space. Try logging in with one of the
failsafe sessions to see if you can fix the problem.
[Checkbox] View details (~/.xsession-errors file)

Solution :

Recreate the User Account. It will work perfectly.

hansalfredche 01-15-2007 05:08 AM

Hard disk space may not be your (only) problem. I'm currently using Ubuntu Edgy on a 4GB hard drive and managed to install Xubuntu on a 2GB drive. Of course, you have no free room for large files, but it works. If you have several partitions (and not just / and swap) your root partition might be too small.


All times are GMT -5. The time now is 04:24 AM.