We used Niftydrive with Sandisk 128gb UHS-I Micro SD Card and this config to allocate more space for Macbooks with small ssd drives. For 128gb and 256gb models this is a lot more space.
Save yourself the trouble and don't try to buy UHS-II cards since they don't have better performance vs UHS-I in Mac.
Please use Filevault encryption in your main hard-drive. This setup makes it easy to use Time machine backups to the contents of the SD card too.
First erase the partition scheme and use GUID. Then erase the partion on the sd card and split it into two parts:
- 1 insecure partition
- 1 encrypted partition
Open Disk Utility -> Choose SD Card -> Erase -> Use HFS+ (Journaled) and GUID
Then
Open Disk Utility -> Choose SD Card -> Partition -> Allocate 20-60gb for the encryption -> Use HFS+ (Journaled, Encrypted)
Reboot your machine after this and when prompted store the encryption key to secure partition in osx keychain.
In this example my secure partition is /dev/disk5
which is mounted in /Volumes/Minisecure
and normal partition is /dev/disk3
which is mounted in /Volumes/Minidrive
.
$ diskutil list
...
/dev/disk3 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *127.9 GB disk3
1: EFI EFI 209.7 MB disk3s1
2: Apple_HFS Minidrive 63.1 GB disk3s2
3: Apple_CoreStorage Minisecure 64.3 GB disk3s3
4: Apple_Boot Boot OS X 134.2 MB disk3s4
/dev/disk5 (internal, virtual):
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Minisecure +63.9 GB disk5
Logical Volume on disk3s3
629361E0-1635-4287-8A76-6708D20A595B
Unlocked Encrypted
Check where the disks are mounted:
$ df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
...
/dev/disk3s2 59Gi 150Mi 59Gi 1% 38313 15362605 0% /Volumes/Minidrive
/dev/disk5 60Gi 150Mi 59Gi 1% 38323 15571531 0% /Volumes/Minisecure
Consider these as safe things to store inside the sd-card even without encryption. If you have a really bad taste in music that should be encrypted as well. Also don't torrent anything illegal since those won't be encrypted with these configs.
$ export NIFTYPATH="/Volumes/Minidrive"
$ mv ~/Music $NIFTYPATH/
$ ln -s $NIFTYPATH/Music ~/Music
$ mv ~/Movies $NIFTYPATH/
$ ln -s $NIFTYPATH/Movies ~/Movies
$ mv ~/Torrents $NIFTYPATH/
$ ln -s $NIFTYPATH/Torrents ~/Torrents
# Create one cache folder for all cached images and libraries
$ mkdir $NIFTYPATH/cache
# Move composer cached libraries
$ mv ~/.composer/cache $NIFTYPATH/cache/composer
$ ln -s $NIFTYPATH/cache/composer ~/.composer/cache
# Move cached vagrant boxes
$ mkdir -p $NIFTYPATH/cache/vagrant.d
$ mv ~/.vagrant.d/boxes $NIFTYPATH/cache/vagrant.d/boxes
$ ln -s $NIFTYPATH/cache/vagrant.d/boxes ~/.vagrant.d/boxes
# Move npm cache
$ mv ~/.npm $NIFTYPATH/cache/npm
$ ln -s $NIFTYPATH/cache/npm ~/.npm
# Move wp-cli cache
$ mv ~/.wp-cli/cache $NIFTYPATH/cache/wp-cli
$ ln -s $NIFTYPATH/cache/wp-cli ~/.wp-cli/cache
# Move Homebrew cache ( This includes also Cask )
$ mv ~/Library/Caches/Homebrew $NIFTYPATH/cache/Homebrew
$ ln -s $NIFTYPATH/cache/Homebrew ~/Library/Caches/Homebrew
# Move spotify cache
$ mkdir -p $NIFTYPATH/cache/Library/com.spotify.client
$ mv ~/Library/Caches/com.spotify.client/Data $NIFTYPATH/cache/Library/com.spotify.client/Data
$ ln -s $NIFTYPATH/cache/Library/com.spotify.client/Data ~/Library/Caches/com.spotify.client/Data
I had no luck moving Pictures folder so I just moved everything inside of it and symlinked them. Please use encryption on sd-card if you want your photos to remain private.
# This only works in bash shell (or at least not in fish so using bash instead...)
$ bash
$ export NIFTYPATH="/Volumes/Minisecure"
# Move all directories inside ~/Pictures/ and create symlinks into their original paths
$ for file in ~/Pictures/*; do [[ -d $file ]] && mv "$file" "$NIFTYPATH/Pictures/$( basename $file )" && ln -s "$NIFTYPATH/Pictures/$( basename $file )" "$file"; done
If you don't have anything sensitive in Downloads you can use insecure path as well. This is just a precaution.
$ export NIFTYPATH="/Volumes/Minisecure"
$ mv ~/Downloads $NIFTYPATH/Downloads
$ ln -s $NIFTYPATH/Downloads ~/Downloads
Tell safari to use new path:
$ defaults write com.apple.Safari DownloadsPath $NIFTYPATH/Downloads
This can be done in the DropBox settings as well and I think that's the recommended way. Use secure partition and choose /Volumes/Minisecure/Dropbox
Move your Google Drive to secure partion.
$ export NIFTYPATH="/Volumes/Minisecure"
$ mv ~/Google\ Drive $NIFTYPATH/Google\ Drive
If you now start Google Drive it should prompt you that the Drive folder is missing. Then you can click and select new location.
You can only reformat with GUID partition by choosing the Apple SD Card Reader which is parent of the SD-card in Disk Utility:
