Here is how to disable The disk you attached was not readable by this computer.
warning when drive with unknown filesystem connected to the Mac:
Works only on macOS 13 Ventura and newer!
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.DiskArbitration.diskarbitrationd.plist DADisableUnreadableNotification -bool YES
Then reboot or execute:
sudo launchctl kickstart -k system/com.apple.diskarbitrationd
There is also some other flags for diskarbitrationd:
DAMountAutomatic
DAMountOptions
DAMountPath
DAProbeID
DAProbeKind
DAMountDeferExternal
DAMountDeferInternal
DAMountDeferRemovable
DAMountTrustExternal
DAMountTrustInternal
DAMountTrustRemovable
DAAutoMountDisable
DAEnableUserFSMountExternal
DAEnableUserFSMountInternal
DAEnableUserFSMountRemovable
DAMountMethod
DADisableEjectNotification
DADisableUnreadableNotification
DADisableUnrepairableNotification
You can see them with:
strings /usr/libexec/diskarbitrationd