birds like wires

Search

Showing 'servers' tagged articles.

Failed Core Storage Conversion

We have a Mac mini connected to an external storage box via FireWire. In a reasonably sensible manner, someone pointed Time Machine at one of the volumes on the DAS, thinking they should back the machine up to this location. They also thought also it would be best to encrypt the backup; very laudable.

However, this triggered a conversion process into an Apple Core Storage volume, which did not complete successfully. Luckily, OS X stopped trying and remounted the volume as HFS+. All appeared to be well, but after a reboot things were much less cheerful.

On restarting the machine, the volume was missing. Checking with diskutil list returned this layout:

/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *17.6 TB    disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:                  Apple_HFS Backup                  2.0 TB     disk1s2
   3:          Apple_CoreStorage                         15.6 TB    disk1s3
   4:                 Apple_Boot Boot OS X               134.2 MB   disk1s4

But diskutil cs list returned this:

Keep reading...

Caching Server Cache Size

The Caching Service in OS X Sever is great – turn it on, and it largely works just fine. However, I host the cache itself on a Drobo. The Drobo appears as a 16TB volume on the system, so Server.app thinks it’s just a wonderful idea to give me Cache Size slider graduations of 30GB, 1TB, 2TB, etc. That’s not helpful.

Luckily, Apple haven’t obfuscated the configuration for this at all, and I’m not being sarcastic for once. Just go to:

/Library/Sever/Caching/Config/Config.plist

You’ll find the CacheLimit key right there at the top, with an integer value in bytes. Turn off Caching Server, edit, turn Caching Server back on again. Lovely.

Screenshot of Server.app showing the Caching Server config panel.

Okay, so the slider shows the wrong value, but the Usage area gets it right. Now why couldn’t they have just put a box in the UI? Ah, because this is Server.app, not Server Admin.app.

My sarcasm is creeping back!

Keep reading...

Dead Simple Dynamic DNS Updater

I’d been messing with ddclient, trying to get things to play nicely with DNS-O-Matic, Tunnelbroker and Hurricane Electric’s own dynamic DNS system. Problem was, although everything was configured correctly it still wouldn’t update my DNS! It worked when I told it to, but when the IP genuinely changed, it all went wrong.

It turns out that when my IP changed, ddclient was indeed trying to update things. However, it was trying to do it over the IPv6 tunnel which, due to the altered IP address, was now broken. And I could find no way in the config to specify that the tunnel should be updated first, over IPv4. Hmm.

So, I sacked off ddclient and went for the world’s simplest dynamic DNS client. A bash script and curl.

Easy Peasy

Most of the dynamic DNS services have a simple HTTP method for updating. Some have HTTPS, so you’re not waving your password around in clear text. Switching to an IPv4-only updating mechanism is as simple as this:

Keep reading...

Tunnelbroker and Dynamic IPs

Change of plan! While the details provided here are accurate and may well be useful if you’re configuring ddclient, I found issues updating my DNS information this way. So I opted for something much simpler, which I’ve written up here.

My shiny new router, which I’m hoping to write a proper article about soon, supports IPv6 tunnelling. IPv6 is going to become increasingly important over the next decade, as we’re running out of IPv4 (the ones that look like 208.67.220.220) addresses to give to all of the devices out there. Internet service providers are going to need to pick up the pace of handing these out, but in the meantime for those that don’t (such as BT) there are tunnelling services.

An IPv6 tunnelling service does basically what it sounds like; shoves your IPv4 traffic through a tunnel so that it pops out of the other end with a valid IPv6 address. You can then access services that only use IPv6… okay, that’s not many right now, but hey – you’re future proof! There are a few different providers out there, but I use Tunnelbroker. If your router supports it, you can configure the entry point to the tunnel from the details Tunnelbroker provide and pow! You’re accessing IPv6 sites.

Keep reading...

Fix Postfix for Gmail on Snow Leopard

This is a quick and dirty method for getting Postfix (as built-in on Mac OS X v10.6) to send mail via Gmail.

My little home server is a tweaked Mac mini, but Snow Leopard is the last version of OS X that will work on it without even more hacking around (besides, it’s the best version of OS X Server, IMHO). I had a search around on the web and after combining a few different methods, came up with this to make it work.

Sort out Certificates

Google changed to using Equifax as their certificate signing authority some time ago, but Postfix doesn’t know about them. So, you need to add their certificate (and we’ll add Thawte at the same time, for good measure).

Start by creating a certificates directory:

sudo mkdir /etc/postfix/certs

Jump into it and create a file called Equifax_Secure_CA.pem, then copy the following into it:

-----BEGIN CERTIFICATE-----
MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJVUzEQMA4GA1UE
ChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5
MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoT
B0VxdWlmYXgxLTArBgNVBAsTJEVxdWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCB
nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPR
fM6fBeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+AcJkVV5MW
8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kCAwEAAaOCAQkwggEFMHAG
A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UE
CxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoG
A1UdEAQTMBGBDzIwMTgwODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvS
spXXR9gjIBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQFMAMB
Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAFjOKer89961
zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB
BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95
70+sB3c4
-----END CERTIFICATE-----

Then you need to create the Thawte one as well. Call it Thawte_Premium_Server_CA.pem.

Keep reading...

Mac OS X Server and DNS

I’ve just bumped into this little chestnut again, and thought it would be worth documenting quickly, once and for all.

If you run Mac OS X Server, the one thing that is more important than anything else is to make sure the DNS hostname is set correctly. It’s fundamental – everything breaks if it’s not working. Out of the box, Server even configures its own DNS server to make sure the details are correct.

Now, I run my own internal DNS using Mac OS X Server, just so I don’t need to remember IP addresses. However, after adding an address to the DNS yesterday, the hostname of the server magically changed. I didn’t ask it to, it just happened. It was time to break out the repair tools.

Three Commands Will Save You

They are changeip, scutil and dscacheutil. Remember them, because they are your only friends. If the DNS is iffy, Server Admin runs away and needs some coaxing to play again (which, of course, is really helpful).

First, make sure that your IP address is correct. Please tell me you’re using a static IP? Yes? Good. If that’s not the issue, fire up Terminal.app and find out what’s going on. My first hint was that the hostname next to my command prompt had changed, which is a pretty big clue. Run:

Keep reading...

Ubuntu Server for Joggler

As one of my early Joggler releases, this has now been superseded. If you’re looking for a lightweight Ubuntu system for the Joggler, I’d recommend downloading SqueezePlay OS and deleting SqueezePlay from /opt/.

In developing the Joggler reflash tool it was obvious I’d need a relatively lightweight Linux which would actually run the script. There are distributions that are a lot more lightweight than Ubuntu Server, but because I’m used to using it and there was no startup cruft to clear out, it’s the one I went for.

This has the happy side effect that those people interested in running a Joggler as some type of server-only device can grab a copy of this and get started quickly.

The Details

I’ve set this version of Ubuntu Server up with Jools Wills’ 2.6.38.4joggler1 kernel, which was the latest version at the time of writing. The filesystem consists of a 128MB FAT16 boot partition with the remainder formatted as ext2, so there’s no journal to worry about on flash devices. The fstab mounts the FAT16 partition to /boot on startup, just like Jools’ GUI releases. There is no swap on this system, so if you plan to use it long-term, that’s something you should probably add.

Keep reading...

Moving Apple Software Update Files

Here’s a fun one. You’ve set up Software Update Server on your Mac OS X Server system and all is fine. Then you realise that you’re the proud owner of a directory containing 52GB of software updates and you’ve put it in a silly place.

You shut down Software Update in Server Admin and move the directory to a bigger drive. You reconfigure the path and then re-enable the server. You see from the logs that all is well and you fire up Software Update on your client machine.

Hooray. That’s not quite what we were aiming for.

Foolishly, I have in the past simply resigned myself to ‘fixing’ this by deleting the software update directory, recreating a blank one and erasing all of the configuration files in /etc/swupd. This is a silly thing to do as you’ll end up downloading that 52GB all over again. It turns out the solution is ridiculously simple.

sudo rm <path to swupd cache>/html/index*

This removes the various .sucatalog symbolic links which are still pointing towards your original software update directory. Software Update Server isn’t clever enough to repair these if the directory is moved, but it is clever enough to recreate them if they’re not there.

Keep reading...

Mac OS X Lion and Xterm

If you’re running Lion as your desktop OS, you may well have bumped into this little one already. If you try to use commands such as nano or top or many other normal things, you may well be getting this error.

Error opening terminal: xterm-256color.

Brilliant.

It happens because there is no file defining a 256 colour session in Snow Leopard, or Leopard, or Tiger for that matter. You’re even likely come across the error when SSH-ing in non-Mac systems. So how to solve it?

Keep reading...

Updating VMware ESXi

I don’t like visiting vmware.com. It means that there’s a problem, and I know that the solution will involve an awful lot of searching and staring in bafflement, usually with pretty high stakes. Feeling lost and apprehensive, I delve through many pages of documentation looking for the latest instructions that really should be in bold on an obvious page, or at the very least returned in my searches.

So you can imagine my happiness when I discovered that the incredibly simple, stress-reducing vSphere Host Update Utility has been unceremoniously ditched for ESXi 4.1. Gone. Kaput. Why? Only a cynic would say that it’s to encourage users to give VMware money for their fancier tools. And I’m not cynical. Oh, no.

Keep reading...