Unable to Eject Disk in Terminal

I have been having problems with my external hardrive. It has not been showing up under my “devices” in finder, my desktop nor any other computers. It does indicate that it’s on and I think working because my hardrive blinks a little white light. I have been able to see it in “System Information > USB” with all of it’s information which I believe is a good sign. And when I go to terminal it shows ups as well and I’m able to do the commands to get its info.


But when I go to use a command like [diskutil eject disk_ (disk number it’s labeled under) Terminal says “unable to find disk_” yet I know it exists as it’s literally displayed right above it. Anyone know what the issue could be? It happens with other commands too like mount.

MacBook Pro 13", macOS 10.13

Posted on Apr 18, 2020 12:07 PM

Reply
7 replies

Apr 18, 2020 2:00 PM in response to 2020macuser

That is listed as /dev/disk2s1 and shows that it is a Microsoft Basic Data disk. Is it possible that you have the MS program(s) open that use the disk? If so, then that is why you cannot eject it - it's in use. You could try preceding the command line with "sudo " in case it's required: sudo diskutil umount force /dev/disk2s1.

Apr 18, 2020 1:35 PM in response to 2020macuser

Well, my first query is to ask if you used the proper disk no. and slice no. for your system. I just provided an example. It may be wrong for your computer.


If you had the correct device id, then I'm guessing there is a problem with the disk such that you cannot unmount that particular volume.


Can you try entering "diskutil list", then copy the resulting output and post it here?

Apr 18, 2020 12:24 PM in response to 2020macuser

2020macuser wrote:
[diskutil eject disk_ (disk number it’s labeled under) Terminal says “unable to find disk_”






You can see more from the terminal, copy and paste:


man umount | more

or


man diskutil umount  | more




unmount | umount [force] device

Unmount a single volume. Force will force-unmount the volume

(less kind to any open files; see also umount (8)).

Apr 18, 2020 1:53 PM in response to Kappy

Heres the output. The external is the one I'm having trouble with.


/dev/disk0 (internal):


   #:                       TYPE NAME                    SIZE       IDENTIFIER


   0:      GUID_partition_scheme                         500.3 GB   disk0


   1:                        EFI EFI                     314.6 MB   disk0s1


   2:                 Apple_APFS Container disk1         500.0 GB   disk0s2




/dev/disk1 (synthesized):


   #:                       TYPE NAME                    SIZE       IDENTIFIER


   0:      APFS Container Scheme -                      +500.0 GB   disk1


                                 Physical Store disk0s2


   1:                APFS Volume Macintosh HD            455.8 GB   disk1s1


   2:                APFS Volume Preboot                 23.4 MB    disk1s2


   3:                APFS Volume Recovery                519.0 MB   disk1s3


   4:                APFS Volume VM                      1.1 GB     disk1s4




/dev/disk2 (external, physical):


   #:                       TYPE NAME                    SIZE       IDENTIFIER


   0:      GUID_partition_scheme                        *4.0 TB     disk2


   1:       Microsoft Basic Data                         4.0 TB     disk2s1



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unable to Eject Disk in Terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.