Table of Contents

Adding cache to the standalone device.

Adding cache to the partner HA device.

Adding cache to both HA devices.

Removing L2 cache from the standalone device.

Removing L2 cache from both HA devices.

Changing cache size on the standalone device.

Changing cache size on both HA devices.

 

Adding cache to the standalone device.

Following steps assume that your main device has L1 and L2 cache disabled.

1.    Create a Thick-Provisioned Hard Disk Device (Virtual Disk) for L2 cache of required size (as an example for this article 128 MB is used). Do not attach it to any targets, keep it unassigned. It should not have any caching enabled. Location of L2 device’s .img and .swdsk files should be the path to your SSD drives’ array.

2.    Stop StarWind service.

3.    Open the .swdsk file of the newly created device. Make a backup of this file.

4. Find the tags below:

  <system>

   <resources>

     <storages>

Navigate through the <storages> section assuming your main device name is, for example, “Storage1” then copy and paste following part into another text editor (in “Notepad ++” for example):

<storage id=”1″ name=”My Computer\D\img\L2-Storage1.img” type=”file”>

<interval size=”1″ units=”GB”/>

</storage>

Note: path, size and storage id may differ in your case.

–       Replace “ type=”file” ” with “ type=”device” ”

–       Change the “name” parameter value:

Replace “My Computer\D\img\L2-Storage1.img” with the path to .swdsk header of your newly created device for L2 cache (in our example the complete string will look like this:

 “ name=”My Computer\D\img\L2CacheDisk.swdsk” ”).

–       Change “storage id” parameter value from “1” to “2”

–       Change “interval size” and “units” values to correspond the actual size of your L2 cache device.

IMPORTANT: “storage_ref id” parameter value must be unique throughout all contents of .swdsk file. (In this particular example we already have another text string with “storage_ref id=”1”” – therefore we have changed “storage_ref id” value in our section accordingly from “1” to “2”).

After applying all changes our section will look like this:

<storage id=”2″ name=”My Computer\D\img\L2CacheDisk.swdsk” type=”device”>

<interval size=”128″ units=”MB”/>

</storage>

5.    Insert the modified section in the .swdsk file of your device before</storages> tag.

6.    Next find this tag:

</geometry>

7.    Insert the following section after </geometry> tag, changing “size” and “units” parameters values to  the  size of your cache device (in our example it is “128 MB”) and keeping “storage_ref id” value the same as one specified in “Step 4” (in our case it is “2”):

<caching>

<cache type=”write-through” size=”128″ units=”MB” level=”2″>

<storages>

<storage_ref id=”2″/>

</storages>

</cache>

</caching>

8.    Save .swdsk file.

9.    Start StarWind service.

10.Now L2 device should actually disappear from SW console and appear in main device properties.

Adding cache to the partner HA device.

Following steps assume that your main device (on Node 1) has L1 and L2 cache enabled and both main and partner devices (on Node 1 and Node 2) are replicated.

1.    Create a Thick-Provisioned Hard Disk Device (Virtual Disk) for L2 cache of necessary size (in our case it is 128 MB). Do not attach it to any targets, keep it unassigned. It should not have any caching enabled. Location of L2 device’s .img and .swdsk files should be the path to your SSD drives’ array.

2.     Stop StarWind service on the Node 2 (the node without cache).

3.    Open the .swdsk file of your main device on the Node 1 (the node from which synchronization was initialized).

4.   Find these tags:

  <system>

   <resources>

     <storages>

Navigate through the <storages> section assuming your main device name is, for example, “Storage1” then copy and paste following part into another text editor (in “Notepad ++” for example):

<storage id=”3″ name=”My Computer\D\img\L2-Storage1.swdsk” type=”file”>

<interval size=”1″ units=”GB”/>

</storage>

Note: path, size and storage id may differ in your case.

–       Replace “ type=”file” ” with “ type=”device” ”

–       Change the “name” parameter value:

Replace “My Computer\D\img\L2-Storage1.img” with the path to .swdsk header of your newly created L2 cache device (in our example the complete string will look like this: “ name=”My Computer\D\img\L2CacheDisk.swdsk” ”).

–       Change “interval size” and “units” values to correspond the actual size of your L2 cache device.

After applying changes the section will look like this:

<storage id=”3″ name=”My Computer\D\img\L2CacheDisk.swdsk” type=”device”>

<interval size=”128″ units=”MB”/>

</storage>

5.    Find the corresponding .swdsk file of your partner device on the Node 2.

IMPORTANT: Ensure that you are editing the Initial .swdsk and NOT the HA .swdsk file. In other case – all changes will not apply.

Make a backup of this file.

6.    Open file and find these tags:

  <system>

   <resources>

     <storages>

7.    Navigate through the <storages> section

8.    Insert the modified section before</storages> tag.

IMPORTANT: “storage_ref id” parameter value must be unique throughout all contents of .swdsk file (in this particular case it is “3”). If you already have another text string with “storage_ref id=”3”” – you must change “storage_ref id” value in your just inserted section accordingly (for example from “3” to “4”).

9.    Find these tags:

  </geometry>

   <caching>

10.  Next, insert the following section before</caching> tag, changing “size” parameter to the size of

your cache device (in our example it is “128 MB”) and keeping “storage_ref id” value the same as

one specified in “Step 8” (in our case it is “3”):

<cache type=”write-through” size=”128″ units=”MB” level=”2″>

<storages>

<storage_ref id=”3″/>

</storages>

</cache>

11. Save .swdsk file.

12. Start StarWind service.

13. Now L2 device should actually disappear from SW console and appear in main device properties.

Adding cache to both HA devices.

Following step assumes that HA device has L1 and L2 cache disabled.

1.    Reproduce Steps mentioned in “Adding cache to standalone device” part of this guide on both of your nodes (Node 1 and Node 2).

Removing L2 cache from the standalone device.

Following steps assume that your device has L2 cache enabled.

1.    Stop StarWind service.

2.    Open the .swdsk file of your device. Make a backup of this file.

3.    Find these tags:

  <system>

   <resources>

     <storages>

Navigate through the <storages> section assuming your L2 cache device name is, for example, “L2CacheDisk” and delete the corresponding part:

IMPORTANT: Make sure you are not removing the section used for your main device by double checking the “name” parameter value.

<storage id=”2″ name=”My Computer\D\img\L2CacheDisk.swdsk” type=”device”>

<interval size=”128″ units=”MB”/>

</storage>

Note: path, size and storage id may differ in your case.

4.    Next, find this tag:

</geometry>

5.    Delete the following section after </geometry> tag:

IMPORTANT: Make sure you are not removing the section used for L1 caching (if present) by double checking the “level” parameter value. Also, please, do not remove <caching> and </caching> tags.

<cache type=”write-through” size=”128″ units=”MB” level=”2″>

<storages>

<storage_ref id=”2″/>

</storages>

</cache>

Note: path, size and storage id may differ in your case

6.    Save .swdsk file.

7.    Start StarWind service.

8.    Now the unassigned L2 cache device should appear in your StarWind console.

9.    Remove the L2 cache device from StarWind console.

Removing L2 cache from both HA devices.

Following step assumes that HA device has L2 cache enabled.

1.    Reproduce Steps mentioned in Removing L2 cache from standalone device” part of this guide on both of your nodes.

 Changing cache size on standalone device.

Following steps assume that your device has L2 cache enabled.

Note: at this moment the only way to change the size of L2 cache – is to delete and then re-create L2 cache device from the beginning.

1.    Remove existing L2 cache device as described in Removing L2 cache from standalone device” part of this guide.

2.   Perform steps described in Adding cache to standalone device”, part of this article while changing L2 cache disk size according to your needs.

Changing cache size on both HA devices.

Following steps assume that both of your devices have L2 cache enabled.

Note: at this moment the only way to change the size of L2 cache – is to delete and then re-create L2 cache device from the beginning.

1.    Remove existing L2 cache device as described in Removing L2 cache from both HA devices part of this guide.

2.    Perform steps described in Adding cache to both HA devices part of this article while changing L2 cache disk size according to your needs.

 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 Knowledge Base