Thursday, November 10, 2016

Alternatives for separating the OS X users home directories

Alternatives for separating the OS X users home directories


Most OS X installations youll find, probably use just one partition per disk. This may be convenient, but coming from years on Unix/Linux, thats a no-go for me... We can do better...
So, lets see how we can get the users home directories on a separate partition ("Volume" in Mac OS X parlance) or disk.

You might be asking why? and what is that good for?
Well, having /Users on a separate partition makes it easier to backup and manage your installation, and if you ever want to reinstall your OS, your data will remain untouched (For a more in-depth description of considerations, check out my post on Multiple Partitions on OS X - Pros and Cons).

This will also be beneficial for owners of SSDs, as it allows them to have the OS and applications on the SSD, and user data on a hard disk drive.


Alternatives

There are several ways of separating a users home folder:

Option 1: Using System Preferences|Accounts

Right-click on a users icon, select Advanced, and change the users "Home Directory".
Nice and easy... But we have to do it for each user (and when we add new users, we have to remember to do it again).
Worse yet, some applications insist on looking for the users home directory under /Users...

Option 2: "Symlinking" /Users to the new partition

A hackish way of doing it...
Just create a symbolic-link (shortcut) from /Users to point to the new partition.
While this works, we still have to deal with mounting the new volume.

But theres a "cleaner" way... The Unix Way...

Option 3: Mount the new partition on /Users

Sysadmins delight !
Well modify the /etc/fstab file so the new partition is mounted on /Users.


You probably guessed it... I prefer The Unix Way

Ill explain this in detail How to move the OS X /Users to a separate partition in the next post.

Available link for download