The Guru College
ZFS, CIFS and TimeMachine – How To
I’m setting up my Shuttle PC again as a secondary file server – as a backup against the primary, larger server. I ran into a slight problem with my primary server – I had some dodgy power connectors to some of my drives, and I thought the drives themselves were failing. Before I figured out what the real problem was, I broke the pool badly enough that any attempt to mount it made the system panic. As none of the data was critical – I do actually have backups of most of it on my primary desktop or I can download the ISO’s again – I wiped the drives out and went with a simpler layout of mirrored disks. Then, I shut the machine down, and won’t use it again until I’ve gotten a real power supply that will be consistent with my drives.
This left me with no backups of our Macs – which bothers me, especially with an international move coming up soon. So, the Shuttle is back in service to host a set of TimeMachine backups. I realized that I’ve set all of this up a few times, and each time I have to look it up again. The setup is after the jump.
On the Solaris server:
- svcadm enable -r smb/server
- zfs create -o casesensitivity=mixed backup-pool/timemachine
- zfs create backup-pool/timemachine/Odin
- zfs set sharesmb=on backup-pool/timemachine/Odin
- zfs set sharesmb=name=Odin backup-pool/timemachine/Odin
- echo “other password required pam_smb_passwd.so.1 nowarn” >> /etc/pam.conf
- passwd bwdezend
- chown -R bwdezend /backup-pool/timemachine/Odin
- zfs set quota=400G backup-pool/timemachine/Odin
On the Mac client: (replacing the odin_000000000000 with your ethernet address)
- sudo defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
- ifconfig en0 | grep ether | sed s/://g | awk ‘{print $2}’
- hdiutil create -size 400g -fs HFS+J -volname “Backup of Odin” odin_000000000000.sparsebundle
- rsync -avE odin_000000000000.sparsebundle /Volumes/odin/.
Then, all you have to do is pick the network volume in TimeMachine (which should show up some time after enabling the TMShowUnsupportedNetworkVolumes setting), and tell it to start backing up. It will ask you for your password for the network share, and then go about it’s merry way.