Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

eoren1

macrumors 6502
Original poster
Aug 17, 2007
431
53
Not sure if this is a Sonoma issue or maybe more of a Photos Widget one...

I have a 14" MacBook Pro that is connected to an OWC RAID4 as well as a 2TB external SSD. The photoslibrary has lived on the RAID for years and been fine with ejecting all externals when I take the MacBook to work. Since Sonoma, the RAID has failed to eject cleanly and I have to 'force eject'. I used the lsof command and found Photos was tying up the drive. If I used Activity Monitor to kill all photos processes, the drive ejected.

I moved the photoslibrary to the 2 TB external SSD and the same thing happened but now my Photos Widget shows No Photos Available even after going to Photos-Settings-General and selecting Use as System Photo Library

So now I'm wondering if I should move the photoslibrary to the internal drive but it is 378GB file and I can't lose that much of my 1TB internal to it. I'm not sure if the Optimize Mac Storage will properly shrink that 378 gb. Also, if I check my iCloud data (have a 2TB family shared), I do see 380gb used by photos.

Appreciate any help/guidance!
 

gwang73

macrumors 68030
Jun 14, 2009
2,603
2,122
California
The photo library isn't technically a file but a package that contains the database and files. You can open it by right-clicking and choose show package contents.

Usually, most major macOS updates also updates the Photos library. The larger the library, the more time it takes for the process to complete. Depending on the size of the library and raid speed, it could take a while (hours to days) for the process to complete. That's why you can't eject the raid normally as it's updating the photo library in the background.

Connect the raid, open the Photos app and let this process complete fully. Let it run overnight and disable sleep on the Mac. You can also force a repair library which should fix it if it got corrupted. https://support.apple.com/guide/photos/repair-the-library-pht6be18f93/mac
 
  • Like
Reactions: eoren1

Mike Boreham

macrumors 68040
Aug 10, 2006
3,913
1,896
UK
Usually, most major macOS updates also updates the Photos library. The larger the library, the more time it takes for the process to complete. Depending on the size of the library and raid speed, it could take a while (hours to days) for the process to complete. That's why you can't eject the raid normally as it's updating the photo library in the background.

Connect the raid, open the Photos app and let this process complete fully. Let it run overnight and disable sleep on the Mac. You can also force a repair library which should fix it if it got corrupted. https://support.apple.com/guide/photos/repair-the-library-pht6be18f93/mac

I have often seen the "updating library" message after an update but my 80k photos/580GB library has never taken more than a few minutes to update.

However I agree with the advice to leave Photos running as some other process may be going on especially if the library has been moved recently.
 

eoren1

macrumors 6502
Original poster
Aug 17, 2007
431
53
Thanks. It wasn't a database issue but rather that Photos seems to constantly be accessing the system library now/with Widgets.

I restarted. Made a new photos library that was empty. Made that my system photo library and turned on iCloud Photos which pulled them all.

Ended up moving the old photos library to the NAS as a repository and deleted from the SSD as well as the RAID. Now can easily eject both and the 380gb file is only 3.5gb when turning on the Optimize Mac Storage option.
 

Mike Boreham

macrumors 68040
Aug 10, 2006
3,913
1,896
UK
So now I'm wondering if I should move the photoslibrary to the internal drive but it is 378GB file and I can't lose that much of my 1TB internal to it. I'm not sure if the Optimize Mac Storage will properly shrink that 378 gb.
Turning on "optimise" is simply giving macOS permission to evict full size photos and replace them with pointers...but only if there is insufficient space. If there is sufficient space it will keep full size files on the local drive, and the library will still be 378GB. Apple don't say what is sufficient space, and if it does start optimising you have no visibility of what is local and what is cloud only.

You don't say how much free space you have for the 378GB lib but "Optimise" squeeze my 580GB library into about 30GB. When I moved my 580GB lib to the internal and turned on optimise, the lib stayed at 580GB because Apple thought there was sufficient space, but free space was much lower than I wanted. I got round this by creating an addition APFS volume in the same container and limiting its size to 100GB, using the size options in Disk Utility. I put the iCPL in that and turned on optimise, and that left the main volume with much more free space as I wanted. It sounds like you might need to do something similar.
 
  • Like
Reactions: eoren1

eoren1

macrumors 6502
Original poster
Aug 17, 2007
431
53
Turning on "optimise" is simply giving macOS permission to evict full size photos and replace them with pointers...but only if there is insufficient space. If there is sufficient space it will keep full size files on the local drive, and the library will still be 378GB. Apple don't say what is sufficient space, and if it does start optimising you have no visibility of what is local and what is cloud only.

You don't say how much free space you have for the 378GB lib but "Optimise" squeeze my 580GB library into about 30GB. When I moved my 580GB lib to the internal and turned on optimise, the lib stayed at 580GB because Apple thought there was sufficient space, but free space was much lower than I wanted. I got round this by creating an addition APFS volume in the same container and limiting its size to 100GB, using the size options in Disk Utility. I put the iCPL in that and turned on optimise, and that left the main volume with much more free space as I wanted. It sounds like you might need to do something similar.
I got around it by making a new photo library, making that the system photo library, turning on iCloud Photos (which had my 378 gigs) and letting it sync. New photo library after downloading was done and several hours later stands at 3.52gb
 

Mike Boreham

macrumors 68040
Aug 10, 2006
3,913
1,896
UK
I got around it by making a new photo library, making that the system photo library, turning on iCloud Photos (which had my 378 gigs) and letting it sync. New photo library after downloading was done and several hours later stands at 3.52gb
My experience after doing that was that initially the new optimised iCPL was very small, like yours, but it continued to expand over the following several days until it actually reached full size, 580GB…because in my case there was enough free space for it to do so, even though optimized. But I didn’t want this so went the separate limited-to-100GB volume route so it could only expand within that. How much free space do you have?
 

eoren1

macrumors 6502
Original poster
Aug 17, 2007
431
53
My experience after doing that was that initially the new optimised iCPL was very small, like yours, but it continued to expand over the following several days until it actually reached full size, 580GB…because in my case there was enough free space for it to do so, even though optimized. But I didn’t want this so went the separate limited-to-100GB volume route so it could only expand within that. How much free space do you have?
668 gb free on internal drive
Crap...now it's at 52gb. Not good...
 

eoren1

macrumors 6502
Original poster
Aug 17, 2007
431
53
Got up to 85gb before I followed your recs and moved the database to a 100gb partition
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.