Cleaning up a mistake

Software-based VM-centric and flash-friendly VM storage + free version

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

Post Reply
Eric E
Posts: 1
Joined: Wed Jan 05, 2022 2:38 pm

Wed Jan 05, 2022 7:02 pm

Hello. I am trying to setup a couple of VSANs (free) onto two VM's to be used for a SQL FCI/AG system. I am painfully uneducated on Powershell, so my apologies for the 'basic' questions I'm asking.

After installing StarWind VSAN Free on each VM, I began setting up the LUNs on the first VM (with help from a colleague who is now unavailable) by running the following PS commands, which seemed to be successful:

New-ImageFile -server $server -path "C:\SWStorage" -fileName "Quorum" -size 1 (<--this size is what messed us up)
$device = Add-ImageDevice -server $server -path "C:\SWStorage" -fileName "Quorum"
$target = New-Target -server $server -alias "QuorumTarget" -devices $device.Name


...then, after discovering and connecting to the Target on the iSCSI initiator, we realized that the "1" we provide in the size value means 1 MB, which isn't large enough to do anything with.

So, the problem I have now is how to remove all of this so that I can recreate it with size 1024 (1 GB). I removed it from the iSCSI initiator on the cluster node, but I'm not sure how to remove/undo the target/device/ImageFile in order to start clean. I'm most likely just stuck on syntax, but not sure. Any help is highly appreciated.
yaroslav (staff)
Staff
Posts: 2361
Joined: Mon Nov 18, 2019 11:11 am

Wed Jan 05, 2022 8:03 pm

There are RemoveDevice and RemoveTarget scripts in C:\Program Files\StarWind Software\StarWind\StarWindX\Samples\powershell. Use this script from here https://forums.starwindsoftware.com/vie ... p+3#p31505. make sure your system complies with https://www.starwindsoftware.com/system-requirements
Finally, delete them from the storage.
Post Reply