Mac era usb stick could not unmount disk
(I use variables for the backup program's name and the server and the backup drive, and you can modify those on your own) I wrote a simple enough applescript that launches at login, following this logic: I had a similar dillema, although in my situation it was a network file server who had a dedicated Backup drive. This lessens the likelihood of disk corruption. Unmounting between syncs also allows the user to yank the firewire (or USB) cable without ejecting the disk. More importantly, I need a "busy" UI that a) informs when the sync is running and b) allows one to interrupt when needed. I will probably be adding mount/unmount at some point. So I look for the disk UUID, and that the target directory is present. And if that happens at the same time another device is using the same device name you have a problem. I found that without a good sanity check rsync would mirror my directory back onto the local disk in "/Volumes" because automount sometimes leaves a directory behind after the volume is unmounted. I am not yet mounting/unmounting my disk but I am using `/usr/sbin/diskutil info /Volumes/ROCSTOR | grep UUID | awk '' | grep xxxx-xxxxxx-xxxxxx-xxxxxx` to verify the script only runs when the exact disk volume needed is there. I have been working on an rsync script and I believe you will find that the device name will change depending on the circumstances. I've looked at the history of my backups and found that it always finishes in less than 10 minutes. Also, make sure that the unmounting time is somewhat beyond the time that your backups regularly finish. Note that this won't be effective if you're backing up to a drive with more than one partition. In terminal, type crontab -e, type i (insert), then paste. If you're unfamiliar with the vi editor in Terminal, select all of the text above and copy it. Adjust the times accordingly, particularly the unmount time if you have longer backups. The second line will unmount the disk at 4:15am. Replace the end of the second line, '/Volumes/The Annex' with '/Volumes/name of your backup hard drive' (the quotes will handle any spaces in the drive's name).Īssuming that I do a backup at 4am, the first line will mount the disk at 3:59am. Replace the end of the first line, disk1s10 with the drive identifier from step one. Edit your crontab to contain the lines:ĥ9 3 * * * /usr/sbin/diskutil mount /dev/disk1s10ġ5 4 * * * /usr/sbin/diskutil eject '/Volumes/The Annex'.Select Info, and make note of the Disk Identifier.With the drive mounted, open Disk Utility and select the drive partition that will be the destination of the backup.Instead, I prefer to mount/unmount the drive just prior to and after Backup runs, so that's it's not in the way when I don't need it. Problem is that I don't like having it mounted all of the time, since it spins up whenever I save or open a document, etc. If you want to start up again from the disk you just erased, select Reinstall macOS in the utilities window, then click Continue and follow the onscreen instructions to reinstall macOS.I use Apple's Backup program to back up files from my computer every night to an external hard drive (that has only one partition) reserved for backups.
#Mac era usb stick could not unmount disk mac#
After your Mac activates, click Exit to Recovery Utilities.Use the Wi-Fi menu in the menu bar to choose a Wi-Fi network, or attach a network cable. Your Mac now attempts to activate, which requires an internet connection.When your Mac restarts, follow the onscreen instructions to choose your language.When asked whether you're sure you want to erase this Mac, click Erase Mac and Restart.Click Erase. However, if you see an Erase Volume Group button, click that button instead.Click the Erase button in the toolbar, then specify a name and format:.Now select Macintosh HD in the sidebar.If you previously used Disk Utility to add volumes to your startup disk, select each additional internal volume in the sidebar, then click the delete volume (–) button in the toolbar to delete that volume.ĭuring this step, disregard any internal volume named Macintosh HD or Macintosh HD - Data, as well as any volumes in the External and Disk Images sections of the sidebar.In the Internal section of the Disk Utility sidebar, make sure that you see the volume named Macintosh HD.From the utilities window, select Disk Utility and click Continue.
#Mac era usb stick could not unmount disk password#