The Latest Gartner® Magic Quadrant™Hyperconverged Infrastructure Software
Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)
It creates a non-replicated image. You cannot make it HA later without significantly reworking the scripts.Initially Created a LUN using the CreateImageFile.ps1 sample.
Does the RAID need rebuilding from scratch? In other words, sit the RAID gone?RemoveHAPartner, put the new replacement in place and then run AddHAParnter to connect to replacement and allow to sync.
You need both partners to exit the maintenance mode.When I try to use MaintenanceMode.ps1, but change the operands to (true, true) to try to take it out of maintenance mode, it fails because "connection with partner node is invalid."
#code: params: enable, force -> $false, $true
It won't work until the device is in maintenance mode.When I try RemoveHAPartner, it gives "Error: 200 Failed: operation cannot be completed."
Initially Created a LUN using the CreateImageFile.ps1 sample.
I will come back to how I did this at the end of this post so you can address that -- that seems like a totally different topic from your response.It creates a non-replicated image. You cannot make it HA later without significantly reworking the scripts.
RemoveHAPartner, put the new replacement in place and then run AddHAParnter to connect to replacement and allow to sync.
Primary was Raid 0 - 4 drives, 2 failed -- there is no way to recover the side that failed.Does the RAID need rebuilding from scratch? In other words, sit the RAID gone?
When I try to use MaintenanceMode.ps1, but change the operands to (true, true) to try to take it out of maintenance mode, it fails because "connection with partner node is invalid."
#code: params: enable, force -> $false, $true
If I understand you correctly, you are saying that using just the script, taking a HA pair out of maintenance mode requires both to be intact.You need both partners to exit the maintenance mode.
How do I "mark" the one remaining copy "as synchronized" as you referred to above in ()5. Start StarWindService and see if the target is synchronized and available over iSCSI (You might still need to mark it as synchronized).
When I try RemoveHAPartner, it gives "Error: 200 Failed: operation cannot be completed."
So your saying RemoveHAPartner doesn't work unless the device is in Maintenance mode.It won't work until the device is in maintenance mode.
I appreciate that article.P.s. StarWind VSAN features Active-active replication. See more on priorities (i.e., what you refer to primary/partner) here https://forums.starwindsoftware.com/vie ... php?t=5731
Code: Select all
$filePath="mnt/sdb1/vSWsanVolume01",
...
$targetAlias="targetimg2",
Code: Select all
#CreateHA_2from1Img.ps1
param($addr="192.168.0.1", $port=3261, $user="root", $password="starwind",
$addr2="192.168.0.2", $port2=$port, $user2=$user, $password2=$password,
#common
#If useing this to match an existing flat-file image created by CreateImageFile.ps1 - as noted below settings must match the original file created.
$initMethod="SyncFromFirst", #//[Clear], NotSyncronize (only works if there is no data), SyncFromFirst, SyncFromSecond, SyncFromThird (All "SyncFrom"s run full sync. Use it for (re)creating replicas)
$size=512000,#//set size for HA-device In MB 1024=1GB //must be same size as created flat-file image
$sectorSize=512,#//set sector size for HA-Device [512] or 4096 //must be same size as created flat-file image
$failover=0, #//set type failover strategy [0(Heartbeat)] or 1(Node Majority)
$bmpType=1,#//set bitmap type [1(RAM)] or 2(Disk)
$bmpStrategy=0,#//set journal strategy [0] 1(Best Performance (Failure)) 2(Fast Recovery (Continuous))
#primary node
$imagePath="mnt/sdb1/vSWsanVolume01",#//set path to store the device file [My computer\C\starwind] or VSA Storage/mnt/mount_point
$imageName="primaryha02",#//set name device [primaryImg21]
$createImage=$true, #//set create image file [$true] $false //an attempt will be made to create with existing targets -targetAlias (must already be created)
#$storagename=//is only used if you plan on adding the partner to the existing device
$storageName="imagefile2", #//flat-file to convert to HA -- run script enumDevicesTargets and look for the Device: Name (not the actual filename of the flat-file)
$targetAlias="targetha02",#//set alias for target [targetha21] #//flat-file to convert $targetAlias="targetimg2",
$autoSync=$true, # this was missing from the script but in starwind documentation // Make sure to specify automatic or manual synchronization after device creation by setting the value of this variable to either $true or $false
$poolName="sdb1", # name of pool created in CVT
$syncSessionCount=1,
$aluaOptimized=$true,
$cacheMode="none",#//set type for L1 cache (optional) none or [wb] or wt
$cacheSize=0,#//set size for L1 cache in MB (optional) [128]
$syncInterface="#p2={0}:3260" -f "172.16.20.102", #//Synchronization interfaces. Enter the IP address(s) of the partner node interface(s) (the “second” StarWind node) which will be used as the synchronization channel
$hbInterface="#p2=172.16.10.102:3260", #//Heartbeat interfaces. Enter the IP address(s) of the partner interface(s) (the “second” StarWind node) which will be used as the heartbeat channel;
#NOTE: It is recommended to configure the Heartbeat and iSCSI channels on the same interfaces to avoid the split-brain issue.
#If the Syncronization and Heartbeat interfaces are located on the same network adapter,
#it is recommended to assign one more Heartbeat interface to a separate adapter. -- I dont have as sample of what that code would look like in script yet tho
$createTarget=$true,
$bmpFolderPath="",
#secondary node
$imagePath2="mnt/sdb1/vSWsanVolume01",#//set path to store the device file [My computer\C\starwind] or VSA Storage/mnt/mount_point
$imageName2="partnerha02",#//set name device [partnerImg22]
$createImage2=$true, #//set create image file [$true] $false //an attempt will be made to create with existing targets -targetAlias (must already be created)
$storagename2="",#//only used if you plan on adding the partner to the existing device
$targetAlias2="partnerha02",#//set alias for target [partnerha22]
$autoSync2=$true, # this was missing from the script but in starwind documentation
$poolName2="sdb1",
$syncSessionCount2=1,
$aluaOptimized2=$false, # [$false] This was set false in the script but in other posts on forum and documentation it said it should be true on both nodes?
$cacheMode2=$cacheMode,
$cacheSize2=$cacheSize,
$syncInterface2="#p2={0}:3260" -f "172.16.20.100",
$hbInterface2="#p2=172.16.10.100:3260",
$createTarget2=$true,
$bmpFolderPath2=""
)
Code: Select all
Target:
Name : iqn.2008-08.com.starwindsoftware:192.168.0.1-targetimg2
Id : 0x00000000011952C0
Alias : targetimg2
IsClustered : True
Devices : imagefile2
Device:
Name : imagefile2
Id : 0x0000000001194E80
TargetName : iqn.2008-08.com.starwindsoftware:192.168.0.1-targetimg2
TargetId : 0x00000000011952C0
DeviceType : Image file
Size : 536870912000
File : mnt/sdb1/vSWsanVolume01\img2.img
Code: Select all
Target:
Name : iqn.2008-08.com.starwindsoftware:192.168.0.1-targetha02
Id : 0x0000000001274F00
Alias : targetha02
IsClustered : True
Devices : HAImage1
Device:
Name : imagefile2
Id : 0x0000000001194E80
TargetName : empty
TargetId : empty
DeviceType : Image file
Size : 536870912000
File : mnt/sdb1/vSWsanVolume01\img2.img
Device:
Name : HAImage1
Id : 0x0000000001275640
TargetName : iqn.2008-08.com.starwindsoftware:192.168.0.1-targetha02
TargetId : 0x0000000001274F00
DeviceType : HA Image
Size : 536870912000
NodeType : 1
IsSnapshotsSupported : 0
SectorSize : 512
Priority : 0
SyncStatus : 1
SyncTrafficShare : 50
DeviceLUN : 0
Header : Headers\primaryha02\primaryha02_HA.swdsk
IsWaitingAutosync : False
FailoverStrategy : 0
MaintenanceMode : 0
BitmapStrategy : 0
Partner:
TargetName : iqn.2008-08.com.starwindsoftware:192.168.0.2-partnerha02
Priority : 1
Type : 1
SyncStatus : 2
BitmapType : 1
SyncChannels : 172.16.20.102
HearthbeatChannels : 172.16.10.102
Target:
Name : iqn.2008-08.com.starwindsoftware:192.168.0.1-targetimg2
Id : 0x00000000011952C0
Alias : targetimg2
IsClustered : True
Devices :
Code: Select all
Target:
Name : iqn.2008-08.com.starwindsoftware:192.168.0.2-partnerha02
Id : 0x0000000001186F00
Alias : partnerha02
IsClustered : True
Devices : HAImage1
Device:
Name : imagefile1
Id : 0x0000000001181840
TargetName : empty
TargetId : empty
DeviceType : Image file
Size : 536870912000
Parent : HAImage1
File : mnt/sdb1/vSWsanVolume01\partnerha02.img
Device:
Name : HAImage1
Id : 0x000000000118A880
TargetName : iqn.2008-08.com.starwindsoftware:192.168.0.2-partnerha02
TargetId : 0x0000000001186F00
DeviceType : HA Image
Size : 536870912000
NodeType : 1
IsSnapshotsSupported : 0
SectorSize : 512
Priority : 1
SyncStatus : 3
SyncTrafficShare : 50
DeviceLUN : 0
Header : Headers\partnerha02\partnerha02_HA.swdsk
IsWaitingAutosync : False
FailoverStrategy : 0
MaintenanceMode : 1
BitmapStrategy : 0
Partner:
TargetName : iqn.2008-08.com.starwindsoftware:192.168.0.1-targetha02
Priority : 0
Type : 1
SyncStatus : 3
BitmapType : 1
SyncChannels : 172.16.20.100
HearthbeatChannels : 172.16.10.100
Nice to read that.After the drive was converted to HA it was in sync before the trouble.
RAID0 is not supported due to no redundancy. See https://knowledgebase.starwindsoftware. ... ssd-disks/ for more details.Primary was Raid 0 - 4 drives, 2 failed -- there is no way to recover the side that failed.
Thanks for more details. Stick with the steps I provided in my previous post.So the premise is we only have one of the two members in maintenance mode, and the other partner is not recoverable.
It is expected to be limited availability as it cannot find the replication partner.Are you saying? - This would then when I restart the service see "both" as out of maintenance mode, but then quickly realize that the missing one is not available.... and fall back to limited availability?
This might be not needed. First, check if Starwind HA devices are accessible over iSCSI.How do I "mark" the one remaining copy "as synchronized" as you referred to above in ()
Limited availability is expected.I was trying to get it out of maintenance mode, so that it would go back to "limited availability" when it can't find the partner.....
In the CVT I didn't see one StarWindService. There are 3 pages of services.....You need both partners to exit the maintenance mode.
You can edit the headers
1. Stop StarWindService on one node
I found this file in /opt/starwind/starwind-virtual-san/drive_c/starwind/headers/partnerha022. Go to C:\Program Files\StarWind Software\StarWind\headers and copy the corresponding *_HA.swdsk
3. Edit that file.
4. aim for <maintenance_mode/> area and set it to false for both local and partner.
As I mentioned above since I was not sure if I had stopped the right service or if that was even possible from the cvt web interface, I rebooted the host rather than restarting services.5. Start StarWindService and see if the target is synchronized and available over iSCSI (You might still need to mark it as synchronized).
For anyone else who has to follow these steps, I'll be complete in my documentation:In CVM, the service is called starwind-virtual-san.service, you need sudo privileges to edit the files and stop the service.
No need to change the sync status, it should be good.
Code: Select all
sudo systemctl stop starwind-virtual-san.service
cd /opt/starwind/starwind-virtual-san/drive_c/starwind/headers/partnerha02
sudo nano partnerha02_HA.swdsk
Code: Select all
sudo systemctl start starwind-virtual-san.service