Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zmwangx/2d49a67073e481db700ffcb4b911f4ff to your computer and use it in GitHub Desktop.
Save zmwangx/2d49a67073e481db700ffcb4b911f4ff to your computer and use it in GitHub Desktop.
How to make ~/Downloads (or any other directory) a separate APFS volume without Time Machine local snapshots

Tested on macOS 13.3.1.

  • In Disk Utility, create new APFS volume under internal SSD's Container disk1.

  • Unmount the volume.

  • ⌘I to open the Info panel of the volume, copy the Volume UUID. Alternatively, the UUID can be copied from the output of diskutil info disk1s7, where disk1s7 should be replaced with the corresponding device node.

  • sudo vifs to edit /etc/fstab, adding the following entry:

    UUID=<VolumeUUID>	/path/to/mount/point	apfs	rw,nobrowse
    

    The nobrowse option ensures the volume doesn't show up in various places in the GUI, e.g. as a mounted disk on the desktop. See man 8 mount.

  • Mount the volume in Disk Utility. Do not use sudo mount -a, it doesn't work.

  • You can try to add the path to Time Machine's backup exclusion list, but it may not work properly if you have excluded the path already (not as a volume). The following should always work:

    sudo defaults write /Library/Preferences/com.apple.TimeMachine.plist ExcludedVolumeUUIDs -array-add <VolumeUUID>
    

    You can later verify the volume is excluded by looking at the output of

    defaults read /Library/Preferences/com.apple.TimeMachine.plist
    
  • To check the volume indeed isn't accumulating snapshots, turn on View -> Show APFS Snapshots in Disk Utility and check the volume. Alternatively, run

    diskutil ap listSnapshots disk1s7
    

    Again, replace disk1s7 with the appropriate device node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment