[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On 14/08/14 23:53, bad apple wrote:
Many thanks for the advice BA and Simon.. expecting small visitors here soon so I will revisit this in a few days when they've gone :)On 14/08/14 23:10, Simon Waters wrote: <stuff> All good advice here.You can remove the old kernels if it booted correctly and all your hardware works as expected with the current one, you get back ~50MB per kernel on Debian boxes.Plus more when you wipe the associated linux-headers* packages which are often quite a lot more, and usually need manually trimming. Not all entries under /usr/src/ are removed so rm them too.On debian I'd do "dpkg -l | grep linux-image" and then use "apt-get purge linux-k<tab>" and use the fancy autocomplete to take out the old list.So do I. I love fancy autocomplete...I tend to use a combination of "du -sx * | sort -n" and "find . -size +100000" to track down where space has gone. Also reboot is always good if you've been messing with big files and suspect the space hasn't been freed because the files are still held open.sync + remount?Always check /var/log with "du -sx * | sort -n"...Definitely - I found two /var/log/messages.* files totalling 10Gb on a server with an intermittent runaway process yesterday."apt-get clean" is useful, but these days autoclean is run often. "deborphan" is good for killing unneeded packages, although again "apt" is catching up."deborphan --guess-all" to check, and then feed it into "deborphan --guess-all | xargs sudo apt-get purge -y -" when you're happy with the list. apt can't touch this yet (I love it when apt helpfully suggests autoremoving your entire OS).But ultimately the OS is usually quite small, if you follow Bad Apple's advice and keep partitioning simple. Partitioning might make some sense if you have to run multiple services on a server, and need to stop cascading failures when one goes a bit mad and eats all your disk space, but those days are largely gone because servers are cheap.Yeah, I take partitioning and volume provisioning *very* seriously on servers, VM hosts, SANs, etc - on single user home PCs and the like it's a totally different matter. It's 2014, everyone should have single volumes on SSDs with no swap, boot, OEM "recovery partitions" or any of that other pointless crap. Fully encrypted and COW of course.Although we are hitting question of can we have a cloud provider who charges on usage and not on number of servers, because we want a lot of little servers not doing much. Some angling to use Docker, but it looks a bit new and shiny for what we are trying to do, but I think the idea of lighterweight virtualisation makes perfect sense, just suspect we should go back further and make it cleaner still.I'm just doing a bunch of prototyping with docker + vagrant at the moment, they're pretty cool. But maybe a bit *too* cool, with a touch of hipster thrown in. Extensive testing and bitter experience makes me cautious about people claiming to have a better BSD jails/solaris zones/linux chroot solution with added pixie dust than already exist. If you're looking into this and thinking of slicing up limited costly server instances with a VM flavoured approach, but without the full VM overhead, solaris zones are the best balance I've ever found. Cheers
Interestingly I've just realised the space warning didn't come up this morning. Odd.
Julian -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/listfaq