This guide covers the steps to set up your filesystem to mount automatically upon boot on macOS with a launchd script. For Linux, see this guide.
Create your filesystem passphrase file at /etc/objectivefs.env/OBJECTIVEFS_PASSPHRASE
to contain your objectivefs passphrase.
$ sudo ls /etc/objectivefs.env
AWS_ACCESS_KEY_ID OBJECTIVEFS_LICENSE
AWS_SECRET_ACCESS_KEY OBJECTIVEFS_PASSPHRASE
Create a launchd script at /Library/LaunchDaemons/com.objectivefs.mount.plist
.
Replace FILESYSTEM_NAME
and MOUNT_DIRECTORY
with your filesystem name (e.g. myfs
) and mount directory (e.g. /Volumes/ofs
).
Replace MOUNT_OPTIONS
with the mount options you would like to use (e.g. -omt
) or remove this line if not using any mount option.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.objectivefs.mount</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Filesystems/objectivefs.fs/Support/mount.objectivefs</string>
<string>MOUNT_OPTIONS</string>
<string>FILESYSTEM_NAME</string>
<string>MOUNT_DIRECTORY</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>AbandonProcessGroup</key>
<true/>
<key>StandardOutPath</key>
<string>/dev/null</string>
<key>StandardErrorPath</key>
<string>/dev/null</string>
</dict>
</plist>
Verify the owner of this file is root.
Permanently enable this job.
$ sudo launchctl load -w /Library/LaunchDaemons/com.objectivefs.mount.plist
by ObjectiveFS staff, September 26, 2016
ObjectiveFS is a shared file system for OS X and Linux that automatically scales and gives you scalable cloud storage.
If you have questions or article idea suggestions, please email us at support@objectivefs.com