Category Archives: Computers

Articles related to the machine army

UUIDv4 in MySQL

Although MySQL has a UUID() function, it returns a version 1 UUID, which is time-based and has mostly been replaced by the completely random version 4. I recently needed a v4 in a query, and adapted this from some different options I found online: You can either use this inline in your select statement, or convert […]

Upgrading Samba 3 to 4 on FreeBSD

Since Samba 3.6 finally became end-of-life on FreeBSD, I’ve been forced to upgrade to Samba 4 on my servers. Luckily, it was a relatively painless update. # portmaster ‑o net/samba43 samba363.6.25_1 # mv /usr/local/etc/smb.conf /usr/local/etc/smb4.conf # mv /usr/local/etc/samba/* /var/db/samba4/private/ Finally, in /etc/rc.conf replace samba_enable=“YES” with samba_server_enable=“YES”. You can now restart Samba with the command: # […]

Reducing the number of disks in a ZFS pool

In the past I’ve shown how easy it is to expand a ZFS pool by adding extra disks. While this is the easiest way of expanding your storage capacity, it does come with a downside: From that moment on, you’re stuck with the larger number of disks, as ZFS does not have an easy way of […]

Fixing NextGEN Gallery and wp-typography compatibility

I figured out what broke the images on this site a while back. I run several plugins on this wordpress site, among which are NextGEN Gallery (an image gallery plugin) and wp-typography (which cleans up typography and styles certain parts of the text). However, a patch of NextGEN gallery a while back broke the compatibility of these […]

Rebuilding world on FreeBSD

To upgrade FreeBSD between versions, I generally rebuild world with the latest sources. You can easily get the ‑RELEASE tarballs using fetch. I generally remove the old /usr/obj and /usr/src completely before I start. # cd /usr # rm ‑R obj # rm ‑R src # fetch “ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/10.0RELEASE/src.txz” # tar ‑x ‑C / ‑f src.txz Obviously, for […]

Growing a ZFS pool — Update

In an earlier post I described how you can grow an existing ZFS pool by replacing all the disks with bigger ones. That article was written several years ago, for FreeBSD 7.2. Currently we’re at FreeBSD 9.2, and the ZFS implementation has evolved somewhat, making that article no longer accurate. Most importantly, this concerns the […]

Using GMirror as a rollback tool.

On Thunderflare, which predates affordable solid-state drives, the OS is run from two small laptop drives in RAID 1. The RAID 1 is there so that if one of them crashes, I won’t have to do a complete reinstall. I’m lazy, sue me. Besides, a reinstall would take a lot of time, while setting up […]

Machine army and Penelope timeline

I’ve updated the Machine Army page with a list of my current and past machines. I’ll expand this page further as I have the time. I’ve also published the full upgrade timeline for Penelope, my main workstation.

SSH connections without a password

One of the basic ways of connecting to a FreeBSD server is through a secure shell, commonly referred to as ssh. The most basic usage of an ssh connection is to give you a full-fledged command prompt on the remote machine. However, the ssh connection can also be used as a tunnel for countless other things, […]

Expanding a ZFS pool

In an earlier post, I explained how it was possible to grow a ZFS pool by replacing all disks one-by-one. In that post, I also mentioned that if you have enough spare connectors available, you can easily expand the pool by adding another array of disks. A while back, I had replaced a bunch of older […]