Photos app not working on zfs 2.1.0 / M1 Pro / Monterey

All your general support questions for OpenZFS on OS X.

Photos app not working on zfs 2.1.0 / M1 Pro / Monterey

Postby ecbaldwin » Sat Dec 04, 2021 2:57 pm

I loaded my Photos library, which had been on a Big Sur Intel-based system, on my new M1 Pro macbook which shipped with Monterey installed. I am unable to import new photos into the Photos app when the library is on a zfs filesystem.

I tried creating a new Photos library both on and off of the ZFS fs. The non-ZFS library does fine but the ZFS-hosted library will not import a photo. I have been able to reproduce this with a fresh Photos library created on my ZFS filesystem and attempted to import a single photo. It never imports it and never fails with an error message. If I try to import the photo a second time, Photos complains that "Another import session is in progress. Please try again when the current task is complete." It will try again if I quit Photos and restart it. But, it is still the same result. It will not import anything.

I tried off, hfs, and apfs for com.apple.mimic. Normally, I have used hfs.

I am a developer but somewhat unfamiliar with Apple development and troubleshooting file systems. Please help me know what I can do to help troubleshoot this issue.

Thanks,
Carl

Following is some information about my installation (the laptop belongs to Emily but I'm trying to troubleshoot on her behalf).

emilybaldwin@Emily ~ % id
uid=501(emilybaldwin) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),701(com.apple.sharepoint.group.1),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae)

emilybaldwin@Emily ~ % uname -a
Darwin Emily.ecbaldwin.net 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64

emilybaldwin@Emily ~ % zfs version
zfs-macOS-2.1.0-1
zfs-kmod-2.1.0-1

emilybaldwin@Emily ~ % zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
emilyzpool 1.36T 557G 835G - - 2% 39% 1.00x ONLINE -

emilybaldwin@Emily ~ % zfs list
NAME USED AVAIL REFER MOUNTPOINT
emilyzpool 557G 792G 2.92M /Volumes/emilyzpool
emilyzpool/photos 557G 792G 496G /Volumes/emilyzpool/photos

emilybaldwin@Emily ~ % ls -l /Volumes/emilyzpool/photos
total 119
drwxr-xr-x@ 9 emilybaldwin staff 18 Mar 17 2020 Carl
drwxr-xr-x@ 8 emilybaldwin staff 11 Nov 8 08:44 Lydias iPhoto.photoslibrary
drwxr-xr-x@ 6 emilybaldwin staff 7 Mar 16 2020 Misc
drwxr-xr-x@ 8 emilybaldwin wheel 8 Dec 2 20:21 Photos Library 2.photoslibrary
drwxr-xr-x@ 8 emilybaldwin wheel 8 Dec 4 15:36 Photos Library 2021-11.photoslibrary
drwxr-xr-x@ 5 emilybaldwin staff 6 Mar 17 2020 Wedding Photos
drwxr-xr-x@ 11 emilybaldwin staff 27 Dec 4 15:34 iPhoto Library.photoslibrary

emilybaldwin@Emily ~ % sudo zfs get all emilyzpool/photos | awk '$NF != "default" {print}'
NAME PROPERTY VALUE SOURCE
emilyzpool/photos type filesystem -
emilyzpool/photos creation Sat Nov 6 17:05 2021 -
emilyzpool/photos used 557G -
emilyzpool/photos available 792G -
emilyzpool/photos referenced 496G -
emilyzpool/photos compressratio 1.00x -
emilyzpool/photos mounted yes -
emilyzpool/photos devices off local
emilyzpool/photos createtxg 906 -
emilyzpool/photos canmount on received
emilyzpool/photos version 5 -
emilyzpool/photos utf8only off -
emilyzpool/photos normalization none -
emilyzpool/photos casesensitivity sensitive -
emilyzpool/photos guid 12403212368317359934 -
emilyzpool/photos usedbysnapshots 60.6G -
emilyzpool/photos usedbydataset 496G -
emilyzpool/photos usedbychildren 0B -
emilyzpool/photos usedbyrefreservation 0B -
emilyzpool/photos objsetid 101 -
emilyzpool/photos refcompressratio 1.00x -
emilyzpool/photos written 2.05G -
emilyzpool/photos logicalused 548G -
emilyzpool/photos logicalreferenced 489G -
emilyzpool/photos com.apple.mimic hfs local
ecbaldwin
 
Posts: 15
Joined: Mon Mar 29, 2021 7:25 pm

Re: Photos app not working on zfs 2.1.0 / M1 Pro / Monterey

Postby tangles » Tue Dec 07, 2021 12:50 am

Hi,

I too noticed that a Photo.Library was not happy when hosted on ZFS (TrueNAS) and accessed via SMB using BigSur. I could import, but I found FaceID completely dead etc etc.

I see your normalisation is set to none. Given you're using the mimic attribute, I'd expect macOS to have FormD (HFS' encoding?) enabled. I think this is in the documentation section but only Lundman would know if it's still needed.

Do you have an photos.app related processings thrashing a core and sitting on 100% all the time? I'm also not sure if these background processes are owned by your uid either and so the group permissions might need to be writable.

Am not in front of my Mac to determine the above myself, but figured I'd reply in hope is points you in the right direction.

Cheers,
tangles
 
Posts: 195
Joined: Tue Jun 17, 2014 6:54 am

Re: Photos app not working on zfs 2.1.0 / M1 Pro / Monterey

Postby ecbaldwin » Fri Dec 10, 2021 8:50 pm

Thanks for your reply.

> I see your normalisation is set to none. Given you're using the mimic attribute, I'd expect macOS to have FormD (HFS' encoding?) enabled. I think this is in the documentation section but only Lundman would know if it's still needed.

I have not set this before. My other laptop with a Photos library on ZFS does not have this set. According to ZFSPROPS(8), normalization "cannot be changed after the file system is created." Given that this filesystem is about 500G this will be very difficult to try out. I can try to create an empty filesystem with this property set to formD to see if it makes a difference...

okay, I tried creating a new empty filesystem with normalization=formD. It did not make a difference. I still see the same issue with Photos.

> Do you have an photos.app related processings thrashing a core and sitting on 100% all the time?

Not at all. The CPU usage of Photos processes is very very low when I attempt the import.

> I'm also not sure if these background processes are owned by your uid either and so the group permissions might need to be writable.

I would think that the Photos app would create new libraries with the correct permissions. All of the ones that I have seen are 0755 for directories and 0644 for files. If I attempt to change them, do you think I would have to change the top-level directory and all of the directories in the contained hierarchy?

I tried changing the top level to 0777 and restarting Photos on it. No luck.
ecbaldwin
 
Posts: 15
Joined: Mon Mar 29, 2021 7:25 pm

Re: Photos app not working on zfs 2.1.0 / M1 Pro / Monterey

Postby tangles » Sat Dec 11, 2021 6:04 pm

mmm,

Seems you've ruled all those possibilities out.

I guess the next step is to run gdb to see what read/write calls are being made on APFS, and then perform the identical test using a ZFS pool to see if there's an issue.
tangles
 
Posts: 195
Joined: Tue Jun 17, 2014 6:54 am

Re: Photos app not working on zfs 2.1.0 / M1 Pro / Monterey

Postby roemer » Sun Dec 12, 2021 8:27 pm

A while ago with O3X 1.9.3 and Photos.app 5 on Catalina, we had a similar problem:
https://github.com/openzfsonosx/zfs/issues/747

Back then, the error messages in the Console did point to an ENOTSUP error (error code 45), which in the end was traced back to the use of vnop_renamex not being implemented by that old ZFS version, but used by Photos during import.

I suggest to check the Photos-related error messages in the console, and then raise an issue in Github.
roemer
 
Posts: 73
Joined: Sat Mar 15, 2014 2:32 pm

Re: Photos app not working on zfs 2.1.0 / M1 Pro / Monterey

Postby ecbaldwin » Tue Dec 14, 2021 5:35 pm

Thank you for the reply. I will take this to a new issue in github.
ecbaldwin
 
Posts: 15
Joined: Mon Mar 29, 2021 7:25 pm



Return to General Help

Who is online

Users browsing this forum: No registered users and 21 guests