Recovering the write-back 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 write-back 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. To restore access to the files, use the following command. 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. After you restore access to the files or directories, restore access for the mount point.
    # sfcache restore-access -r mount_point

    For example:

    # /usr/sbin/sfcache restore-access /testFS
  3. To enable the write-back caching for the file system, use the following commands:
    #  sfcache disable /testFS
    # sfcache enable /testFS