Drel (
delfinnium) wrote in
linux4all2012-02-10 11:07 am
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[community profile]](https://www.dreamwidth.org/img/silk/identity/community.png)
root directory being filled?
Hi all
I've had a clean reinstall of my linux mint and everything is good... until just today a thing popped up to say that my root is full.
D: I had given it 4GB when I reinstalled linux mint, leaving everything to my home drive. Now what I read is that root IS required in larger volumes.
So what can I do? I have plenty of space in /home, and I don't particularly want to reinstall everything. Where is the files where I can delete/clear my cache? How do I go about doing it?
(In nice easy steps because I can't actually find this .tmp or .var folders that other websites say I must look in.)
I've had a clean reinstall of my linux mint and everything is good... until just today a thing popped up to say that my root is full.
D: I had given it 4GB when I reinstalled linux mint, leaving everything to my home drive. Now what I read is that root IS required in larger volumes.
So what can I do? I have plenty of space in /home, and I don't particularly want to reinstall everything. Where is the files where I can delete/clear my cache? How do I go about doing it?
(In nice easy steps because I can't actually find this .tmp or .var folders that other websites say I must look in.)
no subject
I think I had found a disk partitioning tool somewhere but that it only affected my non-linux OS partitions, not the linux partitions itself. I'll have to look into my live-install CD and see what is on there.
Installig a fresh install isn't as scary as it might be, since I've just done it, but it IS tedious and having to re-customise all my programs is not fun. Are all my programs installed on root, is that why it is filled up? If that is why, then I know to make my root bigger next time. -_-
no subject
That's because you can't change a partition that you're actually using at the time! I assume that you were running linux, yes? That means that the operating system and the programs that were running, including the disk partitioning tool itself, were using the disk!
That's why one needs to run from the live-CD in order to re-partition the disk(s) on which your original Linux system is installed, because if one is running from CD, one isn't running from disk.
Are all my programs installed on root, is that why it is filled up?
Yep. If you have two partitions, root and /home, then everything that isn't on /home is on root. And the only things that are put in /home are your personal files and configurations. Which isn't a lot, unless you've got a massive music collection or something.
My rule of thumb for partitions:
* swap partition: somewhere between the same size as memory, or twice the size of the memory.
* boot partition: sometimes I have a separate partition for /boot, sometimes I don't. If I do, it's small, but not too small. About 1G is plenty.
* divide the remaining space in half, and give half to the root partition and half to the /home (or in my case, /files) partition. That way, I don't have to think a lot about how big to make them. Disks are so big nowadays it doesn't really matter if one doesn't have a /home partition that's taking up most of the disk. And it's much worse to run out of room on the root partition than it is to run out of space on /home, since it's much easier to move your personal files elsewhere.
I'd encourage you to give the re-partitioning a go, because if you're resigned to re-installing, then it won't matter if the re-partitioning doesn't work, but if it does work, then (a) you won't have to re-install (b) you won't have lost your settings and (c) you will have gotten some Valuable Experience!
no subject
I dd as you suggested - it turned out that linux Mint 9 DOES have gparted on its live-CD, so I could do just that, and now my root is made larger and the home directory is smaller and I didn't have to do any reinstalling! :D
THank you so much! I'll keep this in mind next time I have to do any reinstalling. :D
no subject
no subject
Swap: you don't really need a separate partition for swap since, IIRC, Linux 2.2. A swap partition used to be faster than a swap file, but it isn't any more. And if it's desktop we're talking about, you'd want to keep your swap as empty as at all possible. If your system keeps using more than, say, 20Kb of swap (as shown by free), add more RAM if at all possible. Normally, a 512Mb swap file is an overkill. (Just in case, creating a swap file is as simple as dd if=/dev/zero of=/.swapfile bs=1M count=512 && mkswap /.swapfile && swapon /.swapfile && echo '/.swapfile none swap sw 0 0' >> /etc/fstab.) If your system can't handle more RAM, and this swap file turns out to be insufficient, just add another swap file. Preferably, on a different drive. Of course, you can still create a giant swap partition, just to be on the safe side. But you don't have to.
Boot: a 128Mb partition with an ext2 filesystem should be enough. Actually, mine's 124Mb and only 20% used.
Root: 10 to 20Gb if you keep your /var elsewhere. Unless, of course, you want to install each and every Debian package. If it's not the case, some 30Gb should be enough even with /var on the same partition.
The rest of the disk: /home.
Also, remember that in Unix-like systems, links work. If, e. g., you're using MySQL and your /var/lib/mysql grows too large, you can always move it to a less used partition and replace it with a soft link to the new location. Just shut MySQL down while you're at that. It'll never ever know you've fooled it. (Again just in case, it's done like that: /etc/init.d/mysql stop && cd /var/lib && mv mysql /home/ && ln -s /home/mysql && /etc/init.d/mysql start.) That said, a separate /var is usually a good idea if you have more than one HDD.
no subject
Just shows how old I am.
Boot: a 128Mb partition with an ext2 filesystem should be enough. Actually, mine's 124Mb and only 20% used.
It depends on which distro you're using... some distro policies are to have multiple kernels available, and ever since the time I ran out of space on /boot when I was trying to do a dist-upgrade from one version of Ubuntu to another, I've been a bit more generous than that.
Also, remember that in Unix-like systems, links work.
One notable exception: if you're running an Apache server and using suexec, it does check if you're doing soft links for /var/www and suexec spits the dummy. As it should, since that's a security vulnerability.
That said, a separate /var is usually a good idea if you have more than one HDD.
Though having more than one HDD, with disks the size they are nowadays, isn't something that common unless one built one's system oneself.
no subject
Indeed. The strategy above is aimed at a Debian desktop. Should've mentioned it.
Now, that's a bit tricky. But generally, you only need to keep the cgi-bin subdirectory in the right place and with the right rights. So on my server users' document roots are in their ~/public_html, and their cgi-bin subdirs are created in /var/www and symlinked from ~/public_html.
Nobody uses cgi-bin these days, though. It's all PHP and 'Help, my site's got pwned again.'
Some FTP servers won't let remote users to follow symlinks and even mounts, either. Well, it's security vs usability, as always.
Most hardware sellers here in Siberia let you customise your system right at the counter. Some even don't void the warranty on preinstalled components if you modify it later. Never imagined this could be a problem elsewhere.
Still, having multiple disks is generally a good idea. At least until the blessed times to come when home users will have an affordable backup solution once again.