Set up an NFS mount and connect to it on CentOS/RHEL Linux

NFS mounts have two parts. The first part is the server that hosts the share point. The second part is the client that access the share point. You can have one or more clients accessing the same share point on an NFS server, similar to an SMB or AFP share

For the following tutorial we will assume the following IP addresses:



Set Up the NFS Server

First we need to use yum to install the required software on the server

sudo yum install nfs-utils nfs-utils-lib

Next, start up the NFS daemon

sudo chkconfig nfs on
sudo service rpcbind start
sudo service nfs start

Export the Shared Directory

You now need a directory that you want to share to the network client(s). By editing the file /etc/exports we can specify one or more directories to share as well as options and permissions for them

As an example, we’ll share the directory /home

First edit the exports file in /etc

sudo vi /etc/exports

Specify that this directory is to be shared by adding the following lines to the bottom of the file


These settings accomplish several tasks:

rw: Allows both read and write requests on this NFS volume. The default if this is not specified is to make the share read-only for network clients.

sync: Replies to requests only after the changes have been committed to stable storage. This means that the NFS server will only tell the client that it’s done when it’s written all changes to disk, not just when it’s received the data and it’s still in the cache before it’s been written.

no_subtree_check: Tells the NFS server to not check the entire subtree for permissions. When checking to see if you have permissions to access a particular file or folder, it doesn’t check all the way back up the directory tree to the root directory, it just checks up as far as the directory that is the top-level of the NFS share. This is a bit less secure but generally makes things work more reliably.

no_root_squash: This setting lets the root user connect, as root, to an NFS share. By default NFS will connect the root user on one machine to a share as a non-root user for security.

Once you have edited the exports file, save it (esc, :, w, q if using vi) and then run exportfs to update the mounts

exportfs -a

Set up the NFS client

As before, install the NFS software using yum:

sudo yum install nfs-utils nfs-utils-lib

Mount the MFS Share

Make a directory on the client machine that you want to mount the NFS server on, e.g.:

sudo mkdir -p /mnt/nfs/home

Start the RPC portmapper

sudo service rpcbind start

And then, mount the NFS server onto the directory you have just created

sudo mount /mnt/nfs/home

You can then use the mount command to check that it’s mounted and then df -h to see that there’s another filesystem there with it’s own free space. Testing the NFS Mount.

To make sure that the NFS share is remounted when the server is restarted, add it to the fstab

sudo vi /etc/fstab /mnt/nfs/home nfs auto,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800 0 0

Product Review – Logitech case+drive

Could this be it? The perfect car kit for the iPhone, or any device for that matter?

The basic premise of the Logitech case+ range is simple. There’s a case for your phone, and there are other bits that attach to it. The basic case+ is a slim soft-touch plastic case in a few different colours that fits the iPhone 5 and 5s. (Read on, even if you don’t have an iPhone 5/5s) There is then a nice brushed metal back on the case, with case+ neatly engraved near one corner. This back panel is made from steel, so as well as the functionality it provides for the case+ system, it also offers good protection to the phone. Inside the case+ is a soft fabric backing piece to protect the rear of your device.

The + bit in the name is because there are then a number of accessories that magnetically attach to the rear of the case.

Case+tilt is a smart-cover style pad with three sections that firmly attaches to the rear of the case and can be used as a stand and as cable management for headphone cables. Neat, but not what I’m reviewing today.

Case+energy is a high-capacity battery pack, similar in concept to the Magnetic Battery Case I reviewed previously, which is also cool, but not the subject of this review.

Case+drive is what I purchased today and the +drive module is a slim and very minimal looking suction cup windscreen mount. Visually it’s a soft-looking grey cone with the pointy end chopped off. The wide end attaches to the windscreen and then the front end hinges upwards to reveal a big yellow handle that you turn once the suction cup is on a smooth surface – once you’ve done this, it’s not coming off again unless you want it to!

The end of the +drive is a smooth, flat surface with a big magnet in it. The process of attaching the case+ to the mount is then to wave your phone somewhere in the general direction of the +drive whereupon it snaps into place and is held very securely. It’s also easy enough to get your phone back off the mount, at no stage does it feel like your phone is being held too tightly and you can’t get it off.

Now, even if you don’t have an iPhone 5 or 5s, don’t despair. If you buy the +drive as a standalone module (I’m not sure if this is the case if you get it in the case+drive bundle), although it says on the rear of the box that it requires the Logitech case+ iPhone case, it actually comes with two self-adhesive metal plates that will attach to just about anything you want to. One of the metal plates is the same brushed silver as the case+ backing plate, the other one is a smooth black finish. Had I known this before buying the case+ and the +drive separately, I may have just gone for the +drive mount on it’s own and stuck the plate to my iPhone.

About the only downside to this system is that the windscreen mount is pretty short. In my car, this isn’t a problem but if you’re in a vehicle where you are further back from the windscreen than I am, it may be harder to reach your phone. There is a circular flat disc with 3M VHB (Very High Bond) adhesive on it that can be stuck to the dashboard if this is the case (and if your dashboard is actually flat, as mine isn’t).

In use, the soft finish of the +drive mount and the strength of the magnets means that the phone doesn’t really move around at all while you’re driving, or while you’re tapping on the screen, which is unlike the Steely car mount I was previously using. I don’t know what the rated weight is for this, but you’d probably be able to hold even a small tablet using one of the included self-adhesive metal plates.

This kit combo isn’t the cheapest on the market, but ultimately you’re paying for quality and it performs very well. If price is an issue, go with the +drive mount on it’s own and stick the metal plate on the back of whatever device or case you’re currently using.

Product Review – Clingo Universal in-car holder

I’m on the hunt for the perfect car mount for my iPhone. Shouldn’t be too difficult, no?
Well, as it turns out, it’s harder than it looks to find something that really does everything I want it to.

First up, my #1 requirement is that it’s not huge and bulky. I’m not having my iPhone grabbed by hulk hands or anything crazy like that, so that immediately rules out just about all “universal” phone mounts.

My #2 requirement is that it’s easy to get the phone into the mount and back out again. I’m not going to use anything that requires two hands to get the phone into or out of.

With these requirements in mind, I had the fine gentlemen over at MobileZap send me a contender – the Clingo Universal In Car Holder.

Physically, it’s quite a simple thing – a suction cup, an arm and a phone holder. Where this device deviates from the norm however is in it’s method of holding your phone – instead of a clip that has to hold your phone firmly, this uses a (reusable) sticky pad to securely hold your phone. In fact, it’s such a secure hold that the first few times I used it, I actually had difficulty getting my phone off again – It almost felt like it was going to take the back cover off the phone. No danger whatsoever of your phone falling off unexpectedly.

The suction cup holds the windscreen very well and you can, like most of these mounts, adjust the arm to pretty much any angle you need to. The self-adhesive holder for the phone can be rotated to portrait or landscape mode and you can tilt the phone so you can see it clearly while driving. The arm is quite rigid, so that even though your device is held out from the windscreen a fair distance, it doesn’t flop around at all.

The great advantage of this unit is that it is truly a universal holder – it will hold anything with a flat surface very securely. You can have a bare phone or you can have your phone in a case. You can mount a GPS or a camera, or just about anything else you might need to have in the cockpit of your vehicle. It holds a GoPro quite nicely for example – although the GoPro is quite a bit heavier than the phone, as long as you get the sticky pad to make good contact with the back of the GoPro case, it stays in place.

My only criticism of this mount is that the pad is, if anything, too sticky. It really was difficult to get my phone off the first couple of times. Once it’s been used a bit and it loses a bit of stick, it’s all pretty good. If it gets oils, dust or fingerprints on it, you can wipe it down with a damp lint-free cloth and the stickiness is restored.

The mount kit is slim and unobtrusive and you can easily get your phone on and off the pad with one hand. Pair it up with a car charger and you’re good to go. It holds your device securely and you can easily change between landscape and portrait orientation on-the-go.

Product Review – Magnetic Battery Case for iPhone 5/5S

I was recently given this Magnetic Battery Case for an iPhone 5S to review and whilst it’s generally a well made case that does exactly what it says, there are a few quirks you need to be aware of.

First up, what is it?

It’s a slimline, hard case for the iPhone 5 or 5S with an add-on high-capacity battery that can sit on the back. Hidden in the back of the phone case are a few strategically placed magnets that mate up with the battery pod, easily holding it snugly in place and then there’s a short lightning cable that plugs into the phone to charge the phone’s internal battery.

The case itself is a regular case that protects the surface of the phone from scratches and small bumps (although it’s not shock resistant or anything like that) and it’s available in a few different colours to suit your phone or suit your mood.

The battery pod has the same colour on the rear with a smooth white acrylic front surface that seems to hold onto the rear of the phone case quite well (along with the magnets holding it in place)

The battery pod has a great level indicator, reminiscent of the battery indicators Apple used to use on laptops, that lights up to show the charge level at the press of a button. There’s also a small lightning port on the bottom of the battery pod that you can use your existing lightning charger to recharge the external battery.

First the good; The case is well made, it’s got a metallic rubberised texture on the back of both the slip on case and the back of the battery pod. The battery has a quoted 2800 mAh capacity that can more than double the usage you can get out of your phone. The pod doesn’t need a separate charger as you charge the battery pod with the same lightning cable and power adapter you use to charge your phone. The battery indicator on the pod is also quite useful to see at a glance how full the battery is.

The case is made well, it fits the phone tightly and securely – at no stage does it seem like it’s ever likely to come off of it’s own accord. The battery sits in place by itself without having to be clicked or snapped on to anything and is just as easy to take off again.

Now for the not so good; The first thing I noticed was that this isn’t licensed under Apple’s Made for iPhone program with the result being that, every time you plug the charge cable from the battery pod into the phone, you get a notification on the phone’s screen “This cable or accessory is not certified and may not work reliably with this iPhone”. Personally, I find these little details kind-of annoying to have to dismiss every time. Granted it’s better than having a flat battery though. My other main gripe with the battery pod is that the cutout for the camera is not quite big enough – it really needs to be tapered somewhat as with the wide-angle of the iPhone’s lens, you get some vignetting in one corner of the picture when the battery is in place.

All in all though, it’s a decent case at a good price if you often find yourself running short of juice and are not in a position to recharge your phone. Having the battery pod being external to the case is an excellent way to keep the bulk of the case down for everyday use. If you think it’s not your cup of tea however, you can always head over to MobileZap (who supplied this case for review) and see what else they have in their huge range of iPhone 5S cases.

Hide Recovery HD after cloning an OS X installation

Sometimes when you clone an OS X installation, for example using Carbon Copy Cloner, it will create a Recovery HD partition but not hide it for you.

The “hidden” status of a partition is determined by it’s partition type – in the case of the Recovery HD partition, it’s set to type Apple_Boot and this hides it from Disk Utility and prevents the Finder from mounting it.

If you have one visible and want to make it hidden, then there are a few quick commands you can run in the terminal to fix it’s type;

First, find what device contains the Recovery HD that’s mounted:

mount | grep "Recovery HD"

This will return something like the following where I’ve hilighted the important bits in bold.

/dev/disk2s3 on /Volumes/Recovery HD (hfs, local, journaled)

We can see that the Recovery HD is /dev/disk2s3 in this example (it will probably be different for you, so don’t take my word for it!)

Next, run the following two commands, replacing /dev/disk2s3 with whatever you had returned above. The first command unmounts it from the desktop so we can have greater control over the device, the second one adjusts it’s partition type to an Apple_Boot partition so it stays hidden as it should be.

/usr/sbin/diskutil unmount /dev/disk2s3
/usr/sbin/asr adjust --target /dev/disk2s3 -settype Apple_Boot

Reset OS X Mountain Lion web server settings

I’ve been doing a fair amount of non-standard tweaking to Mountain Lion’s web services.

It’s not difficult to completely break the web server, and initially it looks like it’s near impossible to fix it unless you know exactly what you did to break it.

Fortunately, there’s a quick command you can run in the Terminal to reset the web services to their factory default settings.

Go into the Server app.

Turn off Profile Manager, Web and Wiki.

In Terminal, run the following command

sudo serveradmin command web:command=restoreFactorySettings

Then, go back in and turn on any services that you just turned off.

That’s it.

Be aware that this will completely wipe out any custom websites you may have defined – the entire web service is reset to factory defaults.

Data Corruption on Promise Pegasus R4 Thunderbolt RAID

I recently set up a Mac mini Server with a Promise Pegasus R4 RAID.

I reinitialised the array a RAID6. I left the stripe size at the default of 128k, and changed the block size to 4k as this should increase performance.
As the array was initialising, if I copied data to the RAID using the finder, the data would get corrupted. Once the corrupt data was written, every time I went to read it back, I got the same result (verified with md5 hashes)
If I copied data to the RAID using the command-line, it was OK.
If I used the Finder to duplicate a file on the RAID – corruption.
If I copied a file to the RAID over the LAN it seemed a bit better, but occasionally got corruption.
I turned off the write back cache and this didn’t make any difference.
I erased the array and re-initialised it with a block size of 512 bytes and it all (so far) seems OK.
I didn’t wait the 24 hours it seems like it was going to take to see if the array was stable once it had completed initialisation, it’s possible that it would be OK, but I didn’t have time to take a chance on this…

SSL Certs on sale at GoDaddy

Yes, if there’s one thing that GoDaddy are good at, it’s pimping their wares.

Occasionally though their sales are useful. Like this one – if you’re running your own mail server or a website with a dedicated IP, you can get an SSL Certificate for just $6 per year. They’re normally around $50/year, so this is a bit of a bargain – something like 88% off the normal price:

We've Got Your Site Protected! $5.99 SSL Sale!


Sorry to anyone who’s inconvenienced by the addition of reCAPTCHA to the comments, but even with Akismet I’m still getting an unacceptable amount of comment spam. Interestingly enough the comment spam has really picked up since my blog moved to GoDaddy whereas it was at a fairly minimal level on the previous host…