which attached usb device is which?

I have a Macbook Air (2015). It has two identical USB ports, one on the left and one the right.

I bought two identical USB flash drives and plugged both in. I'm copying a single large dataset onto both drives. The first transfer is complete, the second has just begun and will take another hour. I would like to disconnect the drive that I've already transferred the files to. I obviously do not want to disconnect the wrong drive, the drive with an active file transfer. But these drives do not have any kind of activity indicator (like an LED).

So, which drive is which? If the physical devices offer no clue, can I figure this out by consulting fstab or some other low-level system info? Do the physical ports have predictable locations on the internal bus, or anything like that?

I don't expect an answer within the next hour, but I'm still interested in the question academically. When the two USB devices are different, it's easy to know which is which because you put them there and are aware of their differences.

Also: this question is specific to 2015 Macbook Airs. If Apple did things predictably back in 2015, great for me, even if the *nix & Windows situation is the wild west.


Before you find yourself in the same situation again, you need to first ascertain and mark each disk with its serial number where you can easily see it, or at least know where it is, if it's already on the outside of the case.

You can run the following command in Terminal with one disk at a time mounted:

system_profiler SPUSBDataType

Review the info and mark the case of the target disk. Then do the same for the second disk.

Then when you find yourself in this situation again, you can use Terminal to determine which disk is being written to.

First run the mount command.

When mounting two disks whose name are the same, using the mount command in Terminal, the second one mounted will show as e.g. /dev/disk4s2 on /Volumes/Name 1 while the first one mounted will show as e.g. /dev/disk3s2 on /Volumes/Name, e.g.:

/dev/disk3s2 on /Volumes/Name (hfs, local, nodev, nosuid, journaled, noowners)
/dev/disk4s2 on /Volumes/Name 1 (hfs, local, nodev, nosuid, journaled, noowners)

Now using sudo fs_usage -w -f diskio you'll see lots of messages, e.g.:

11:31:08.015616    WrData[ANT1]    D=0x0345b918  B=0x80000  /dev/disk4s2  /System/Volumes/Data/Volumes/Name 1/path/to/file

Seeing that it's /dev/disk4s2 being written to, then in this example case, you'd run diskutil eject disk3 to eject the disk of the same name that's not being written to, under the use case you described in your OP.

You would then run system_profiler SPUSBDataType | grep -E '.*Serial Number:|.*BSD Name:' in Terminal, looking just at the information where there is a BSD Name: immediately following a Serial Number: to see which disk is, e.g disk3 by its serial number in this example.

Look at the serial number on the case of each disk and unplug the one that's not being written to base on the output of the commands run in Terminal.