17

So I have unmounted a usb external hard drive but I went to re-mount it. Is there a command that I can use to remount the drive? Only way I know to re-mount a drive is to disconnect the usb cable from my Mac and reconnect it.

21

One-liner:

diskutil mount `diskutil list | grep "Volume Name" | sed -n -e 's/^.* //p'`

  1. Find the disk identifier:

    diskutil list | grep "Volume Name"
    

    Example result:

    4:   Apple_HFS Volume Name   100 GB   disk1s2
  2. Mount the disk:

    diskutil mount disk1s2
    
  • 3
    Thanks! Now I have an alias setup so I quickly remount a volume. – Scott Walter Mar 28 '14 at 18:08
  • 1
    Where's that "Windows 8" bit come from? – dfeuer Mar 29 '14 at 4:39
  • 1
    @dfeuer Sorry that was just an example volume name — edited. – grg Mar 29 '14 at 8:43
  • What if the disk isn't in Disk Utility? I have a connected drive, I ejected it, and it disappears from Disk Utility. – Cullub Dec 26 '15 at 22:40
  • @cullub Did you mean to reply to the other answer about Disk Utility? Anyway, that feature was removed in El Capitan Disk Utility — it doesn't show unmounted disks. – grg Dec 26 '15 at 22:41
18

Disk Utility will let you remount any connected drives. Just

  1. open it up (It is usually in Applications > Utilities)

  2. select the drive

  3. click "Mount"

  • 2
    All there years of using Disk Utility I never knew you could do this :) – Scott Walter Mar 28 '14 at 18:10
6

diskutil mount also accepts a volume name, so there is no need to grep the output of diskutil list. If the disk has multiple volumes (like a Time Machine volume and another volume), you can use diskutil mountDisk to mount all volumes:

$ diskutil mount WD
Volume WD on WD mounted
$ osascript -e 'tell app "Finder" to disks where ejectable is true'
disk WD
$ diskutil eject Untitled
Disk WD ejected
$ diskutil mountDisk WD
Volume(s) mounted successfully
$ osascript -e 'tell app "Finder" to disks where ejectable is true'
disk Time Machine, disk WD

mountDisk and eject apply to all volumes even if you specify the name of one volume.

2

Alternate easy solution: In place of ejecting drive you should unmount it, and when needed mount it again.

Unmount / mount: Command F (Spotlight search) > Disk utility > Select drive > unmount / mount

After unmount, it's also safe to remove disk physically.

Cheers!

  • On my computer Disk Utility does show up in that search, but there are a whole bunch of files that show up in the results too... – dwightk Feb 15 at 13:10
1

In addition to the answers already given, there is also a GUI app for this, which I really like: Mountain.

It's a $2 app that sits in the menu bar and keeps track of both mounted and unmounted drives. Unmounted drives can be remounted from there as well.

You can download a free trial from the website.

(Also note that once you install the Mac App Store version, there is an update available directly from the developer. I assume the update isn't on the Mac App Store because of Apple's sandboxing rules.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .