Monthly Archives: October 2017

A successful migration

I migrated to the Raspberry Pi successfully. Most of the work was getting the Raspberry Pi back in working order after I accidentally broke the Raspbian installation with an incomplete update that paused right at the libc6 installation two weeks ago.

Most people will tell you that when things start to go awry and you don’t know why, just reinstall everything. The advice, while it may work, is incredibly unhelpful because they fail to understand all the work and reconfiguration that does not get magically copied over on reinstallation. I think it’s just a byproduct of today’s consumerist thinking: don’t bother repairing, just replace. Who cares where the broken stuff goes? The death of shop classes, as I had previously witnessed, is simply further evidence of this consumer culture.

And if you start whining, they’ll tell you to shut up, “managing a server yourself will take many hours,” “read this basic tutorial to the letter,” or “your posts show no research, get out.” And if you really do start making complicated arguments like the absence of fast reconfiguration on reinstall, they’ll tag out and bring in the intellectuals who will evangelize Docker and “write-as-you-go Bash scripts” at your face; “that, or consider paying someone to manage it for you.” What is more insulting than someone telling you outright that acquiring expertise is futile, and to simply give money that you don’t have to an “expert”?

Linux forums depress me, as the “pros” come off as, for lack of a better word, elitist. (There’s definitely a better word to describe them, but I can’t think of it right now.) Basically, if they don’t recognize you or your post count seems fairly low (less than 1,000), they’ll intentionally ask for information about your system beyond what is actually needed.

Anyway, back on topic. In short, I had to reinstall Raspbian, but I first had to back up the partition, which I thought I could do via SSH, but it seems that SSH would randomly halt with “Illegal instruction” around 20% of the way into the transfer. NOOBS doesn’t have SSH or any other file-transfer method (except netcat, maybe), so I just put the SD card in my laptop and transferred the files out. Then, I reinstalled Raspbian.

The configuration process was easier than I had originally conceived. You just install nginx, PHP, and MySQL (which is just a meta-package to install MariaDB – I didn’t know it was a drop-in replacement!), and then you copy in the site’s .conf file to /etc/nginx/sites-available and symlink it to /etc/nginx/sites-enabled. Next, you copy the site data to /srv/[site-name] – don’t copy to /var/www because that’s not the point of /var according to the Linux FHS (but packages aren’t allowed to automatically configure to /srv because the directory’s organization is at the sysadmin’s discretion). Finally, you make www-data take ownership of certain WordPress files, such as everything in wp-content and wp-config.php. To set up the database, just mysqldump from the original server, transfer the query data over to the new server, and pass it as standard input. Don’t forget to re-create the WordPress database account.

Meanwhile, the PowerEdge 2600 is on the chopping block. DIMM bank 1 has been reporting an ECC fault since June, and ever since I restarted the server a few weeks ago, the first drive on the array has been reporting predictive failure, which will bring the array in degraded mode once it fails.

However, why should I put my entire server at the mercy of an SD card that can fail at any time? Hence, I should make a backup configuration now, before it is too late…

Update: I listened to the server spin down for its penultimate time: the PowerEdge has been shut down for good. The RPi has also been set up to perform daily backups of directories with user data and non-default config data on them.

I’ve sunk way too much time into this endeavor, and now I am very behind on my homework. I’ll have to work almost nonstop through the night if I want to get that homework done in time.

On top of that, now I must do a backup of the PowerEdge without arousing questions of what I actually used the server for. It’s almost disgusting how long I convinced myself to use that for, and how much money my dad probably ended up spending over the years just for power. A NAS would have been so much of a greater investment than that pile of junk; now the server is only worth the metal that it is made of.

Migration event soon

I tried to connect to my own website on Friday, but the connection kept timing out. My mind raced with all of these awful thoughts: maybe some script kiddie finally breached the PHP process and decided to bring everything down. Or perhaps a disk failed on the old SCSI RAID array, and now the server is just waiting for me to connect a keyboard and press Enter all the way back at home to start the server in degraded mode.

But alas, the reality was none of it. Upon returning home on Saturday, I entered the attic and saw that the server was off, fans spinning at idle. I impatiently turn it on, the machine roaring to life once again. I supervise the whole process: everything good. Maybe there was a power outage?

Yet more wrong guesses. The culprit was my father, who decided to turn the server off (God knows in what way – did he really push the power button until it turned off?) without any express notice. Later he made an off-hand remark about how he had turned the server off, not knowing that I turned it back on again.

I want – well, now need – to migrate the server. It’s old, it’s heavy, it’s loud, and it’s expensive in power costs (costs about as much as the pool filter in kilowatt-hours per month). It’s pointless to keep it around, and probably embarrassing to explain why I still use it.

My main choices are to throw the site into my Digital Ocean droplet. I could use a Docker container but then I would have to learn how to deal with volatility and general maintenance.

There is also the option to convert everything into Jekyll; the main problem with this is that I am very unfamiliar with Ruby, and I would lose the markup characteristics of HTML (at least that’s the impression they give me). On top of that, I don’t know how to transplant my blog template into a Jekyll template (it’s not my template!) and I don’t want to give into the overused templates they offer. And then after that, where will I host the site? GitHub? There’s no reason for me to push my rants into GitHub, so the world can see what kinds of “contributions” I make every couple of weeks.

Finally, there is the option to move into a Raspberry Pi, which would grant me the benefit of continuing access to my home network, zero maintenance costs (my parents pay for power), and minimal changes to the web stack I currently use.

So immediately before leaving off for college again, at the cost of probably arriving late, I fumbled around for my Raspberry Pi and connected it to the Ethernet port in my room. I guessed the password a couple of times via SSH and then just decided to pull out the keyboard and break into it locally, so that I could remember what the password was. Oh, right, it’s those credentials. I shove the keyboard and dongle back into my duffel bag, gather my other things, and finally set out.

Now, it is my responsibility to get the RPi up to speed, as the new successor of the PowerEdge 2600.