11.9 Enabling Write-Through Cache Management on SCSI Devices and RAID Controllers

Any journal based file system (including NSS) requires that when writes occur, they must be committed to disk in order to prevent corruption in event of a power failure.

Using write-back cache management can improve performance by allowing data to be held in cache rather than being written to disk. However, write-back cache management introduces the risk of losing data if the power fails. Many array controllers have an on-board battery backup, which can reduce the risk of data loss when using write-back, but it might not eliminate the risk. It is up to you to determine if the power backup is sufficient for power loss scenarios in your production environment.

If your system does not have sufficient power loss protection, we require using write-through cache management for SCSI devices to minimize the risk of losing data in the event of power failure. Write-Through cache management assures the file system that writes are being committed to disk as required.

If the server uses a RAID controller, enable Write-Through (disable Write-Back) cache management when configuring the RAID device by using the controller’s BIOS setup routine or configuration utility.

To enable Write-Through cache management for local devices:

  1. Log in to the server as root.

  2. If the scsi-config utility is not already installed, install it using the xscsi RPM.

    The xscsi RPM, which contains the scsi-config command, is not installed by default.

    1. In YaST, open the Various Linux Tools section.

    2. Install the xscsi RPM package, then close YaST.

      The xscsi package installs the scsi-config utility in /user/bin/scsi-config.

  3. Enable Write-Through (disable Write-Back) cache management for each SCSI device by performing the following for each device where you plan to use NSS volumes:

    1. At a terminal console prompt, enter

      scsi-config 
    2. In the window that opens, browse to select drive you want to manage, then click Continue.

    3. Click Cache Control Page.

    4. Enable Write-Through cache management mode by deselecting the Write cache enabled check box.

      Write-Through cache management is enabled by default, so the Write cache enabled check box should be deselected. If the Write cache enabled check box is selected, Write-Back cache management mode is enabled and you deselect the box to disable Write-Back cache management.

    5. Click Quit > Save Changes.

    6. When prompted to confirm the change, click Go Ahead and Save > Quit.

    7. To verify the setting, at a terminal console prompt, enter

      scsiinfo -c /dev/sdx

      Replace /dev/sdx with the device you are checking.

      A value of 0 for Write Cache means that the drive is in Write-Through cache management mode.