Administering filesystems

Understanding sync-on-close

Normally, file data is written ``asynchronously'', meaning that when a file is closed, the data may not be written to the disk immediately. If the system is halted unexpectedly. this data can be lost. When ``sync-on-close'' is enabled, data is always written to disk immediately when a file is closed. This feature significantly affects system performance because of the additional time spent writing to the disk. Disabling sync-on-close can increase throughput at the expense of data integrity.

Sync-on-close is enabled by default. To disable it, edit the /etc/vfstab file with a text editor. Each line in this file corresponds to a filesystem and consists of several tab-separated fields. The sixth field contains the mount options. Remove the following entry, taking care not to remove other options or fields:

Unmount and remount the filesystem to make the change take effect. If you have modified the root filesystem, you must reboot the system.

WARNING: The sync-on-close option only applies to vxfs filesystems.

Some caching disk controllers use write-back caching techniques that nullify the improved data reliability and integrity provided by vxfs. If this is the case, data integrity cannot be guaranteed. However, controllers that use write-through caching take advantage of vxfs features. If your controller supports both caching techniques, configure it to use write-through caching. See ``Avoiding filesystem damage'' for more information.

Next topic: Understanding intent logging
Previous topic: vxfs advanced mount options

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004