Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running authopen to gain access to disk device 'dev/rdisk2' #270

Closed
grischard opened this issue Aug 26, 2021 · 9 comments
Closed

Error running authopen to gain access to disk device 'dev/rdisk2' #270

grischard opened this issue Aug 26, 2021 · 9 comments

Comments

@grischard
Copy link

This is maybe a recursion of #99.

The security settings are set to allow Raspberry Pi Imager to access external volumes, or full access, but the message still happens.

Running in the console gives a more useful message:

OSX most preferred language: "en_GB"
qt.qpa.fonts: Populating font family aliases took 1829 ms. Replace uses of missing font family "Roboto" with one that exists to avoid this cost.
QObject::setParent: Cannot set parent, new parent is in a different thread
authopen: couldn't open /dev/rdisk2: Resource busy
RECEIVED SIZE: 2
NOT SCMRIGHTS
authopen returned failure code 1

Workaround: Opening Disk Utility and unmounting the APFS container that was on that SD card solved the problem.

@Stokestack
Copy link

I'm getting what looks like the original error. The dialog says, "Error running authopen to gain access to disk device '/dev/rdisk21'"

But Pi Imager had access to removable drives. This persisted for a while, until I mounted another thumbdrive and then ejected it and remounted the original... then Imager could inexplicably write to the SD card. Seems like an Apple bug.

@sluongng
Copy link

I am getting this as well. Problem occured after I use 'Erase' on my brand new SD Card.
After that I am getting similar error despite having granted the 'Full Disk Access' to the program.

@sluongng
Copy link

So I didnt have much luck in unmounting APFS container using Disk Utility. In fact, there was no additional APFS container for me other than the system one that is used by MacBook Pro for boot.

But this led me to a clue: Disk Utility was hanging up while I was having my SD Card plugged in.

So I tried this:

> diskutil list physical
...
/dev/disk4 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.9 GB    disk4
   1:                 DOS_FAT_32 ⁨SDCARD⁩                  15.9 GB    disk4s1

After printing the above, the command did NOT exist, instead it just hang there and I would have to kill it with Ctrl-C.

After several more attempts, I decided to just leave the command running... and it exist after more than 1 hour.
Once the command exited, the disk can be access and written to by rpi-imager again.

I think this has something to do with the way rpi-imager Erased / Reformatted the card in a way that was not so friendly to MacOS? I tried to look into man diskutil for a verbose mode to gain more information but can't find anything.

Hope this help who ever encountering this next.

@maxnet
Copy link
Collaborator

maxnet commented Dec 22, 2021

  • I do not have a MacBook Pro, nor any other Apple device with an internal SD card reader.
  • But on a normal Intel Mac Mini with MacOS Monterey, and an external USB-C SD card reader, I am NOT able to reproduce any of this.

After telling Imager to FAT32 format (erase) a card. Running diskutil list physical completes instantly for me:

Maxs-Mac-mini:~ max$ diskutil list physical
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI ⁨EFI⁩                     314.6 MB   disk0s1
   2:                 Apple_APFS ⁨Container disk1⁩         250.7 GB   disk0s2

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *64.0 GB    disk2
   1:                 DOS_FAT_32 ⁨SDCARD⁩                  64.0 GB    disk2s1

Maxs-Mac-mini:~ max$

I think this has something to do with the way rpi-imager Erased / Reformatted the card in a way that was not so friendly to MacOS?

Actually, on the MacOS platform we outsource FAT32 formatting to diskutil (We just call diskutil eraseDisk FAT32 SDCARD MBRFormat /dev/diskSomeNumber)
So if there do was a problem there, it is not in our code, and can only be fixed by Apple.

  • Do note that if you intend to write RPI OS or some other image, you can do so straight away. It it is not necessary to "erase" first.

  • Also if for testing purposes I open the folder of the newly created FAT32 partition labelled "SDCard", and tell Imager to write RPI OS, after pressing the "write" button and confirming, before I enter my password to allow raw disk access, I see that the "SDCard" window is closed automatically.
    This is caused by the code we have to unmount the drive automatically, that is run at that point. So that is also working fine on my system, and I do not have to unmount anything manually.
    After entering password it writes the image, and completes successfully.

Screenshot-1
Screenshot-2
Screenshot-3
Screenshot-4

Some questions:

  1. Are the issues always reproducible to you, or does it only happens sometimes?
  2. If you have an external USB SD card reader, can you try if that works better than the internal one which you seem to be using right now?
  3. Do you have a virus scanner or similar security software installed that may be keeping files open on the drive, which could prevent that we can obtain exclusive access?

@sluongng
Copy link

sluongng commented Dec 22, 2021

Actually, on the MacOS platform we outsource FAT32 formatting to diskutil (We just call diskutil eraseDisk FAT32 SDCARD MBRFormat /dev/diskSomeNumber)
So if there do was a problem there, it is not in our code, and can only be fixed by Apple.

...

Do note that if you intend to write RPI OS or some other image, you can do so straight away. It it is not necessary to "erase" first.

These are helpful. Thanks for the pointer.
I would suggest putting this as a note in the erase option.

I was used to the old day where reformatting a disk is always a good practice before creating a boot disk.

Some questions:

  1. Are the issues always reproducible to you, or does it only happens sometimes?

I have 3 SD cards and this issue happens on 2 of them with 1 being quite persistent.
But as I stated in my post above, the work around was just to wait until diskutil exit and that solved it for both cards.

I have only start hacking on this and encountered it last night... I might need to try it again sometimes to determine that it consistently reproducible.

  1. If you have an external USB SD card reader, can you try if that works better than the internal one which you seem to be using right now?

I don't have one at hand right now.
But I have a 2nd laptop running Ubuntu 21.10 which also had some issue detecting the 'bad' card... but I don't know if it's a separate issue.

  1. Do you have a virus scanner or similar security software installed that may be keeping files open on the drive, which could prevent that we can obtain exclusive access?

Yes I do but I doubt that this is the case.
It does not make sense on why this would only happen on an SD card after Erase and not on an SD card files/boot drive inside.

@maxnet
Copy link
Collaborator

maxnet commented Dec 22, 2021

Do you have a virus scanner or similar security software installed that may be keeping files open on the drive, which could
prevent that we can obtain exclusive access?

Yes I do but I doubt that this is the case.
It does not make sense on why this would only happen on an SD card after Erase and not on an SD card files/boot drive inside.

Do note that an "empty" SD card also has files inside.

This is what a SD card that has just been formatted under Mac OS X, and shows empty there, looks like when viewed under Linux:

max@lynx:/media/max/SDCARD$ find .
.
./.Spotlight-V100
./.Spotlight-V100/Store-V2
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/psid.db
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/tmp.Lion
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/Lion.created
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/tmp.Cab
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/Cab.created
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/tmp.Star
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/indexState
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.indexArrays
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.indexIds
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.indexBigDates
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.indexGroups
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.indexPositions
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.indexPostings
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.indexDirectory
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.indexCompactDirectory
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.shadowIndexHead
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journalAttr.1
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.directoryStoreFile
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.directoryStoreFile.shadow
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexHead
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexIds
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexBigDates
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexGroups
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexPostings
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexTermIds
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexPositions
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexPositionTable
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexDirectory
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexCompactDirectory
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexArrays
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.indexUpdates
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.directoryStoreFile
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/store.db
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/.store.db
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-1.map.header
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-1.map.data
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-1.map.offsets
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-1.map.buckets
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-2.map.header
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-2.map.data
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-2.map.offsets
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-2.map.buckets
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-3.map.header
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-3.map.data
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-3.map.offsets
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-3.map.buckets
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-4.map.header
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-4.map.data
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-4.map.offsets
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-4.map.buckets
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-5.map.header
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-5.map.data
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-5.map.offsets
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/dbStr-5.map.buckets
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/reverseDirectoryStore
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/tmp.spotlight.state
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/store_generation
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.corespotlight
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.live
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.live_system
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.live_user
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.live_priority
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.assisted_import_pre
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.assisted_import_post
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.health_check
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.migration
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.migration_secondchance
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journalExclusion
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/journals.scan
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/shutdown_time
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/reverseDirectoryStore.shadow
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/store.updates
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.indexHead
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/0.shadowIndexGroups
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.shadowIndexHead
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.shadowIndexTermIds
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.shadowIndexPositionTable
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.shadowIndexCompactDirectory
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.shadowIndexDirectory
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.shadowIndexArrays
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.directoryStoreFile.shadow
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/live.0.shadowIndexGroups
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/reverseStore.updates
./.Spotlight-V100/Store-V2/63A89149-5DFD-4A6A-BD11-E754804317E0/tmp.spotlight.loc
./.Spotlight-V100/VolumeConfiguration.plist
./.fseventsd
./.fseventsd/fseventsd-uuid

In this example it are all Mac OS X system files, used for things like the "file search" feature in Mac OS X.
But sometimes security software also creates extra files for its own administration on all drives, keeping track what files it already scanned before, etc.
If it has a different code path for creating those files on a newly discovered drive, and updating its files on drives it already knew before, and there is a bug there, it can also affect things.

@maxnet
Copy link
Collaborator

maxnet commented Dec 22, 2021

BTW if authopen fails with "Resource busy", you may also want to try if you can get sudo lsof |grep " /Volumes/" to show what process is still having files open on the volume.

If you run it normally -when the file system is mounted-, it should only show some mds system processes:

Maxs-Mac-mini:~ max$ sudo lsof |grep " /Volumes/"
mds        88                   root   24r      DIR               1,12     32768                   2 /Volumes/SDCARD
mds        88                   root   26r      DIR               1,12     32768                   6 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE
mds        88                   root   27r      DIR               1,12     32768                   2 /Volumes/SDCARD
mds        88                   root   28u      REG               1,12         0           999999999 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/journalExclusion
mds_store 270                   root  txt       REG               1,12      3277                  12 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/0.indexGroups
mds_store 270                   root  txt       REG               1,12        16                  10 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/0.indexIds
mds_store 270                   root  txt       REG               1,12         8                  11 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/0.indexBigDates
mds_store 270                   root  txt       REG               1,12         8                 101 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/0.indexCompactDirectory
mds_store 270                   root  txt       REG               1,12     16384                  24 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexBigDates
mds_store 270                   root  txt       REG               1,12      3277                  25 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexGroups
mds_store 270                   root  txt       REG               1,12      8192                  27 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexTermIds
mds_store 270                   root  txt       REG               1,12      8192                  29 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexPositionTable
mds_store 270                   root  txt       REG               1,12      8224                  30 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexDirectory
mds_store 270                   root  txt       REG               1,12      1024                  31 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexCompactDirectory
mds_store 270                   root  txt       REG               1,12        56                  37 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-1.map.header
mds_store 270                   root  txt       REG               1,12        56                  41 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-2.map.header
mds_store 270                   root  txt       REG               1,12        56                  45 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-3.map.header
mds_store 270                   root  txt       REG               1,12        56                  49 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-4.map.header
mds_store 270                   root  txt       REG               1,12        56                  53 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-5.map.header
mds_store 270                   root  txt       REG               1,12     32768                  23 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexIds
mds_store 270                   root  txt       REG               1,12     65536                  32 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexArrays
mds_store 270                   root  txt       REG               1,12      2056                 100 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/0.indexDirectory
mds_store 270                   root  txt       REG               1,12     65536                  34 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.directoryStoreFile
mds_store 270                   root  txt       REG               1,12     65536                  60 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/reverseDirectoryStore
mds_store 270                   root  txt       REG               1,12     65536                 105 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/0.directoryStoreFile
mds_store 270                   root  txt       REG               1,12     68544                 103 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/0.indexArrays
mds_store 270                   root  txt       REG               1,12      4096                  38 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-1.map.data
mds_store 270                   root  txt       REG               1,12      4096                  39 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-1.map.offsets
mds_store 270                   root  txt       REG               1,12      4096                  40 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-1.map.buckets
mds_store 270                   root  txt       REG               1,12      8192                  42 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-2.map.data
mds_store 270                   root  txt       REG               1,12      4096                  43 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-2.map.offsets
mds_store 270                   root  txt       REG               1,12      4096                  44 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-2.map.buckets
mds_store 270                   root  txt       REG               1,12      4096                  46 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-3.map.data
mds_store 270                   root  txt       REG               1,12      4096                  47 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-3.map.offsets
mds_store 270                   root  txt       REG               1,12      4096                  48 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-3.map.buckets
mds_store 270                   root  txt       REG               1,12      4096                  50 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-4.map.data
mds_store 270                   root  txt       REG               1,12      4096                  51 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-4.map.offsets
mds_store 270                   root  txt       REG               1,12      4096                  52 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-4.map.buckets
mds_store 270                   root  txt       REG               1,12      4096                  54 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-5.map.data
mds_store 270                   root  txt       REG               1,12      4096                  55 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-5.map.offsets
mds_store 270                   root  txt       REG               1,12      4096                  56 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-5.map.buckets
mds_store 270                   root    6r      DIR               1,12     32768                   6 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE
mds_store 270                   root   14u      REG               1,12      4096                  26 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexPostings
mds_store 270                   root   17u      REG               1,12      8192                   8 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/psid.db
mds_store 270                   root   18r      DIR               1,12     32768                   6 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE
mds_store 270                   root   19u      REG               1,12        28                   9 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/indexState
mds_store 270                   root   20u      REG               1,12     36864                  57 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/store.db
mds_store 270                   root   22u      REG               1,12     36864                  36 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/.store.db
mds_store 270                   root   23u      REG               1,12        56                  37 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-1.map.header
mds_store 270                   root   24u      REG               1,12      4096                  38 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-1.map.data
mds_store 270                   root   26u      REG               1,12      4096                  39 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-1.map.offsets
mds_store 270                   root   32u      REG               1,12      4096                  40 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-1.map.buckets
mds_store 270                   root   41u      REG               1,12        56                  41 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-2.map.header
mds_store 270                   root   56u      REG               1,12      8192                  42 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-2.map.data
mds_store 270                   root   58u      REG               1,12      4096                  43 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-2.map.offsets
mds_store 270                   root   59u      REG               1,12      4096                  44 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-2.map.buckets
mds_store 270                   root   61u      REG               1,12        56                  45 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-3.map.header
mds_store 270                   root   63u      REG               1,12      4096                  46 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-3.map.data
mds_store 270                   root   64u      REG               1,12      4096                  47 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-3.map.offsets
mds_store 270                   root   65u      REG               1,12      4096                  48 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-3.map.buckets
mds_store 270                   root   67u      REG               1,12        56                  49 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-4.map.header
mds_store 270                   root   68u      REG               1,12      4096                  50 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-4.map.data
mds_store 270                   root   69u      REG               1,12      4096                  51 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-4.map.offsets
mds_store 270                   root   71u      REG               1,12      4096                  52 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-4.map.buckets
mds_store 270                   root   73u      REG               1,12        56                  53 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-5.map.header
mds_store 270                   root   75u      REG               1,12      4096                  54 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-5.map.data
mds_store 270                   root   76u      REG               1,12      4096                  55 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-5.map.offsets
mds_store 270                   root   77u      REG               1,12      4096                  56 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/dbStr-5.map.buckets
mds_store 270                   root   78u      REG               1,12     65536                  60 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/reverseDirectoryStore
mds_store 270                   root   92u      REG               1,12      3277                  25 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexGroups
mds_store 270                   root   93u      REG               1,12      4096                  26 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexPostings
mds_store 270                   root   94u      REG               1,12      8192                  27 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexTermIds
mds_store 270                   root   95u      REG               1,12      4096                  28 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexPositions
mds_store 270                   root   96u      REG               1,12      8192                  29 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexPositionTable
mds_store 270                   root   97u      REG               1,12      8224                  30 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexDirectory
mds_store 270                   root   98u      REG               1,12      1024                  31 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexCompactDirectory
mds_store 270                   root   99u      REG               1,12     65536                  32 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexArrays
mds_store 270                   root  100u      REG               1,12     16384                  24 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexBigDates
mds_store 270                   root  101u      REG               1,12     32768                  23 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexIds
mds_store 270                   root  102u      REG               1,12      4096                  82 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.indexHead
mds_store 270                   root  106u      REG               1,12     65536                  34 /Volumes/SDCARD/.Spotlight-V100/Store-V2/9BEA330B-EA0C-4E38-94E4-11E51FF6AFEE/live.0.directoryStoreFile

After you selected RPI OS in Imager, pressed "write", and entered "yes" at the confirmation prompt, it should unmount the volume automatically, and nothing should show in lsof anymore:

Maxs-Mac-mini:~ max$ sudo lsof |grep " /Volumes/"
Maxs-Mac-mini:~ max$

@richard-scott
Copy link

I'm having a similar issue on an Intel Mac with an external USB-C reader. I can write the image, but when it comes to remounting the FAT32 partition to write the config it tells me:

Screenshot 2022-02-13 at 21 14 49

@tdewey-rpi
Copy link
Collaborator

Closing as stale - no updates since '22.

Not entirely clear that there's an issue with Raspberry Pi Imager in this report, it appears an external factor in the OS is holding the device open when Imager wants exclusive access. @maxnet has correctly identified there are a number of such entities that could do such a thing - none of which Imager is in a position to stop.

If this is seen again, please raise a new issue.

@tdewey-rpi tdewey-rpi closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants