Posts Tagged sysadmin

Path to building Nginx Mainline RPMs for Fedora & CentOS

Or: How I spent an afternoon doing a deep dive into the RPM spec and solving a problem for myself

tl;dr – Nginx Mainline packages are being built for Fedora & CentOS at

My webserver’s running nginx 1.4.7, a version that hasn’t gotten non-bugfix attention since March 2013, according to the changelog. Oddly enough for a Fedora package, the version in koji is the stable branch – something that makes sense for CentOS/EPEL since that’s a long term support release, but not for Fedora. Doubly annoying was the fact that the packages for Fedora 20 (because Fedora 21 isn’t supported on OpenVZ yet) was one step behind the official stable – 1.4 instead of 1.6.
If I wanted mainline on Fedora, I was going to have to build it from source.
Read the rest of this entry »

, ,

1 Comment

I’m annoyed at Crashplan now

I’ve been using crashplan for the last 10 months – the combination of low price, family pack of 10 computers and Windows & Linux support means it beat out BackBlaze for my online backup of choice. However, I’ve run into multiple problems with it, all in one day. Read the rest of this entry »

, ,


You know you need more RAM when…

aka, my errors, let me show you them.
or, inadvertent DDoSes are fun when you do them to yourself!
finally, A: “I can see 4GB of RAM but I can only use 1.5.” Q: What is “Why I loathe 1and1”?

sudo -i
sudo: unknown uid: 10003
sudo: cannot fork: Cannot allocate memory

-bash: /usr/bin/sudo: Argument list too long

ps aux|grep httpd|wc -l
 -bash: fork: Cannot allocate memory
 -bash: start_pipeline: pgrp pipe: Cannot allocate memory
 -bash: ps: command not found
 -bash: /bin/grep: Cannot allocate memory
[s15353558 ~]$ sudo -i
 -bash: /bin/egrep: Cannot allocate memory
 -bash: echo: write error: Cannot allocate memory
 -bash: fork: Cannot allocate memory
 -bash-3.2# whoami
bash: fork: Resource temporarily unavailable
[root@s15353558 conf]# screen
 bash: /bin/grep: Argument list too long
 bash: /bin/grep: Cannot allocate memory
 bash: /usr/bin/id: Cannot allocate memory
 bash: [: =: unary operator expected
 bash: /sbin/consoletype: Cannot allocate memory
 bash: /usr/bin/id: Cannot allocate memory
 [root@s15353558 conf]#
[root@s15353558 conf.d]# vim pagespeed.conf
 Vim: Warning: Output is not to a terminal
[root@s15353558 conf]# service httpd graceful
 httpd: Syntax error on line 190 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/ into server: /etc/httpd/modules/ cannot open shared object file: Too many open files in system
 [root@s15353558 conf]# service httpd graceful
 /usr/sbin/apachectl: line 102: 16247 Killed                  $HTTPD $OPTIONS -t >&/dev/null
 apachectl: Configuration syntax error, will not run "graceful":
 httpd: Syntax error on line 169 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/ into server: /etc/httpd/modules/ failed to map segment from shared object: Cannot allocate memory
 [root@s15353558 conf]# service httpd graceful
 apachectl: Configuration syntax error, will not run "graceful":
 /usr/sbin/httpd: error while loading shared libraries: cannot open shared object file: Error 23
 [root@s15353558 conf]# service httpd graceful
 /etc/rc.d/init.d/functions: line 19: /sbin/consoletype: Cannot allocate memory
 /etc/profile.d/ line 53: /sbin/consoletype: Cannot allocate memory
 /usr/sbin/apachectl: fork: Cannot allocate memory
 [root@s15353558 conf]# service httpd graceful
 /etc/rc.d/init.d/functions: fork: Cannot allocate memory
 /etc/profile.d/ fork: Cannot allocate memory

, ,

No Comments

3 things about backups

In this post I’ll talk about 3 things about backups that you should know. At the end of it, you should understand the different types of data involved in a backup, and some programs which can help you with the backups.

3 different types of data

(Or, why not all data is equal)

Data can generally be classified into 3 groups:

  1. Important stuff that changes frequently – Think work documents, reports and the like
  2. Important stuff that is not changed frequently – Think family photos, videos, music
  3. Unimportant stuff – Stuff like recorded TV shows, or backups of your DVDs

If you want to get technical, you can split ‘unimportant stuff’ into changes frequently/rarely, but that is about making backups simple, so I’m ignoring that distinction.

These distinctions are quite important – the ideal type of backups for each is different. For stuff that changes frequently, a backup process that runs constantly and allows you to retrieve old versions of a file (in case you inadvertently delete a crucial section of your report, for example) is better than something that’s run once a week. But for the stuff that’s changed irregularly, you could probably get away with weekly backups.

I’d wager that most people think of backups as plugging in an external drive and copying files over. Which leads me to my next point: If that is your backup strategy, when was the last time you did it?

Automation of backups

See, backups are worthless unless they’re done regularly. In the first 4 months of the year, I shot 131GB worth of photos. All of them were automatically added to my backups. If I had to do it manually, I’m not sure I would have backed them up.

Which is my point: It’s not a backup unless it’s done without intervention. Human nature is simple – we don’t really want to do stuff. If we don’t have to do it, and we don’t want to do it, face it: we’re not going to do it. Surveys have shown that more than half of computer users backup less than once a year. So, yeah, backups aren’t sexy. In fact, you hope never to need them. But it’s when you don’t have them that you wish you did.

Programs to help you

So, the third and final point. Programs that will help you backup.

First, we’ll look at the important stuff that changes regularly. For that, take advantage of cloud sync tools like Dropbox or SkyDrive. They’re intended for synchronizing two or more computers, but the nice fact is is that they keep copies of your stuff on their servers so they act like a backup. And Dropbox allows you to restore old copies of files from the past 30 days. That meets our needs for backing up important, frequently changed documents. (Not to mention that for stuff like reports, it’s nicer to email people a link to a file rather than attach the entire file, especially if it’s a big one.)

Next, the important stuff that does not change regularly. For that, I look at online backup tools. Nice thing about them is that they’re offsite, so you don’t lose everything if your house burns down. If you’ve got one or two computers to backup, I can’t recommend BackBlaze enough. For less than the price of a coffee at Starbucks each month, you can keep your computer backed up online. If you’ve got more computers though, BackBlaze loses out to CrashPlan, where they’ve currently got a plan that will backup up to 10 computers for USD$6/month. (That’s the plan that I’m personally using.)

And, finally, the unimportant stuff, stuff that you can live with losing. Good news for those who backup with external drives. Your investment hasn’t gone to waste. This is the perfect use for that external drive. Programs like SyncToy or SyncBack allow you to synchronize your files on the desktop/laptop’s drive to the external drive. (I’ve also seen good mentions about Karen’s Replicator, but I’ve haven’t heard as much about it.)

And if you want to have a scorched earth/bare metal backup policy… I shall point you at DriveImage XML. Like Acronis True Image, but free. I tend not to bother with that, because if my computer fails, that probably means it was overdue for an OS reinstall, and the associated program clean up.


No Comments