Poweshell code

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

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

sandor.bihary
Posts: 5
Joined: Sun Sep 15, 2013 2:45 pm

Wed Sep 18, 2013 12:56 pm

Hello All!

I tried to use the example power scripts. These are working very good except one thing. I would like to monitor the sync status on the devices.

But the enumDevicesTargets.ps1 script tell me everthing except the sync status.
I tried to find in the documentation how to do it but I did not manage to find it:(

Could you help me with that?

Partners : System.__ComObject
SynchronizationChannels : System.__ComObject
HeartbeatChannels : System.__ComObject


Thanks
Sanyi
User avatar
Alex (staff)
Staff
Posts: 177
Joined: Sat Jun 26, 2004 8:49 am

Wed Sep 18, 2013 2:22 pm

Sanyi,
Device synchronization status can be checked by getting it's "ha_synch_status" property:
$syncStatus = $device.GetPropertyValue("ha_synch_status")

Synchronization percent:
$syncPercent=$device.GetPropertyValue("ha_synch_percent")

Call $device.Refresh() to update device properties before getting its values.
Best regards,
Alexey.
sandor.bihary
Posts: 5
Joined: Sun Sep 15, 2013 2:45 pm

Wed Sep 18, 2013 4:43 pm

Hello Alex!

Thanks! It worked:)

I checked again the help and I found only these properties at the devices:
CacheBlockExpiryPeriod This property returns cache block expiry period (in ms).
CacheMode This property returns cache mode.
CacheSize This property returns cache size (in MB).
DeviceId This property returns device id.
DeviceLUN This property returns device logical unit number.
DeviceType This property returns device type.
Exists Determine whether the specified device exists.
File This property returns path to image file.
Name This property returns device name.
Size This property returns device size.
TargetId This property returns target id.
TargetName This property returns target name.

What I missed? How should I find that?

And other question. I have 4 HA devices. I turned off the second node. But this script gave me four "1". This means this is syncronized, but the truth is, this is not because the second node is offline. How can I checked that?

Best Regards
Sanyi
User avatar
Alex (staff)
Staff
Posts: 177
Joined: Sat Jun 26, 2004 8:49 am

Wed Sep 18, 2013 5:37 pm

Sorry for the lack of documentation! StarWindX library is being extended some faster that documentation for it.

Device properties that are listed for IDevice are general.
Each device type (HA, for example) has several specific properties.

Some additional properties of HA device:

ha_wait_on_autosynch
"1" If device is waiting in queue for autosynchronization

ha_partner_nodes_count
Number of HA partners.

ha_partner_node1_sync_status
Synchronization status of first partner.

ha_partner_node1_sync_percent
Synchronization percent for the first partner.

ha_partner_node1_is_exist_sync_valid_connection
"1" if at least one of synchronization channels is valid and connection exists.
"0" if all connections are down.

ha_partner_node1_is_exist_heartbeat_valid_connection
"1" if at least one of heartbeat channels is valid and connection exists.
"0" if all connections are down.

ha_partner_node2_sync_status
Synchronization status of second partner (for 3-node HA).

ha_partner_node2_sync_percent
Synchronization percent for the second partner (for 3-node HA).
Best regards,
Alexey.
baka
Posts: 15
Joined: Thu Apr 23, 2015 10:06 am

Thu Apr 23, 2015 10:46 am

Where can I find full parameters list for IDevice.GetPropertyValue()?
I'm interest in "State" field value (Management console -> Server -> Devices)
User avatar
Alex (staff)
Staff
Posts: 177
Joined: Sat Jun 26, 2004 8:49 am

Thu Apr 23, 2015 1:38 pm

Most of prameters, that are accessible trough IDevice.GetPropertyValue(), are internal, and not intended for external use.
We will add "State" parameter to device properties in later update.

Current list of values for State field is as follows:

0 - DeviceActive,
1 - DeviceNonActive,
2 - DeviceNotLicensed,
3 - DeviceDisabled.
Best regards,
Alexey.
baka
Posts: 15
Joined: Thu Apr 23, 2015 10:06 am

Wed Jul 01, 2015 5:24 am

Build 8116: there is NO "State" parameter still... :(

Btw, I saw "Creating..." State (in Managenent Console after restart (single node, no HA)) with progress in "%" ...
User avatar
anton (staff)
Site Admin
Posts: 4010
Joined: Fri Jun 18, 2004 12:03 am
Location: British Virgin Islands
Contact:

Fri Jul 03, 2015 4:27 pm

Did you check updated one? Did StarWind support bring you in touch with R&D team? Do you have a screenshot for broken msg with "%"? :)
baka wrote:Build 8116: there is NO "State" parameter still... :(

Btw, I saw "Creating..." State (in Managenent Console after restart (single node, no HA)) with progress in "%" ...
Regards,
Anton Kolomyeytsev

Chief Technology Officer & Chief Architect, StarWind Software

Image
baka
Posts: 15
Joined: Thu Apr 23, 2015 10:06 am

Fri Jul 03, 2015 6:44 pm

I've checked again now (build 8116) ... It seems It's case sensitive so not "State" but "state" parameter :) Right?
I'll take Management Console screenshot next boot...
baka
Posts: 15
Joined: Thu Apr 23, 2015 10:06 am

Tue Jul 07, 2015 8:48 am

So,
Here is "Target" with "State=Active" Device
1.gif
1.gif (171.2 KiB) Viewed 7612 times
But the same time "Device State" is "Creating..." (with "Mounting Progress"="%" and "Warning" presents aslo)
2.gif
2.gif (165.48 KiB) Viewed 7612 times
And GetPropertyValue("state") for this Device returns "0" which means "DeviceActive"
%)
User avatar
Alex (staff)
Staff
Posts: 177
Joined: Sat Jun 26, 2004 8:49 am

Fri Jul 10, 2015 11:43 am

Thank you!
We will get it to the correct state.
Unfortunately, updates for StarWindX module went out of scope for this release update.
Best regards,
Alexey.
Alexander.M (Staff)
Posts: 1
Joined: Fri Jul 10, 2015 3:10 pm

Fri Jul 10, 2015 3:23 pm

Also device mount status can be checked by getting "MountStatus" property:
$device.GetPropertyValue("MountStatus")

list of values for mount status property:
0 - Failed
1 - Created
2 - Creating
3 - Mounting


and mounting percent:
$device.GetPropertyValue("MountProgress")
Best regards,
Alexander
baka
Posts: 15
Joined: Thu Apr 23, 2015 10:06 am

Sun Jul 12, 2015 11:22 pm

Is there a way to update StarWindX module only?
And I'd like to test this (intermediate) build anyway.
(Btw, Are You sure about MountStatus and MountProgress ? ;) )
Thanks
User avatar
darklight
Posts: 185
Joined: Tue Jun 02, 2015 2:04 pm

Wed Jul 15, 2015 4:14 pm

You can update only StarWindX. Something like that
starwindx.jpg
starwindx.jpg (66.03 KiB) Viewed 7544 times
baka
Posts: 15
Joined: Thu Apr 23, 2015 10:06 am

Thu Jul 16, 2015 9:46 am

But I need updated build first! ;)
Post Reply