/var/cache full
Hello I'm a Linux newbie. Just recently installed FC 6 and set my /var partition to 500M as suggested (This was a FC 5 book that suggested the size). I'm attempting to add the KDE environment and while downloading dependencies it reports that my /var/cache is full. Is this a cache whose contents I can delete to make space? Is the 500M partition too small? When I previosuly had FC 5 installed and attempted to upgrade Linux I ran out of space but I can't recall where but assume it was the /var area. Am I missing something here? Any help would be greatly apreciated!!
|
500 Mb is absurdly small for var. Unless your entire linux system is smaller than 3 Gb, var should have some size to it. All the system info ends up in /var/log, and /var/cache holds the upgrade files most likely. I just checked my laptop, and a 22 gig install uses 786 Mb of space in /var, and I take steps to minimize what is kept there.
If you are doing this on a machine of 20 Gb or more, I would think you would want at least 3 Gb for var. Look up resizing partitions to get more space into your /var partition. Peace, JimBass |
Ok, thanks. I have no idea why the book I'm using as my guide suggested 500M. As I'm not totally familiar with Linux, LVM and Linux's method of resizing partitions yet, I'm curious if there is a way to edit a config file to redirect the /var/cache to another partition with sufficient space?
|
Quote:
To redirect the /var/cache to another partition with sufficient space: open a shell. login as root. type: umount /var (be sure no program is using /var - I'm not sure if this will work) the config file that controls this is /etc/fstab type: gedit /etc/fstab you can now change the first field before /var to an unused partition (hopefully with more space!) type: mount /var Or, if partition with the root folder "/" has enough space, you can comment the line with /var by adding a # at the beginning of the line. That way, /var will be mounted along the / folder. reboot:) |
Quote:
Code:
jim@jimsworktop:~$ ls /var/run/ I refuse to touch any rpm based distro, as they feel like open source windows to me. It may be possible to reconfigure yum or whatever package manager you use to usea different location for the cache, but I still suggest reformatting, that var is way too small. Peace, JimBass |
Quote:
I guess one could still be able to edit /etc/fstab and reboot so changes could take effect. |
Yes and no. You could certainly edit /etc/fstab and reboot to have the changes take effect, but unless you copy things manually before hand, you can get into alot of trouble.
Say for example the OP had the now famous 500 Mb partition mounted as /var, and say for the sake of argument he had a 3 Gb /usr partition. Say he changes the mountpoints in /etc/fstab, then reboots. He'll hit a kernel panic, or some other serious error. Processes will try to place their run .pid file in /var/run, but although you mounted var in the bigger partition, you didn't move the subdirectories. /var/run/ just doesn't exist, so most/all services would fail to start. The "safe" way to go would be to use a live CD, copy all the contents of /var to a 3rd location, copy the usr contents into the old /var partition, drop the old /var contents into the old /usr, then change /etc/fstab (swapping the usr and var mountpoints) then reboot and take out the live CD. Then you'll have a 3 Gb var with all necessary subdirectories, and a 500 Mb /usr. Which is why I say kill that partiton scheme. 500 Mb is too small for anything other than /boot or swap, unless it is a tiny system. Peace, JimBass |
ok, I won't guess anymore!
BTW, my /var folder on Slackware 10.0 is about 24 mb's :P |
how to clear my cache directory
HI,
I am using FC3, In squid.conf i have assigned cache_dir ufs /var/spool/squid 18000 16 256 and now when i am checking my cache by the command $du -mach /var/spool/squid it shows me 20 gb cache, And i am also getting some errors (Can not post that error now, i am somewhere else) in $tail -f /var/log/messeges, the Questoin that i want to ask, is How can i Clear my cache_dir (/var/spool/squid), by deleting and making dir again its creat error (may be the SElinux Error)I think thats permission error, I dont know what permission will it need in FC3, Dear Friends i am new to linux, Hope you people will reply in the easy way to understand Thank you all. |
Quote:
Most package/update managers, including RPM based ones like YUM, typically use a directory (usually cache) /var to store downloaded packages. My Slack /var is around 654MB at the moment. I would never recommend a /var of less than 1GB on any modern system and 3GB sounds more reasonable for a distro like FC. The best way to move /var would be to use a LiveCD as already mentioned. You can work on the partitions and edit fstab as needed. I normally recommend just creating a /var directory in / so that as long as / is a decent size you don't run into these sorts of problems. |
With my Gentoo setup, I gave 2GB to /var and 500 MB for /var/log. About 200 MB is taken up in /var and 11 MB is taken up in /var/log.
The problem putting /var in the same partition where / is kept is the file /var/log/messages sometimes gets huge. To stop this from happening, I suggest a separate partition for /var/log. Though if /var is in the same partition where / is located and / is 100% full using man and some utilities will not work. Creating a partition for /var is actually better than placing in with the same partition where / is kept. Most RPM based distributions gives you an option keeping or not keeping what is installed. By default they are set to keep, so you can uninstall it later. You can delete them to make more space, but you will not be able to find out what programs you have installed and you will not be able to uninstall them. |
The size of /var/log/messages is the same regardless of whether /var is located in / or on it's own partition so I don't get your point. There really is no advantage to putting /var on a separate partition unless you're running a server.
The obvious disadvantage is exactly what the OP is struggling with. |
All times are GMT -5. The time now is 09:30 PM. |