ObjectiveFS Mount On Boot Guide For macOS

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.

What You Need

Steps

  1. Create your filesystem passphrase file at /etc/objectivefs.env/OBJECTIVEFS_PASSHRASE to contain your objectivefs passphrase.

    $ sudo ls /etc/objectivefs.env
    AWS_ACCESS_KEY_ID         OBJECTIVEFS_LICENSE
    AWS_SECRET_ACCESS_KEY     OBJECTIVEFS_PASSPHRASE
    

  2. 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. /ofs).

    <?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>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/>
      </dict>
    </plist>
    
  3. Verify the owner of this file is root.

  4. Permanently enable this job.

    $ sudo launchctl load -w /Library/LaunchDaemons/com.objectivefs.mount.plist
    

Reference


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

Get updates about ObjectiveFS