Patrick Stetter

Eventually this site may have a purpose

New root drive forays

It's that time again - my root drive in my headless server is failing. Time to buy a new one and get a fresh install going. While replacing / is a pain, thankfully we've got Debian on our side, so it could be worse.

Since I last did this, SSD drives have continued to improve. I picked up a 250GB Samsung 850 EVO for less than the 60GB Corsair that's now failing that I bought back in 2012.

https://goo.gl/photos/21jYwYkruocMJgX78

The drive has come, so it's time to get to work. I considered a few different approaches:

  1. dd if=/dev/sda of=/dev/sdb
  2. cp -rf /etc /home /mnt/ && dpkg --get-selections > /mnt/tmp/dpkg.sel && chroot /mnt && dpkg --set-selections < /tmp/dpkg.sel
  3. fresh install

In the end, I decided on a mix of 2 and 3. This install has picked up a decent amount of cruft over the years, so it's a nice chance for a fresh start. I grabbed a fresh Jessie netinstall, formatted the new SSD - oh crap I set up swap space on an SSD - old habbits die hard.

https://goo.gl/photos/cppv33Tg6XXN75Nb8

With the base image up and running, I took a look manually at the packages I had on the old system. Now's the time for the great culling.

With the required software in place, it's time to configure a few important services this machine provides:

ssh server exim4 mail server mdadm software raid cryptsetup encrpyted partition mpd music server samba server nfs server nginx webserver with letsencrypt crashplan backup

ssh and surprisingly exim4 were a breeze. Just installed the packages, copied the config. And it "just worked." mdadm and cryptsetup were similar, but actually only required installing the packages. Mdadm autodetected my raid 6 on the next boot - kudos to these projects! For mpd, again it required an install and copy of config - but then I had to remember the extra step of triggering the rescan. That's kind of annoying... Samba was dead simple - install, and copy config. My user accounts were the same as the source drive, so this required nothing further: nice!

The webserver required a bit more pain. The website is built in Firmant - which is a now defunct python "compiler" for webpages built by a student at my alma mater. I had to dig around for all the dependencies this had, including some now deprecated pieces of python. After that was setup and the initial website was generated, I found a few config files in /etc/ssl I had neglected to copy. But it was short work to get the website back up.

Now for crashplan. I bought this service heavily discounted after I lost all my data during a raid 5 rebuild. That's when I truly understood that raid isn't a backup. I mean, I think I always understood this at some level, but as a cheap student, raid was sufficient. Now, I can afford the $3 a month for peace of mind. However, the crashplan server is a horrid java application that needs to be downloaded directly from CrashPlan's website and installed manually. UGH. It also has some terrible settings by default - http://networkrockstar.ca/2013/09/speeding-up-crashplan-backups/.

I had to download new versions of the client and server, go through a special process to "adopt" my previous backup, and then left this fat java process rescan my entire 5TB raid. Fun. But at least its working.

And with that, we're good to go again. At least as far as I can tell. I'm sure there will be little things here and there that I need to still set up, but at least all the cruft is gone from the previous install and we're "fresh" again. :)

Lessons Learned: * Wouldn't it be much nicer to have etc/ and home/ managed by git. git cherry-pick seems much more like the

System Message: ERROR/3 (./posts/2016-02-06-root-drive-replace-fun.rst, line 76)

Unexpected indentation.
"right thing" to do rather than arbitrarily copying over etc/ config files by cp.

System Message: WARNING/2 (./posts/2016-02-06-root-drive-replace-fun.rst, line 77)

Block quote ends without a blank line; unexpected unindent.
  • The more widley used and supported a tool is, the better off you are. Homebrewed and friendbrewed tools == liabilities. I need to port over to ikiwiki or something.
  • Free software > Non free software in the debian repo > Unpackaged software (curse you crashplan!)
  • Swap space on SSDs is a no no.
  • Systemd on a fresh install with an SSD is blazingly fast. Wow. This thing may only reboot a couple times a year, but it feels like a Ferrari.

Welcome

I'm not sure what I intend to do in this nook of the web, but I'll probably post links to my projects and information about myself.

Copyright © 2011 Patrick Stetter GFDL 1.3 ¦ Powered by Firmant ¦ [Hacker] [Atom] Valid XHTML 1.0 Strict

mail@stetter.us