Note: It is not recommended to configure cache in Write-Back mode on Standalone devices in order to avoid possible data corruption upon power outage or incorrect service shutdown.

Steps

1. Disabling cache

These are the lines to be removed from .swdsk image file header(s):

       <caching>
         <cache type="write-back" size="128" units="MB" level="1">
           <storage_ref id="1"/>
         </cache>
       </caching>

 

       <storage id="1" name="RAM" type="RAM">
         <interval size="128" units="MB"/>
       </storage>

Units ans size values may differ from the ones provided in the above example.

After editing file(s) restart the service. Wait for sync to complete. Then do the same on the other node.

 

2. Changing cache size

These are the lines to be modified in .swdsk image file header(s):

       <caching>
         <cache type="write-back" size="128" units="MB" level="1">
           <storage_ref id="1"/>
         </cache>
       </caching>

 

       <storage id="1" name="RAM" type="RAM">
         <interval size="128" units="MB"/>
       </storage>

Units ans size values may differ from the ones provided in the above example.

Edit the “size” parameter and change the value to needed one.

After editing file(s) restart the service. Wait for sync to complete. Then do the same on the other node.

 

3. Adding cache

These are the lines to be added to both .swdsk HA and image header files of the device :
1. After closing </geometry> tag

        <caching>
          <cache type="write-back" size="128" units="MB" level="1">
            <storage_ref id="4"/>
          </cache>
        </caching>

2. After these tags:

        <resources>
          <storages>
            <storage id="4" name="RAM" type="RAM">
              <interval size="128" units="MB"/>
            </storage>

Units and size values may differ from the ones provided in the above example.
Also, storage id and storage ref id should be the same, but differ from 1, because the main device storage has this ref index. You can set this number to 3 or 4.
After editing both files restart the service. Wait for sync to complete. Make sure L1 cache appeared in device properties. Then do the same on the other node.

 

Below instructions are applied for devices originally created on v6.

 

1. Disabling cache

In your StarWind.cfg file you have entries for HA devices like the one below:

   <device name="HAImage52" OwnTargetName="iqn.2008-08.com.starwindsoftware:192.168.250.25-ssdsync11" file="My Computer\L\ssd11.img" asyncmode="yes" readonly="no" highavailability="yes" buffering="no" header="65536" reservation="no" CacheMode="wb" CacheSizeMB="512" CacheBlockExpiryPeriodMS="" AluaNodeGroupStates="0,0" SerialId="df2004cc-7d79-4224-9aa2-8f43ca"/>

You need to change CacheMode=”wb” to CacheMode=”none”.

Then restart the service. Wait for sync to complete.

Then repeat the same on the other node.

Note: device name and other parameters may differ from the ones in the above example.

 

2. Changing cache size

In your StarWind.cfg file you have entries for HA devices like the one below:

   <device name="HAImage52" OwnTargetName="iqn.2008-08.com.starwindsoftware:192.168.250.25-ssdsync11" file="My Computer\L\ssd11.img" asyncmode="yes" readonly="no" highavailability="yes" buffering="no" header="65536" 
   reservation="no" CacheMode="wb" CacheSizeMB="512" CacheBlockExpiryPeriodMS="" AluaNodeGroupStates="0,0" SerialId="df2004cc-7d79-4224-9aa2-8f43ca"/>

You need to change CacheSizeMB=”512″ to CacheSizeMB=”{needed value}” where {needed value} is a needed L1 cache size.

Then restart the service. Wait for sync to complete.

Then repeat the same on the other node.

Note: device name and other parameters may differ from the ones in the above example.

Request a Product Feature

To request a new product feature or to provide feedback on a StarWind product, please email to our support at support@starwind.com and put “Request a Product Feature” as the subject.

Back to blog