StarWind iSCSI SAN
StarWind Native SAN for Hyper-V
 

Recreate flash cache?

Pure software-based VM-centric and flash-friendly VM storage (iSCSI, SMB3, NFS, iSER and NVMe over Fabrics) including free version. Same software embedded on StarWind ready nodes.

Moderators: art (staff), anton (staff), Anatoly (staff), Max (staff)

Recreate flash cache?

Postby imradlol » Thu Mar 07, 2019 1:30 am

I'm running starwind vsan free in a 2 node hyper-v cluster. I have 4 hdds for data and 2 ssd's for cache. I set up the ssd's in a raid 0 array for a bit more speed and cache space, but i've wondered if that's a good idea in hindsight. What would be the result of losing my cache drives in one node if a drive fails? If I should rebuild the array to raid 1 so i can sustain a disk failure and keep my cache, what is the procedure for rebuilding my flash cache? I'm on free so i cannot do in GUI(though i don't recall seeing any options anyways), is there a PS script that can do this or do i need to do it differently to recreate my flash cache?

If i recall my raid controller does support converting disks from r0 to r1, so if i do that is it possible to resize the flash cache file? currently using 256gb for flash so i'd need to half it to 128gb
imradlol
 
Posts: 1
Joined: Thu Mar 07, 2019 1:23 am

Re: Recreate flash cache?

Postby Boris (staff) » Sat Mar 09, 2019 2:22 pm

As for RAID configuration, I would still recommend you having RAID1 instead of RAID0. Although the lifetime of modern SSDs is quite fine, it may bring you issues when one of RAID0 drives fails in your L2 cache layer.
I will definitely not be telling you how to reconfigure the RAID array, as you know your hardware and software better.
To reconfigure this at the side of StarWind, you would need to follow these basic steps:
1. In the StarWind Management Console (you should have it in read-only mode if you use the latest build), note the location where your cache disk (imagefileX) is located, as you may need this information later.
2. Check that all StarWind HA devices are synchronized on all partner servers.
3. Stop the StarWind service where you are going to reconfigure caching.
For further steps on cache manipulation, I will be referring to some bits of information available at https://knowledgebase.starwindsoftware. ... dance/661/
4. Locate your device's *.swdsk file. Do not mix it with *_HA.swdks, as we need *.swdsk only. Open it with Notepad++.
5. Locate the sections as in Screenshot1:
Screenshot1.png
Screenshot1
Screenshot1.png (14.22 KiB) Viewed 2902 times

6. Comment it out to have it as in Screenshot2:
Screenshot2.png
Screenshot2
Screenshot2.png (13.52 KiB) Viewed 2902 times

7. Locate the following section (Screenshot3) in the same file and comment it out:
Screenshot3.png
Screenshot3
Screenshot3.png (14.18 KiB) Viewed 2902 times

8. Start the StarWind service. At this point, the service will pick up the device with no SSD caching.
9. Reconfigure your SSD RAID array to RAID1, create a partition and assign a letter to it. For easier config editing, use the same letter as you had before reconfiguration.
10. In the StarWindX PowerShell samples in the StarWind installation directory, locate the CreateImageFile.ps1 sample script. Adjust it to use your values like path, size etc. Comment out the lines where a target is created for the disk to get the same as in the code snippet below
Code: Select all
# $target = New-Target -server $server -alias "targetimg1" -devices $device.Name
# $target

10. Use this script to create a device that is going to be used as your L2 cache disk.
11. Perform steps 2, 3, 4.
12. Uncomment config sections from steps 5-7 and adjust size and path to current SSD cache disk (parameter "size" for snippet from Screenshot 1, and parameters "name" and "size" for the snippet from Screenshot3).
13. Start the StarWind service and check the device in question.
14. Repeat the required steps for the partner server.

Hope I managed to put it plain English :) If you still unsure about anything from the mentioned steps, let me know and I will try to further clarify that.
Boris (staff)
Staff
 
Posts: 806
Joined: Fri Jul 28, 2017 8:18 am


Return to StarWind Virtual SAN / StarWind Virtual SAN Free / StarWind HyperConverged Appliance / StarWind Storage Appliance

Who is online

Users browsing this forum: Google [Bot] and 6 guests