Software-based VM-centric and flash-friendly VM storage + free version
Moderators: anton (staff), art (staff), Anatoly (staff), Max (staff)
-
programswithfortran
- Posts: 6
- Joined: Mon Jan 08, 2018 10:18 pm
Mon Jan 08, 2018 10:30 pm
I'm using the free version of Starwind virtual SAN. I wanted to add a second LUN to my 2 node ESXi since I have plenty of storage on my system. I want in and added a second drive to each VM. Then I went to add in the new storage and I made a mistake. I tried to use CreateImageFile.ps1 and I accidentally used the alias for node 2's iSCSI target. How do I remove the new LUN I tried to create and put the target back on node 2 and then how do I add a second LUN properly?
I have 2 VMs set up with the same drive letters. I:\LUN1\LUN1img.img is the original LUN with currently running workloads. J:\LUN2\img2.img is the new LUN I was trying to create.
Here is the output of enumDeviceTargets:
PS C:\scripts> .\enumDevicesTargets.ps1
Targets:
Name : iqn.2008-08.com.starwindsoftware:127.0.0.1-hmoha2
Id : 0x000000DE980DFB80
Alias : hmoha2
IsClustered : True
Devices : System.__ComObject
Permissions : System.__ComObject
Type :
Name : iqn.2008-08.com.starwindsoftware:127.0.0.1-hmoha1
Id : 0x000000DEEE69BE80
Alias : hmoha1
IsClustered : True
Devices : System.__ComObject
Permissions : System.__ComObject
Type :
Devices:
Name : HAImage1
DeviceType : HA Image
DeviceId : 0x000000DEEE662C00
File : I:\LUN1\LUN1Img_HA.swdsk
TargetName : iqn.2008-08.com.starwindsoftware:127.0.0.1-hmoha1
TargetId : 0x000000DEEE69BE80
Size : 2002779111424
CacheMode : wb
CacheSize : 64
CacheBlockExpiryPeriod : 5000
Exists : True
DeviceLUN : 0
IsSnapshotsSupported : False
Snapshots :
SectorSize : 512
Partners : System.__ComObject
SynchronizationChannels : System.__ComObject
HeartbeatChannels : System.__ComObject
SyncStatus : 1
SyncTrafficShare : 50
Name : ImageFile2
DeviceType : Image file
DeviceId : 0x000000DEFA7D2C40
File : My Computer\j\LUN2\img2.img
TargetName : iqn.2008-08.com.starwindsoftware:127.0.0.1-hmoha2
TargetId : 0x000000DE980DFB80
Size : 2002779111424
CacheMode : none
CacheSize : empty
CacheBlockExpiryPeriod : empty
Exists : True
DeviceLUN : 0
IsSnapshotsSupported : False
Snapshots :
SectorSize : 512
Name : imagefile1
DeviceType : Image file
DeviceId : 0x000000DEEE639400
File : I:\LUN1\LUN1Img.img
TargetName : empty
TargetId : empty
Size : 2002779111424
CacheMode : wb
CacheSize : 64
CacheBlockExpiryPeriod : 5000
Exists : True
DeviceLUN :
IsSnapshotsSupported : False
Snapshots :
SectorSize : 512
Thank you!
-
programswithfortran
- Posts: 6
- Joined: Mon Jan 08, 2018 10:18 pm
Tue Jan 09, 2018 4:29 pm
I was able to remove the second device on node 1. Now I need to eith fix replication between both nodes, or rebuild the config from scratch. At this point, rebuilding from scratch sounds better. I freed up enough space to migrate all my VMs to local storage. Is there an easy way to nuke the current config and start over?
-
Boris (staff)
- Staff
- Posts: 805
- Joined: Fri Jul 28, 2017 8:18 am
Tue Jan 09, 2018 5:07 pm
You can completely reinstall StarWind to make sure you start from scratch with the new and untouched config file, as long as it is not impacting anything.
-
programswithfortran
- Posts: 6
- Joined: Mon Jan 08, 2018 10:18 pm
Tue Jan 09, 2018 8:00 pm
Sigh. I'm makeing progress, but I fix one thing then hit another error.
With the create HA powershell script. I keep getting this error with no line numbers:
No coercion operator is defined between types 'System.String' and 'System.UInt32'.
I tried copy pasting it a line at a time so I could see what was erroring out. Then it created everything but the file is 0 bytes and the log is chock fill of error messages.
-
Attachments
-
- starwind-20180109-122244.zip
- (25.75 KiB) Downloaded 585 times
-
Boris (staff)
- Staff
- Posts: 805
- Joined: Fri Jul 28, 2017 8:18 am
Wed Jan 10, 2018 10:25 am
The StarWind log you posted shows errors for path parsing. Make sure your path is indicated correctly.
You can post a sample script for me to check whether it is fine.
-
programswithfortran
- Posts: 6
- Joined: Mon Jan 08, 2018 10:18 pm
Wed Jan 10, 2018 2:51 pm
This is it, I redacted out usernames, passwords, and parts of the IP addresses with X's.
Import-Module StarWindX
try
{
$server = New-SWServer -host 127.0.0.1 -port 3261 -user XXX -password XXXXX
$server.Connect()
$firstNode = new-Object Node
$firstNode.HostName = "XX.XX.0.21"
$firstNode.ImagePath = "My computer\i\lun"
$firstNode.ImageName = "lun1file"
$firstNode.Size = 1809999
$firstNode.CreateImage = $true
$firstNode.TargetAlias = "lun1a"
$firstNode.AutoSynch = $true
$firstNode.SyncInterface = "#p2=XX.XX.0.132:3260"
$firstNode.HBInterface = "#p2=XX.XX.0.104:3260"
$firstNode.PoolName = "lun1pool"
$firstNode.SyncSessionCount = 1
$firstNode.ALUAOptimized = $true
#
# device sector size. Possible values: 512 or 4096(May be incompatible with some clients!) bytes.
#
$firstNode.SectorSize = 512
#
# 'SerialID' should be between 16 and 31 symbols. If it not specified StarWind Service will generate it.
# Note: Second node always has the same serial ID. You do not need to specify it for second node
#
#$firstNode.SerialID = "050176c0b535403ba3ce02102e33eac"
$secondNode = new-Object Node
$secondNode.HostName = "XX.XX.0.22"
$secondNode.HostPort = "3261"
$secondNode.Login = "XXX"
$secondNode.Password = "XXX"
$secondNode.ImagePath = "My computer\i\lun"
$secondNode.ImageName = "lun1file"
$secondNode.Size = 1809999
$secondNode.CreateImage = $true
$secondNode.TargetAlias = "lun1b"
$secondNode.AutoSynch = $true
$secondNode.SyncInterface = "#p1=XX.XX.0.131:3260"
$secondNode.HBInterface = "#p1=XX.XX.0.103:3260"
$secondNode.SyncSessionCount = 1
$secondNode.ALUAOptimized = $true
$device = Add-HADevice -server $server -firstNode $firstNode -secondNode $secondNode -initMethod "Clear"
while ($device.SyncStatus -ne [SwHaSyncStatus]::SW_HA_SYNC_STATUS_SYNC)
{
$syncPercent = $device.GetPropertyValue("ha_synch_percent")
Write-Host "Synchronizing: $($syncPercent)%" -foreground yellow
Start-Sleep -m 2000
$device.Refresh()
}
}
catch
{
Write-Host $_ -foreground red
}
finally
{
$server.Disconnect()
}
-
programswithfortran
- Posts: 6
- Joined: Mon Jan 08, 2018 10:18 pm
Thu Jan 11, 2018 2:40 pm
I downloaded the latest and uninstalled/reinstalled to clear the config. So that would be 8.0.0.11818, according to the management console. Interestingly enough, the errors in the log appear even after a reinstall before I've run the script.
-
Boris (staff)
- Staff
- Posts: 805
- Joined: Fri Jul 28, 2017 8:18 am
Thu Jan 11, 2018 6:02 pm
Based on our communication through the ticket you submitted, keep us posted about the progress of reinstallation you decided to stick to.
-
programswithfortran
- Posts: 6
- Joined: Mon Jan 08, 2018 10:18 pm
Fri Jan 12, 2018 5:18 pm
I rebuilt both Windows VMs from scratch and then installed the prior release of Starwind vsan (11456). I went over the script one more time just to make sure and it appears to have worked. It's synchronizing the volumes now. FYI, the HA creation script is different between the 2 versions, so I made sure to use the version that shipped with this release.
Thanks for your help!