Monday, June 15, 2009

Change Cluster Account Password KB

Note: In Microsoft Windows NT 4.0 and Microsoft Windows 2000, to change the Cluster service account password, you have to stop the Cluster service on all nodes before you can make the password change

To Prompt for password, use the following parameters: (Password will not be visible while being typed and it will prompt for confirmation)
cluster /cluster:EASTCLUSTER /changepassword /skipdc /force

http://support.microsoft.com/kb/305813

Saturday, April 11, 2009

Monday, March 16, 2009

MSMQ Cluster

On any MSMQ server, it’s usually a good idea to implement the BindInterfaceIP key if there are multiple NICs involved, especially if there are multiple IPs which map to different subnets. MSMQ will pick one, and then use the subnet from that IP to determine its site membership. On a cluster, you almost always have the clustered IP, and the IP from the heartbeat NIC which can cause problems, so it’s especially important to include this key on a cluster. Here’s the reference:

329492 A cluster node with two network cards does not receive messages

http://support.microsoft.com/default.aspx?scid=kb;EN-US;329492

We also recommend using MMCV to view the queues, and keeping TMQ handy:

898701 How to use the Mmcv.exe utility to manage clustered Message Queuing resources

http://support.microsoft.com/default.aspx?scid=kb;EN-US;898701

887220 Description of TMQTools utilities for Microsoft Message Queuing

http://support.microsoft.com/default.aspx?scid=kb;EN-US;887220

You had also asked about getting performance counters to work on an MSMQ cluster. As we discussed, on a typical MSMQ cluster, there are at least 3 instances of MSMQ, the clustered instance, and the two local instances. Only one instance can be monitored remotely. You need to add the NetNameForPerfCounters registry key as described in this article:

884975 Performance Monitor counters may not appear, and the counter values may be incorrect when you remotely monitor clustered instances of Message Queuing in Windows 2000 Server

http://support.microsoft.com/default.aspx?scid=kb;EN-US;884975

The key should be added to both nodes, and if you’re still having problems, to the clustered registry section of MSMQ as well (Clustered QMs\MSMQ$MyResource\Parameters). The computer should then be rebooted. When adding the key, please note that the machine name needs to be added in uppercase letters. If the counters are still not visible remotely, then try the following:

-From a clustered command prompt, run “perfmon” and see if they’re viewable. If they are, then we know the MSMQ counters are working, and we’re having problems with the key. Try restarting the remote registry service on the active node, and see if that resolves the problem of viewing the counters remotely.

-If the counters are still not viewable, remove the registry key, and start the local MSMQ service on the inactive node, see if you can view the counters

-If the counters are not viewable from a clustered command prompt, then most likely there’s a problem with the counters themselves. Run the following command from a regular command prompt on both nodes:

-unlodctr MSMQ

-Reboot

-Switch to the Windows\System32 directory

-lodctr mqperf.ini

-Reboot

-Test the counters

Dynamic disks fail on import

Problem: Dynamic disks fail on import
Environment – 2003 SP1 – not clustered
Root Cause (if known) – LDM database had errors on disks
Resolution – Copy good LDM header to remaining disks. Convert two disks from dynamic to basic.

Tools used was dmpss and diskprobe. The header was change by reading the binary and changing the hex to match the basic disk headers.

MSMQ issues with messages not be delivered

PROBLEM DESCRIPTION:

Messages are stuck in the outgoing queue on an MSMQ Sender, and cannot be sent the cluster.

RESOLUTION:

Once we determined that public queues were being used, we found that MSMQ was associated with the wrong site. Most likely this was due to the cluster having multiple IPs, and MSMQ choosing the incorrect IP to determine site membership. Implementing the BindInterfaceIP registry key should avoid this from happening in the future.

Vista high cpu issues

Turned out to be a bogus network adapter in the regkey created by Juniper VPN

Delete from this location

HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\DNSRegisteredAdapters\

A unique guid will be here for the network adapters. Make sure to delete the correct key.

Sharepoint 2003 on MSDE

-----------------------------------------------------

CASE RESOLUTION AGREEMENT:

-----------------------------------------------------

- We are trying to upload multiple documents on the document library of the SharePoint site .

- It is failing with an error – “Form Validation error. The web server is too busy. Please try again”

- This issue is happening with this site only.

- Once we will be able to successfully upload multiple documents to this SharePoint site, we should consider this case as resolved/closed.

-----------------------------------------------------

CURRENT ACTION PLAN:

-----------------------------------------------------

- We have found that we are using SQL MSDE database with SharePoint.

- MSDE database has a limit of 2 GB as per http://msdn.microsoft.com/en-us/library/ms811304.aspx.

- It also mentions the statement – “Applications may grow beyond the MSDE 2000 2-GB data limit or the application's user base may grow beyond the workload limitation in SQL Server Desktop Engine. If this occurs, Microsoft recommends migrating the MSDE 2000 solution to a SQL Server based solution. SQL Server 2000 Desktop Engine (MSDE 2000) can be upgraded to SQL Server 2000 Personal and Standard Editions”

- We confirmed that we have crossed the 2 GB limit for the database.

- We also confirmed that the SITE database upgraded successfully to the proper level.

- We will migrate the databases to Microsoft SQL server tomorrow at 09:00 P PST.

----------------------------------------------------

Important Articles

----------------------------------------------------

SQL MSDE has 2 GB limit

http://msdn.microsoft.com/en-us/library/ms811304.aspx

http://support.microsoft.com/kb/324992

How to move SharePoint Portal Server 2003 from SQL MSDE databases to Microsoft SQL Server

http://support.microsoft.com/kb/837848

http://support.microsoft.com/kb/894164/en-us

Disk provisioning from AP

$TargetDCName = "servername"

[array]$logDeviceIDList = @()

[array]$LogDriveLetters = "H","I","J","K","L","M","N","O","P","Q","R","S"

[array]$LogDiskNumbers = @()

[array]$dbDeviceIDList = @()

[array]$DBDiskNumbers = @()

$sgprefix = (hostname).Substring((hostname).Length - 4,4) + "-SG"

$logdiskpartInputFile = (get-childitem env:TMP).Value + "\logdiskpart.in"

$dbdiskpartinputfile = (get-childitem env:TMP).Value + "\DBdiskpart.in"

$logformatbatchFile = (get-childitem env:TMP).Value + "\logformatVolumes.bat"

$dbFormatBatchFile = (get-childitem env:TMP).Value + "\DBformatVolumes.bat"

Function Delete-IfExists

{cn

if (test-path $args[0])

{

write-warning "Deleting existing $args[0] file"

(get-childitem $args[0]).Delete()

}

}

Function Get-SGNumber

{#determine if the SG number is 9 or less. If so, add a leading zero for clarity and admin view in the console and powershell.

if ($i+1 -lt 10)

{

$SG = "0"+[string]($i+1)

}

else

{

$SG = [string]($i+1)

}

return $SG

}

#delete batch/script files if they exist in %tmp%

delete-IfExists $logDiskPartInputFile

delete-ifexists $dbdiskpartinputfile

delete-ifexists $logformatbatchfile

delete-ifexists $dbformatbatchfile

################################

#DEFINE LOG DRIVES

$LogDrives = get-wmiobject win32_diskdrive | where {[math]::Round($_.size/1024/1024/1024,0) -eq 89}

if ($LogDrives.Count -eq 12)

{

foreach ($logdrive in $logdrives)

{

if ($logdrive.DeviceID.Length -eq 18)

{

$logDeviceIDList = $logDeviceIDList + ($LogDrive.DeviceID -replace ("DRIVE","DRIVE0"))

}

else

{

$logDeviceIDList = $logDeviceIDList + $LogDrive.DeviceID

}

}

}

#generate the array of disk numbers for diskpart's "SELECT DISK " command

$logDeviceIDList | sort | foreach {

$logDiskNumbers = $logDiskNumbers + $_.Substring($_.Length - 2,2)

}

#generate the logdiskpart.in file in %TMP% for logfiles

for ($i=0; $i -lt 12; $i++)

{

$SGNumber = Get-SGNumber

add-content -path $logdiskpartInputFile -value ("select disk " + $LogDiskNumbers[$i])

add-content -path $logdiskpartInputFile -value ("create partition primary align = 1024")

add-content -path $logdiskpartInputFile -value ("assign letter " + $logDriveLetters[$i] + ":")

add-content -path $logformatbatchFile -value ("format " + $logDriveLetters[$i] + ": /a:64K /FS:NTFS /v:" + $SGPrefix + $SGNumber + " /q /y")

}

$i = $null #reset the counter for later use

write-warning "In 5 seconds, the below dispart script will run. To cancel, press Ctrl-C NOW"

sleep 1

gc $logdiskpartInputFile

sleep 5

write-host "Running diskpart..."

diskpart.exe /s $logdiskpartinputfile

write-warning "In 5 seconds, the below format script will run. To cancel, press Ctrl-C NOW"

sleep 1

gc $logformatbatchFile

sleep 5

write-host "Running format..."

cmd.exe /c $logformatbatchFile

#Create mount point placeholder folders and log folders

for ($i=0; $i -lt 12; $i++)

{

$SGNumber = Get-SGNumber

new-item -path ($logdriveletters[$i] + ":") -name ($sgprefix + $SGNumber + "-DB" + $SGNumber) -type directory

new-item -path ($logdriveletters[$i] + ":") -name ($sgprefix + $SGNumber + "-Logs") -type directory

}

$i = $null

#################################

#DEFINE DB MOUNT POINTS

$DBDrives = get-wmiobject win32_diskdrive | where {[math]::Round($_.size/1024/1024/1024,0) -eq 132}

if ($DBDrives.Count -eq 12)

{

foreach ($DBdrive in $DBdrives)

{

if ($DBdrive.DeviceID.Length -eq 18)

{

$DBDeviceIDList = $DBDeviceIDList + ($DBDrive.DeviceID -replace ("DRIVE","DRIVE0"))

}

else

{

$DBDeviceIDList = $DBDeviceIDList + $DBDrive.DeviceID

}

}

}

#generate the array of disk numbers for diskpart "SELECT DISK" command

$DBDeviceIDList | sort | foreach {

$DBDiskNumbers = $DBDiskNumbers + $_.Substring($_.Length - 2,2)

}

for ($i=0; $i -lt 12; $i++)

{

$SGNumber = Get-SGNumber

add-content -path $DBdiskpartInputFile -value ("select disk " + $DBDiskNumbers[$i])

add-content -path $DBdiskpartInputFile -value ("create partition primary align = 1024")

add-content -path $DBdiskpartInputFile -value ("assign mount " + $logdriveletters[$i] + ":\" + $sgPrefix + $SGNumber + "-DB" + $SGNumber)

add-content -path $DBformatbatchFile -value ("format " + $logdriveletters[$i] + ":\" + $sgPrefix + $SGNumber + "-DB" + $SGNumber + " /a:64K /FS:NTFS /v:" + $SGPrefix + $SGNumber + "-DB" + $SGNumber + " /q /y")

}

$i = $null #reset the counter for later use

write-warning "In 5 seconds, the below dispart script will run. To cancel, press Ctrl-C NOW"

sleep 1

gc $DBdiskpartInputFile

sleep 5

write-host "Running diskpart..."

diskpart.exe /s $DBdiskpartinputfile

write-warning "In 5 seconds, the below format script will run. To cancel, press Ctrl-C NOW"

sleep 1

gc $DBformatbatchFile

sleep 5

write-host "Running format..."

cmd.exe /c $DBformatbatchFile

#################################################

# CREATE STORAGE GROUPS AND DATABASES

write-warning "To skip the storage group and database provisioning, press CTRL+C NOW"

sleep 5

for ($i=0; $i -lt 12; $i++)

{

$SGNumber = Get-SGNumber

$SGFilesPath = $logdriveletters[$i] + ":\" + $sgprefix + $SGNumber + "-Logs"

$DatabaseFilePath = $logdriveletters[$i] + ":\" + $sgPrefix + $SGNumber + "-DB" + $SGNumber

new-StorageGroup -Name ("SG" + $SGNumber) -LogFolderPath $SgFilesPath -SystemFolderPath $sgFilesPath -DomainController $TargetDCName | foreach {new-mailboxdatabase -StorageGroup $_.Name -Name ("DB" + $SGNumber) -DomainController $targetDCName}

}

Cluster Config Powershell from Alex Pavlovsky

if ($args.count -ne 2){

write-host "usage: installcluster.ps1 10.0.0.1(virtual ip of the cluster) PRBMSGHUB001(file share wittness name)"

break}

else{

$clusterVname = ((hostname).substring(0,(hostname).Length - 1)+'v') -replace "PRB","PRC"

$clusterBname = (hostname).substring(0,(hostname).Length - 1)+'b'

$creds = get-credential

$ClusterSvc = $creds.Username

$ClusterPwd = $creds.Password

$clusterVIPAddress = $args[0]

$fswName = $args[1]

write-host""

write-host "Cluster Configuration Parameters:"

write-host "=================================================="

write-host ""

write-host "Virtual cluster name: " $clusterVName

write-host "Cluster IP address: " $clusterVIPAddress

write-host "Cluster service account: " $clusterSvc

write-host "=================================================="

write-host ""

write-host "The cluster configuration will execute in 10 seconds. To cancel, press Ctrl-C"

start-sleep -s 10

Cluster.exe /cluster:$clustervname /create /node:(hostname) /ipaddress:$clusterVIPAddress /user:$ClusterSvc /min

Cluster.exe $clusterVName res "Majority Node Set" /create /group:`"Cluster Group`" /type:`"Majority Node Set`"

Cluster.exe $clusterVName res `"Majority Node Set`" /online

Cluster.exe $clusterVName /quorum:`"Majority Node Set`"

Cluster.exe $clusterVName res `"Local Quorum`" /offline

Cluster.exe $clusterVName res `"Local Quorum`" /delete

write-host "================================================="

write-host "Completed the cluster configuration for node A."

write-host ""

write-host "WARNING: Node $clusterbname will be added in 10 seconds. To cancel, press Ctrl+C"

start-sleep -s 10

cluster.exe $clusterVName /add:$clusterbname /min

write-host "================================================="

write-host "Completed the cluster configuration for node B."

write-host "Creating File Share Witness share:"

new-item \\$fswname\c$\MNS_FSW_$clusterVName -type directory

$Class = "Win32_Share"

$Method = "Create"

$MC = [WmiClass]"\\$FSWName\ROOT\CIMV2:$Class"

$InParams = $mc.psbase.GetMethodParameters($Method)

$InParams.Access = $null

$InParams.Description = "$clusterVName file share witness"

$InParams.MaximumAllowed = 10

$InParams.Name = [string]"MNS_FSW_$clusterVname"

$InParams.Password = $null

$InParams.Path = "C:\MNS_FSW_$clusterVname"

$InParams.Type = [uint32]0

$result = $mc.PSBase.InvokeMethod($Method, $inParams, $Null)

if ($result.ReturnValue -ne 0) {

write-host "Failed to create MNS Share"

}

else

{

write-host "Created MNS share succesfully. Please set appropriate security ACLs on the share (by default, everyone has full access = VERY BAD)."

cluster.exe $clusterVName res `"Majority Node Set`" /priv MNSFIleShare=\\$fswName\MNS_FSW_$clusterVName

cluster.exe $clusterVName group `"Cluster Group`" /move

cluster.exe $clusterVName res `"Majority Node Set`" /priv

cluster.exe $clustervName /priv HeartBeatLostInterfaceTicks=10:DWORD

cluster.exe $clustervName /priv HeartBeatLostNodeTicks=10:DWORD

cluster.exe $clusterVname network "Heartbeat" /prop Role=1

cluster.exe $clusterVname /setnetpri:"Heartbeat","Team"

write-host "Please reboot each cluster node to complete configuration."

write-host "It is also necessary to change share permissions on the MNS FSW"

}

}