
I get why the 2nd command fails (since it didn't mount it can't change permissions), but does anyone know why the first command would repeatedly fail? I've tried flushing the policy so it would try again in case it was just a fluke, but it continually fails at the same spot (re-mounting).

Initialized /dev/rdisk0s4 as a 9 GB case-insensitive HFS Plus volume with a 8192k journalĬhmod: /volumes/Volume_name: No such file or directory However, when I create a script and try to run it through JSS, I get this error: #!/bin/sh If I run these commands separately on terminal on a computer, it works perfectly. Sudo diskutil eraseVolume JHFS+ Volume_name /dev/disk0s4 #erase and reformat Volume_name partition Also read: Other ways to erase external hard drive on Mac.I have a simple script that erases a volume and them sets the permissions so that anyone can access the drive: #!/bin/sh When finished, you can mount your WD external hard drive on Mac and use it again. Provide a name and a format to erase the drive. Select the unmountable WD external hard drive and click 'Erase' on the top. Go to Applications Utilities Disk Utility. Drive is now working in Time Machine as my back-up drive. I was then able to reformat it using Disk Utility without a problem.

I solved it by terminating the fsckhfs process in Activity Monitor (click on it then hit “discontinue.” This released the drive, and allowed it to unmount. I followed the directions on how to partition and format for the Mac. My operating system is OS X 10.6 and I use a MacBook.

Yesterday I purchased a WD My Passport Essential SE. After disabling Spotlight, Disk Utility performed its. This was solved by disabling Spotlight (terminal: sudo mdutil -a -i off) temporarily. It seems that Spotlight was struggling with a the failed drive and would not let it go so the unmount and erase could not occur. They might be different if your Mac has a different version. How to Format an External Drive for Mac (from NTFS to Mac OS Extended) Note: The tutorial and screenshots below are based on macOS Sierra 10.12.5.
