
After each step, try to format/partition the drive again: The steps below will assist you with making this determination. In order to resolve this issue you will need to determine what program or service is using the drive. In rare cases the drive could be in use by malware, or other hidden software on your machine. Sometimes this can be caused by other devices on your network using the drive (such as another computer, media player, or tablet). In most cases this will be something like an Explorer or Finder window, a file transfer to or from the drive, or security software (such as an anti-virus) scanning the drive for problems.

These errors occur when another program or service is actively using the drive. These errors can occur on both Windows and macOS. Depending on your Operating System (OS) the exact wording of this message will vary. When formatting or partitioning a WD internal drive, external drive, or Solid State drive an error occurs stating the drive cannot be dismounted. If the steps below do not solve your issue you will need to contact the publisher of your Operating System ( Microsoft or Apple) or your system manufacturer for assistance diagnosing your OS. The errors described below are not exclusive to Western Digital hard drives and are controlled entirely by your operating system.

This error can occur on both Windows and macOS.*END

This answer explains why an error may occur when trying to format or partition a hard drive or solid state drive stating that the drive cannot be dismounted or unmounted.
