Monday, October 29, 2012

HP LeftHand SAN - CMC Support Mode Settings

Post in a nutshell: See below for a command to allow you to see (once again) Snapshot behavior in the HP / Lefthand / SanIQ CMC where the Snapshot doesn't disappear until it is actually done moving data pointers!!

Do you miss the old HP (LeftHand) P4000 Centralized Management Console?  You know, the one that used to actually tell us how much data a snapshot was consuming and what was going on with it?  It used to be that when you deleted a Snapshot you could instantly see the Snapshot above it get allocated space added to it, then you'd see the data consumed in that Snapshot grow, and the data in the one you deleted shrink, until gone, then it would disappear.

Well I guess, unlike Lefthand, HP decided they needed to dummy-it-down for us.  Now you get no Snapshot data and when you delete a Snapshot it instantly disappears.  Now it doesn't really disappear instantly, it still has to roll-up the data pointers to the Snapshot above (or back into the main volume if no Snapshots exist), but it gives the appearance of just vanishing instantly.  However, it could be churning for hours before it is actually done.  I think it is more confusing now because for the Idiot Admins that they dummied-it-down for, they will wonder why deleting the Snapshot did not give them any space back on their SAN as instantly as the Snapshot disappeared.  This is because it doesn't report the reclaimed space until it truly is deleted.  So it could be hours before they see it.  In the mean time they could have started frantically whacking more Snapshots trying to reclaim space - which may actually have the reverse effect at first.

Reverse Effect??  Yes, when you delete a Snapshot, it has to allocate MORE space to the Snapshot above to give it room to copy the data pointers.  If you are at 95% capacity and you start deleting Snapshots, you could see it jump to 99%... Yikes.  That wasn't intended!!    Not to fear... if you wait (long enough) you will get the reclaimed space.  But boy... it should would be nice to know what is going on in the background!!

Well, I found one HP tech support guy that threw me a few bones. I won't name him in-case he was not supposed to share this.

I still can't see Snapshot data info... BUT, what he did share does help a little.  He shared a parameter file switch that changes the behavior of the CMC so it does not instantly remove deleted Snapshots from the CMC view.  It just changes the status to "Not Available, Deleting".  Now this seems pretty simple, but it can be huge; just to (at least) know that you have snapshots hanging out there deleting.  If you delete 10 Snapshots in one fell swoop for example, it will be very nice to know when they are all done.  Well... to me anyhow.  I wish I could see the data also, but hey, this is better than nothing.

Here is all you do:

1.  Close the CMC (if open)
2.  For the user that runs the CMC, navigate in Explorer to directory
3.  Open the preferences.txt file in an editor (notepad)
4.  Add the following line to the end of the file
     CmcSnapshotPreference.showAutoAndDeletingSnapshots = true
5.  Save the file, exit the editor
6.  Launch the CMC

Now when you delete Snapshots they won't just disappear, their status will change to "Not Available, Deleting", until they have been rolled up.

The unfortunate part of this is that when you exit the CMC it will delete this "big boy" setting so you need to apply it anytime you want/need this functionality.  You could get around this by making the file read-only, but you will get an error each time you exit the CMC saying it couldn't write to the file.  If you can live with this that's fine, but also know that if you change anything in the GUI preferences (HELP/PREFERENCES... menu), it will not be able to write those changes.  Also, it could have other unforeseen consequences so do this at YOUR OWN RISK.

For the life of me, I'm not sure whey they don't make this a check-box preference in the CMC GUI; or at least let the command stick in the config file!!!  But it is what it is.

*** This is exclusive information by-the-way, as of this posting, this command is nowhere in cyberspace (at least according to Google)! ***

Enabling Support Upgrades

Now in researching this, I was also given these additional commands (which is more in-line with what I think he meant with "Big Boy Mode".)  By default, when you apply patches, the CMC will do this sort of on auto-pilot to all nodes in a management group. These commands adds a "Support Upgrades" tab to the CMC where you can manually apply specific patches to specific Nodes.  Add these to the preferences.txt file mentioned above.

CmcSystemPreference.supportMode = true
CmcUpgradePreference.useOldUpgrades = true
CmcUpgradePreference.advancedUpgradeMode = true  

Again, these will disappear when you exit the CMC.

Where's this new "Support Upgrade" tab??   Click on the "Configuration Summary" item in the tree, then you will see the new tab on the right.

restripe pending because of cluster edit or migration
data protection degraded

Disable Windows Error Recovery - Windows Server 2008 / Windows 7 / Etc.

We have Citrix XenApp servers that boot from an HP Lefthand P4500 SAN volume and for some reason during scheduled reboots on the weekend they would hang on the stupid "Windows Error Recovery" about 50% of the time.  Selecting "boot windows normally" would boot the server just fine - but it was always a manual operation.  So this would leave these production servers in a downed state until someone manually intervened.

To fix this problem I used the following command (from a command prompt):

bcdedit /set {current} bootstatuspolicy ignoreallfailures

To check to see if it is set you can simply use BCDEDIT by itself to display the settings.  For example:

Windows Boot Manager
identifier              {bootmgr}
device                  partition=\Device\HarddiskVolume1
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {current}
resumeobject            {E54e3a5f-48ad-11df-ae93-ced11e86b19d}
displayorder            {current}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
identifier              {current}
device                  partition=C:
path                    \Windows\system32\winload.exe
description             Windows Server 2008 R2
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {E54e3a63-48ad-11df-ae93-ced11e86b19d}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \Windows
resumeobject            {E54e3a63-48ad-11df-ae93-ced11e86b19d}
nx                      OptOut
bootstatuspolicy        IgnoreAllFailures

If the setting has not been applied you will not see "bootstatuspolicy" in the list.   

Now upon reboot it does not stop and wait.  I know this has been helpful as we had to repair the boot info on a one of the servers and it started doing it again afterwards (after 8 months of smooth reboots.)   This setting got wiped-out when we did the repair so I had to set it again.  

Friday, October 19, 2012

Was my PC or Server Cloned and SysPrepped?

To find out if a server was cloned check out this registry key (this is for Windows Server 2008 R2 but I would image would be the same or similar for most flavors of Windows):


CloneTag will actually tell you the date and time when SysPrep was run on it.

Now if you want to check the SID values (perhaps with the source to make sure they are in fact different) use the PsGetSid utility.  You can just run PsGetSid from a command prompt to get the SID from your local PC or use "\\" to get the SID of computers connected to your LAN.

The output would be similar to this from my two Citrix servers (and this tells me my SIDs are different):

C:\PSTools>psgetsid \\lan-citrix1

PsGetSid v1.44 - Translates SIDs to names and vice versa
Copyright (C) 1999-2008 Mark Russinovich
Sysinternals -

SID for \\lan-citrix1:

C:\PSTools>psgetsid \\lan-citrix2

PsGetSid v1.44 - Translates SIDs to names and vice versa
Copyright (C) 1999-2008 Mark Russinovich
Sysinternals -

SID for \\lan-citrix2:


Now does any of this really matter?  Ask Mark Russinovich (or at least check out this blog entry of his:)

The Machine SID Duplication Myth (and Why Sysprep Matters) 

** On a side Note - if you do Clone Citrix servers and you use the Citrix Gateway, you need to edit the STA ID for each clone acting as a Secure Ticket Agent. **

This applies to Presentation Server or XenApp.  XenApp 6.x in my case.
To change the STA ID edit the CtxSta.config file.
This can be found here:  %ProgramFiles(x86)%\Citrix\system32\CtxSta.config
Open the file with Notepad.
Simply change the STA ID value with anything you like and save. I just tweaked one number.

For example - in the file:
UID=STAD8D1856594FF <= change this to something unique.

About Me

My photo
Science Fiction Author / Vice President of Technology for The Christman Company