Recovering the writeback cache after a node failure

In writeback mode, SmartIO stores data in the cache before writing the data to the disk. If the device that contains the cached data fails, the unflushed data in the cache area must be flushed to the disk when the system comes back online. Until the cached data is flushed, the file data that is cached in writeback mode may not be completely present on the disk.

In some cases, the SmartIO cache containing dirty writeback data is not available for flushing. For example, an error may have occurred on the SSD device that contains the cache area. When the cache device comes back online, then dirty data for such files is skipped from flushing. The files that have pending dirty data are not accessible. Any I/O on those files (except deletion) returns an I/O error (EIO).

The following error message is displayed in the syslog:

Writeback cache recovery is failed for mounted_device with error error_code: 

If you want to restore access to such files, use the following procedure.

Restoring access to files that are not accessible

  1. After the data is restored, use the following command to enable access. This command requires root privileges.
    # sfcache restore-access -r {mount_point|directory|file}

    For example:

    # /usr/sbin/sfcache restore-access /testFS

    For cluster file systems, run the sfcache restore-access command on each node of the cluster.

  2. To enable the writeback caching for the file system, use the following commands:
    #  sfcache disable /testFS
    # sfcache enable /testFS