The process responsible for synchronizing the database with the file system is called syncvoltodb(8). That process can be called by hand or by another program, such as
userperms or
dblogd(8). In all of these cases, the
sync can be run with or without
-delnorm option.
Never use the -del flag with
syncvoltodb(8) for it can be destructive. Always use
-delnorm instead. However, as you have seen earlier, you can safely use a
-del flag with
userperms. In that instance,
-del performs with
userperms exactly as
-delnorm performs with
syncvoltodb(8).
A sync happens on a directory-by-directory basis. The idea is to get the database’s information on the folder’s contents to agree with what’s on the file system, and to do it as quickly as possible. Roughly, here is the procedure for each directory:
Setting all files as offline ensures that the
syncvoltodb(8) will synchronize every file and folder on the file system without exception. That’s because the answer to
Is the folder online? will always be
No — and therefore, Xinet will synchronize the entire file system.
A -delnorm sync will consult
globald for information about any archived files within the Xinet enabled volume.
A sync run without a -
del or
-delnorm simply uses the procedure outlined in the
"Default behavior” on page 638.
This type of sync is designed to catch changes made to the file system that evaded
dblogd(8), and to do it quickly. It only consults
globald when there is a directory modification discrepancy.
Syncs run without a
-delnorm flag have one big flaw, known as the “cover-up” case. Normally, any change made to the file system (via SMB, NFS, or Unix) will cause a modification time discrepancy for the folder, thus setting up this directory to be synchronized when a
sync is run. However, the modification time discrepancy can be covered up. Consider this scenario:
So whatever files where added at 4 pm via Unix or SMB will not be added to the database when the sync happens. The only option is to run a
syncvoltodb -delnorm on that directory (or a directory above it). As you can see, this adds an element of chance as to whether files will be caught by the sync or not.