![]() (Note the “file without meta EA” warning the “white shading.jpg” file was copied to the NAS using SMB, so Mac-specific metadata, a.k.a. Here’s a run with the -t “show statistics” and -v “verbose” flags on a test volume holding exactly two files: In my experience, you can still perform normal file ops while dbd is running, with little impact. dbd can be run in an incremental-update, non-destructive mode, and I recommend trying that first. Netatalk provides the dbd tool to update and resync the CNID database.Īs far as I know, no NAS vendor makes dbd available in their management GUI, so you’ll have to open a terminal session to invoke it (how to do so is left as an exercise for the reader, as it varies by vendor and by firmware version). It takes longer to open files TimeMachine, SuperDuper!, and Carbon Copy Cloner (CCC ) backups take more time to execute you might not even be able to browse a network volume. ![]() Drastic database de-optimization may also happen during software updates, though that is rare.Īs differences accumulate, AFP services bog down, sometimes to the point where the Mac Finder times out trying to fetch directory listings. The database can fall out of sync when you access the same volume with multiple services: files created or deleted via SMB or NFS aren’t tracked in the CNID database. It’s when the database no longer matches the files on disk that slowdowns occur, as Netatalk has to resolve discrepancies on the fly. CNID ConniptionsĪs long as the CNID database is in sync with reality, AFP file services run smoothly. The open-source Netatalk fileserver that provides AFP services in most common NAS boxes stores the mapping between CNIDs and filenames in a database. The critical difference at the heart of this story is that AFP, like the Mac’s file systems dating back to HFS, refers to files not by name, but by CNID: a Content Node ID. These metadata don’t map neatly into the native filesystems of NASes - or, really, anything other than Macs. Even using MacOS 11, I’m finding that AFP connections behave more reliably and consistently than SMB connections, especially on NAS volumes with restricted access credentials.ĪFP originated with the classic Mac OS, and it handles a rich selection of Mac-specific metadata: resource forks, type and creator codes, and the like. AFP connections have historically been faster than SMB connections, too, at least before SMB v3 became widespread. On my NetGear ReadyNAS boxes, for example, AFP properly preserves file-creation times, while SMB does not. Macs historically used AFP, and while Apple has deprecated AFP in favor of SMB/CIFS, AFP still has some advantages. ![]() ![]() Indeed, many NAS boxes offer three or more of these simultaneously. CIFS), Network File System (NFS), or the snappily-named Web Distributed Authoring and Versioning (WebDAV). Macs talk to networked storage using any of four different protocols: Apple File Protocol (AFP), Server Message Block (SMB, a.k.a. If you’re using a Mac to access files on a NAS using AFP, and it’s taking a long time to list folder contents and open files - or you’re seeing timeout errors - your CNID DB may be unhappy.
0 Comments
Leave a Reply. |