Click to See Complete Forum and Search --> : / partition full


gildedpage
04-11-2001, 02:44 PM
Hello

Does anyone know how to safely clear out the root partition when it is full? Could it be a problem with /var/log/ being full? I'm using
Mandrake 7.0.
Thanks,
SW

[ 11 April 2001: Message edited by: gildedpage ]

Craig McPherson
04-11-2001, 02:50 PM
You should never, ever, ever, ever, ever have /var on your root partition.

!!EVER!!

Now you know why.

Now that we're clear on that, what's your current status? Can you boot the system at all? If you can boot the system, and log in, then go ahead and delete every stinking file there (not the directories, though), because that's the most expendible stuff you have. Also clear out /tmp and /var/tmp.

Now that that's done, if you still need space, try uninstalling some packages, or move some directories onto other filesystems and symlink them from their original location.

Then make it a priority to get a seperate /var partition so this isn't likely to happen again.

If you CAN'T even boot the system and log in, you'll need to boot from a boot disk, mount the filesystem on your hard drive, and clean it out from there.

bdg1983
04-11-2001, 02:54 PM
Did you check /var/logs to see if your logs are getting out of hand?

How large is your root partition?

gildedpage
04-11-2001, 03:20 PM
Now let me get this straight--you say I shouldn't have /var/logs/ in the root partition...just kidding.
To tell you the truth, I don't know for sure that it is in the root partition. It's wherever it went when it installed. But I read somewhere that it could be a reason / fills up. For whatever reason, the problem I'm having is that xfs will not start up during boot and I've tracked it back to the full partition.
I have been able to login a couple times using 'xfs -port -1 -daemon' before starting X, although the system does not operate quite normally.
When you say delete every stinking file there you mean every one in /var/log/, correct? Do I delete them the same way as in good old windows (right click and into the trash)? Sorry,I'm a rank newbie.

If I can't login, can i delete them from the command line?

Thanks,
SW

gildedpage
04-11-2001, 03:27 PM
df says / is 1517920 1k blocks and 146328 is used (could that be right?). Anyway, it says it's 100% in use. I have not checked /var/logs/, not sure how to tell if they are out of hand.
Thanks,
SW

knute
04-11-2001, 03:32 PM
hehehe... Actually everything regarding file manipulation and such can be done in X can be done in the command line. Once you learn the commands, it is actually easier to do in CLI than in X. :)

Part of setting up separate partitions is so that you can control how much space that particular directory can use. If it is all in root, then logs and temporary stuff can take over and cause problems. :mad:

It's ok to set up linux on 2 partitions (/ and swap), but you can have more control over space when you have multiple partitions. I have partitions for /, /usr/share, /home, and a couple more that I can't think of at the moment. :)

Craig McPherson
04-11-2001, 03:42 PM
cd /var/log
rm *

Then run "df" to see how much space you have on your device.

gildedpage
04-11-2001, 03:57 PM
what is the asterick after rm?
SW

Sensei
04-11-2001, 04:03 PM
* stands for everything

*.* used to be everything in dos if that analogy makes it familiar?

You won't be able to compile much software if / is full as well. especially Star Office.

gildedpage
04-11-2001, 04:29 PM
OK, I removed all /var/log files, but the used space only went down slightly, from 1463308 to 1458488 and it still says 100% in use. Going ahead with clearing everything out of /temp and /var/temp, unless anyone knows any reason why I shouldn't...
SW
P.S. Is this a sufficient size for a root partition: 1517920 (kb?)?

[ 11 April 2001: Message edited by: gildedpage ]

bobarian
04-11-2001, 04:59 PM
You see, what is probably taking up all the room is the /usr directory. This has all the programs that you usually use. Since mandrake's default partitioning scheme is to put everything on one partition, the /usr directory is on the / partition. To free up a whole crap load of space on your root partition, make a new partition (a big one), format it, mount it, and then cp -R /usr to the new partition. Edit your /etc/fstab file to mount it on /usr, then rm /usr using a boot disk. Finally, then mkdir a new usr on your / partition.

Hmmm, maybe I should write a NHF about this...

EyesWideOpen
04-11-2001, 05:07 PM
Could you post the output you get when you run df -k ?

Also can you post the output of du -sh /usr (or du -sk /usr if that doesn't work)? This will help in determining if /usr is the caulprit (sp?).

FYI. The du command is used to display disk usage information. Run man du for more info.

gildedpage
04-11-2001, 05:22 PM
Bobarian -maybe I should read an NHF on all that...
Eyes wide open -I'll get back with that stuff.

Well, I'm back from my little journey on the other side of Lilo and a few things are confusing me. When I tried cd /temp and cd /var/temp it tells me there is no such file or directory. I logged into the desktop and looked in the file manager and and there they are, like I knew they were. Also, I looked in /var/log, which I supposedly cleared, and it's full of stuff. WTF?
Anyway, I'll give Eyes Wide Shut's suggestions a try.
Thanks,
SW

gildedpage
04-11-2001, 06:08 PM
Here's that output:
du -sh /usr:
998M /usr

Now for the hard part:

/dev/hdb5/ 1k-blocks-1517920 used-1458524
Available-0 Use-100% Mount-/

/dev/hda1 9410512 1623248 7787264 17%
/mnt/Dos_hda1

/dev/hda5 2346524 879528 1466996 37%
/mnt/Dos/hda5

/dev/hdb1 14607 830 13023 6%
/boot

/dev/hbd7 17903412 21572 16972376 0%
/home

Thanks,
SW

gildedpage
04-11-2001, 10:14 PM
I went in and uninstalled a bunch of games and a couple of other things that had alot of files in /usr. The % in use for the partition came down to 99% and for the 1st time xfs started on its own. So I guess it is the /usr subdirectory that's taking up a lot of the / space. I'm a little leary of messing around with partitions but I gues I'll have to study up and make one for /usr.
BTW there is one wierd thing that remains:
When I try to log out from the desk top I get a screen that has some error messages, something about wrong charset DIP cannot be read, and then it says it's waiting for X to shut down but it never does...
Oh well, something else to puzzle over.
Thanks to everyone who responded.
SW

brasso
04-11-2001, 10:38 PM
I printed this thread out to study/save, and am confused by this:

You see, what is probably taking up all the room is the /usr directory. This has all the programs that you usually use. Since mandrake's default partitioning scheme is to put everything on one partition, the /usr directory is on the / partition. To free up a whole crap load of space on your root partition, make a new partition (a big one), format it, mount it, and then cp -R /usr to the new partition. Edit your /etc/fstab file to mount it on /usr, then rm /usr using a boot disk. Finally, then mkdir a new usr on your / partition.

It seems like you wind up with 2 /usr directories, one on the new partition and a new empty one on /
Wouldn't the new /usr on the / partition immediately start filling up again?

I was thinking of playing with this just to see if I could add another primary partition (/usr) on the Linux drive. I now have 3 Linux and 1 Extended DOS FAT32. I guess that's the DOS limit for primary partitions. I'll see what PartitionMagic4 has to say.
Earl

brasso
04-11-2001, 10:45 PM
Wait a minute, I THINK I see the method. From the 'boot disk' you do not have the new partition mounted on /usr at the time you delete it. You mkdir /usr back on, and the next time it does a hard-disk boot the new partiton is mounted under you newly mkdir'd /usr.
Right?????????
Earl

prince_kenshi
04-12-2001, 01:38 AM
gilded page: It's tmp, not temp. This is probably your problem. Did you only give Linux a gig of space? If you went with the default Mandrake install, it probably filled up most of this itself. You'll probably just have to uninstall as much stuff as you can until you can get a larger partition.

brasso: I think you're on the right track. First you make another partition. Then you mount it as something besides /usr, like /part.. Then you copy /usr to /part. Then you change your fstab so /part will later mount as /usr. Then you boot from a floppy so that nothing mounts that you don't want mounted, namely the new /usr. Then you delete the old /usr. Finally you reboot. Seems kind of complicated but nothing's worse than trying to copy an NTFS system partition to a new hard drive.

Craig McPherson
04-12-2001, 02:11 AM
Originally posted by gildedpage:
<STRONG>Well, I'm back from my little journey on the other side of Lilo and a few things are confusing me. When I tried cd /temp and cd /var/temp it tells me there is no such file or directory.</STRONG>

Check my post again. It's /tmp and /var/tmp. There's probably not going to be much stuff there to delete, but (as long as you're not running any programs at the moment that are storing important things there) they're safe to clean out. In fact, they'll generally be cleaned out on every bootup if your distro is configured as such.

Also, I looked in /var/log, which I supposedly cleared, and it's full of stuff.

Once you delete the logs, new ones will start being created immediately. But it's a good way to get old ones out of the way to free up space in a pinch. You might want to turn off logging completely until you get a handle on your disk space. You can't just shut down syslog, because that'll result in log messages being printed on your terminal instead of logged to a file, but you can edit /etc/syslog.conf and redirect everything to /dev/null instead of to log files. You shouldn't do that on a permanent basis, but you can do it for a while.

gildedpage
04-12-2001, 10:48 AM
Well, StarOffice and its 3,064 files that filled up my / partiton are installed. I know that I have to repartition my hard drive but I'm putting that on hold for the moment because...well, I'm scared.
A more immediate problem I'd like to fix first is that after logging into my desktop, I can't log out.
In trying to fix the original symptom (xfs wouldn't start) I went into /etc/X11/XF86Config and changed FontPath unix:/-1 and went into /etc/rc.d/init.d/xfs and changed the start and restart ports. However, I have un-edited these changes and set them back to their original state...I think.

Here's what's happening now:
When I log into my user account, I get this message before X starts:
'X-authority not writable, changes will be ignored' --then X starts and I go to the desktop.

When I log out of user, I get these error messages:

'cat: /home/scott/.Xathority: permission denied
localhost being added to access control list
maudio: cannot open audio device
kpanel: waiting for window manager
PID could not get read
PID could not get read
kpanel: ok, commencing initialization
Max entries=23
PID could not get read
PID could not get read
PID could not get read
PID could not get read
PID could not get read
PID could not get read
PID could not get read
PID could not get read
PID could not get read
kwm sound:Failed connecting to the audio server
Please check manually if you can connect to the kaudio server
Waiting for X to shut down'

X never shuts down. Here's what I get when I try to log out of root:

'cat: /home/scott/.Xathority: permission denied
localhost being added to access control list
maudio: cannot open audio device
kpanel: waiting for window manager
PID could not get read
PID could not get read
kpanel: ok, commencing initialization
Max entries=23
Wrong Charset!
PID could not get read
PID could not get read
PID could not get read
PID could not get read
PID could not get read
PID could not get read
PID could not get read
PID could not get read
PID could not get read
kwm sound:Failed connecting to the audio server
/dev/dsp: no such device
Please check manually if you can connect to the kaudio server
Waiting for X to shut down'

The lines that are different in root are the 'Wrong Charset!' line and '/dev/dsp: no such device'.

As I understand it, the underlying problem was that xfs would not start because there was not enough room to write permission to the disk. The usr login message makes me wonder if there still is not enough room, but there seem to be other problems.
Greatly appreciate it if anyone can help.
Thanks,
SW

ph34r
04-12-2001, 12:01 PM
Sounds like you have some serious space issues.

Just for grins, here's something I found out the other night.

Slackware 7.0/1 full install of everything comes out to 997mb.

Mandrake 7.1, full install of everything, uses just about 1.4gb. Thats a *lot* considering you install it off a single 650mb cd.


After using my system for a while (Slack 7.1), places I started to get short on space were:

/usr/local/games (quake2+mods, q3, UT, kingpin) - almost 4gb right there.
/windows - I keep all my MP3's there so I can play them when I booted into windows. I've not booted that partition in months, so rm -rf /windows/windows and /windows/Proga* quickly cleared up plenty of space for more MP3's. Felt really good too.
/home - Needed to clear up a bunch of tarballs/slackpaks I've downloaded. A quick burn to CD fixed that.
/usr - this fills up especially when dealing with multiple kernel trees, and when you install lots of extra software.

With /home, /usr, and /usr/local/games on separate partitions, my / partition is still using less than 500mb.

gildedpage
04-12-2001, 01:17 PM
Does anyone know where I can get step by step info on how to create/resize partitions after install using fdisk or maybe some utility available in Mandrake? How risky is this for a newbie to undertake?

Also, the instructions that Bobarian wrote for creating a new /usr partition included the use of a boot disk. I was unable to make a boot disk during install because Mandrake could not autodetect my floppy drive -- its a compaq 120mb "Super Disk" which is "two drives in one --one for 120mb and one for 1.44mb. I guess this is can be configured now if it is compatible?
Thanks,
SW

Craig McPherson
04-13-2001, 04:24 AM
Here's how you can move /usr onto its own partition:

1. Create the new partition that you'll use for your /usr partition.

(at this point, you might want to switch into single-user mode, just to be safe... at the very least, shut down X and log out all your users except one root session)

2. Make a temporary directory called /newusr

3. Mount the new partition onto /newusr

4. Copy (cp -ra) everything from /usr over into /newusr

5. Make sure everything copied correctly!

6. Move your old /usr directory out of the way (mv /usr /oldusr)

7. Unmount /newusr

8. Make a new empty directory called /usr

9. Mount your new partition onto /usr

10. Edit your /etc/fstab, add the new entry.

11. Once you've tested to make sure everything works after a reboot, delete the /oldusr directory to free up disk space.

gildedpage
04-13-2001, 08:12 AM
This is the part I'm clueless about:
1. Create the new partition that you'll use for your /usr partition.

(at this point, you might want to switch into single-user mode, just to be safe... at the very least, shut down X and log out all your users except one root session)

How do I create a new partition? All the info I can find talks about making partitions during install, not after.
Thanks,
SW

[ 13 April 2001: Message edited by: gildedpage ]

hoffa69
07-09-2002, 03:41 PM
I can't boot into linux gui anymore after copying large files to /hom/user direcory and /var/html. I am using Mandrake Linux 8.2 with default configuration. I have plenty of disk space, but believe it is partition size problem. How can I fix this?

jglen490
07-09-2002, 04:48 PM
You should never, ever, ever, ever, ever take Linux advice with anything but a grain of salt :D . (A thousand pardons to Craig McPherson :) !) Partition sizing is more art than science and varies based on what your system is used for. Yes periodically clearing out logs is important, but as you found out the existence of many, many programs contributed greatly to your problem and of course that's an age-old problem.

Might I suggest this link (http://linux.oreillynet.com/pub/a/linux/2001/10/11/filesystem.html) as a guide, not instruction, but guide as to what you can do to understand and manage your Linux filesystem.

mdwatts
07-09-2002, 05:55 PM
hoffa69... Please stop digging up old threads to ask the same question over and over again.

This is the same as crossposting!!!

Ask your question once in the appropriate forum and patiently wait for someone to respond.

Everyone deserves the same chance and you are getting tooooo many.

hoffa69
07-09-2002, 07:00 PM
sorry again. I posted my messages pretty quick and got your complaint messages all at once now.

I used to use questionexchange.com until they shut down, but am now forced to browse linux forums and newsgroups for answers to my questions.

hoffa69
07-09-2002, 10:22 PM
Thanks for the link. I read it and it looks like I need a separate /var partition.

I'm wondering how it should be added. I'm in Webmin now and see add primary partion and add logical partition.

And under type I see Linux, Linux swap, Linux extended etc. I don't know which one to pick.

janet loves bill
07-10-2002, 12:17 AM
I found a way to get some serious space back, was looking through Kmenu directories and found package manager, well I uninstalled all the foreign language support for KDI, I won't goof with any other prog till I know for sure If I really need them or not but It did clear some space out!!!

bill grimes
07-10-2002, 01:59 AM
I guess I should lurk here more often


(just noticed this tidbit after ~3 years... I reg'd on 420)

yeah you can tell