Previous page

Next page

Locate page in Contents

Print this page

Checking Data Flushing

Before creating the cluster, you are recommended to check that all storage devices (hard disk drives, solid disk drives, RAIDs, etc.) you plan to include in your cluster can successfully flush data to disk when the server power goes off unexpectedly. Doing so will help you detect possible problems with devices that may lose data stored in their cache in the event of a power failure.

Parallels Cloud Storage ships a special tool, pstorage-hwflush-check , for checking how a storage device flushes data to disk in an emergency case such as power outage. The tool is implemented as a client/server utility:

  • Client . The client continuously writes blocks of data to the storage device. When a data block is written, the client increases a special counter and sends it to the server.
  • Server . The server keeps track of the incoming counters from the client so that it always knows the counter number the client will send next. If the server receives the counter that is less than the one already stored on the server (e.g., because the power was turned off and the storage device did not flush the cached data to disk), the server reports an error.

To check that a storage device can successfully flush data to disk when the power fails, follow the procedure below:

On the server part:

  1. On some computer running Parallels Cloud Server 6.0, install the pstorage-hwflush-check tool. This tool is part of the pstorage-ctl package and can be installed with this command:

    # yum install pstorage-ctl

  2. Run the pstorage-hwflush-check server:

    # pstorage-hwflush-check -l

On the client part:

  1. On the computer hosting a storage device you want to check, install the pstorage-hwflush-check tool:

    # yum install pstorage-ctl

  2. Run the pstorage-hwflush-check client, for example:

    # pstorage-hwflush-check -s pstorage1.example.com -d /mnt/test -t 10

    where

    • -s pstorage1.example.com is the hostname of the computer where the pstorage-hwflush-check server is running.
    • -d /mnt/test defines the directory to use for testing data flushing. During its execution, the client creates a file in this directory and writes data blocks to it.
    • -t 10 sets the number of threads for the client to write data to disk. Each thread has its own file and counter.

    You can also specify other options when running the client. For more information on available options, see the pstorage-hwflush-check man page.

  3. Wait for 10-15 seconds or more and power off the computer where the client is running, and then turn it on again.

    Note: The Reset button does not turn off the power so you need to press the Power button or pull out the power cord to switch off the computer.

  4. Restart the client by executing the same command you used to run it for the first time:

    # pstorage-hwflush-check -s pstorage1.example.com -d /mnt/test -t 10

Once launched, the client reads all written data, validates it, and then restarts the test from the last valid counter. It then sends this valid counter to the server, and the server compares it with the latest counter it has. If the new counter is less than the one stored by the server, meaning that the storage device failed to flush data to disk, the server reports the following error: "cache error detected!"

To be on the safe side, repeat the procedure several times. Once you check your first storage device, continue with all remaining devices you plan to use in the cluster.