DPM 2007 – Volume Missing

February 27th, 2010

After a power cut, (before the UPS was installed!), on booting back up the DPM 2007 server, the server showed loads of replica disks saying “Volume Missing”, before i crying, it tried the following to get DPM to pick them back up and it appeared to work ok:

Run the command below to enable auto-detect of new volumes.

Mountvol /e

Rescan for disks in the COmputer Management Disk Management.

Then in DPM 2007 Console
DPM 2007 -> Management -> Disks -> Select DIsk 1
Click Rescan and wait.

Repeat for all the disks you have.

Then go back to the “monitoring” tab. And select alerts you should see all this missing disk alerts disappear. Once gone mop up any other warnings and run some synchs on the disks that were missing just to be sure. But that should resolve the problem.

WSUS – Computers reporting and then disappearing

February 9th, 2010

Reset WSUS ClientBeen working on WSUS and have setup a WSUS server. However started to get a problem whereby the computers were appearing on WSUS and reporting their status then disappearing. I noticed that they were disappearing and being replaced by another computer.

It turns out that when a machine is ghosted and then sysprep’ed it doesnt reset the WSUS id, which is a unique ID that WSUS uses to track the computer. So i’ve been able to come up with a script that can be run manually or via a script (GPO) on startup to reset this ID and make it talk properly to WSUS. Note this also sorted problems with Virtual Machines that have been cloned too.

Set oShell = CreateObject(”WScript.Shell”)

sRegKey = “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate”
pRegKey = “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections”

‘ suppress error in case values does not exist
On Error Resume Next

‘ check for marker
sIDDeleted = oShell.RegRead( sRegKey & “\IDDeleted”)

‘ to be sure values is only deleted once, test on marker
If sIDDeleted <> “yes” Then

‘ delete any WinHttpSettings registry entry (interferes with WSUS)
oshell.RegDelete pRegKey & “\WinHttpSettings”

‘ delete values
oShell.RegDelete sRegKey & “\AccountDomainSid”
oShell.RegDelete sRegKey & “\PingID”
oShell.RegDelete sRegKey & “\SusClientId”

‘ Stop and start the Automatic updates service
oShell.Run “%SystemRoot%\system32\net.exe stop wuauserv”, 0, True
oShell.Run “%SystemRoot%\system32\net.exe start wuauserv”, 0, True

‘ Run wuauclt.exe with resetauthorization
sCmd = “%SystemRoot%\system32\wuauclt.exe /resetauthorization /detectnow”
oShell.Run sCmd, 0, True

‘ create marker
oShell.RegWrite sRegKey & “\IDDeleted”, “yes”

End If

Note: this should be copied and saved as a .vbs file. I’ve also attached it as a file to this post, needs to be renamed though!

Reset WSUS Client Script

Enable Jumbo Frames on Hardware ISCSI HBA vmhba

January 30th, 2010

If you need to use jumbo frames on your ISCSI you need to run this command from the command line of the ESX host:

esxcfg-hwiscsi -j enable <vmhbaX>

e.g.

esxcfg-hwiscsi -j enable vmhba1

You’ll need to reboot to let the changes take effect. To verify run:
esxcfg-hwiscsi -l – lists the current settings.

Useful link: http://www.vi-tips.com/2009/04/configuration-of-iscsi-in-vmware-vi3.html

Finding email addresses on an object in Active Directory

August 24th, 2009

http://www.msexchange.org/articles/Finding-Duplicate-SMTP-Addresses.html

Shows how to find an email address within the Exchange infrastructure.

Migrating a DHCP server from one server to another

July 29th, 2009

Heres a neat trick, seems to work ok. Remember however, when you export it switches off the old dhcp server. So be quick!

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

Nagios – Example using check_icmp

July 24th, 2009

This is what would be needed in your hosts configuration to monitor using check_icmp rather than check_ping.

define service{
use                     generic-service ; Inherit values from a template
host_name               SWITCH    ; The name of the host the service is associated with
service_description     PING            ; The service description
check_command           check_icmp!40.0,10%!100.0,40%  ; The command used to monitor the service
normal_check_interval   5               ; Check the service every 5 minutes under normal conditions
retry_check_interval    1               ; Re-check the service every minute until its final/hard state is determined
}

This is what would be needed in the commands.cfg

# ‘check-host-alive’ command definition
define command{
command_name    check_icmp
command_line    $USER1$/check_icmp -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 2
}

This makes the assumption its going to do two pings, otherwise turn “-p 2″ into $ARG3$ instead!

Vi Find and Replace Example

July 24th, 2009

Here is an example of find and replace with VI, this will replace every instance of the “findthistext” string in the file with “replacewithtext”. Neat saves lots of typing!

:%s/findthistext/replacewithtext/g

Nagios – check_icmp

July 24th, 2009

With Nagios using check_icmp is the way to go, it better and faster, below is an example configuration directive for setting the check-host-alive command which will be used by each host check.

# ‘check-host-alive’ command definition
define command{
command_name    check-host-alive
command_line    $USER1$/check_icmp -H $HOSTADDRESS$ -w 30,5% -c 100,20% -p 1
}

Nagios NSClient++ Access Denied Error on Installation

July 21st, 2009

I have the following problem when trying to install nsclient++ onto a Windows 2003 Server SP2 (note this is a member server).

Using a local administrator account on the server trying to install the install completes but the service does not get registered trying to manually register gives this error:

C:\Program Files\NSClient++>nsclient++ -install e NSClient++.cpp(212) Service installation failed: Unable to install service.5: Access is denied.
RESOLUTION

I ran “FileMon” tool from SysInternals which installing the service, and found access denied errors. But permissions where not the problem. It turned out that Sophos Anti-Virus thought the “Nsclient++.exe” was a virus. Once I authorised the nsclient++.exe file in Sophos the service could install and run fine.

VSphere 4 Cheat Sheet

July 19th, 2009

I’m still trying to get VMWare 3.5 installed completely and servers virtualised. But utlimately it would be nice to use vSphere4 in the end.

Heres a good PDF showing the new features and how the licencing works (which has been made a bit more complicated! :) )

http://www.boche.net/blog/wp-content/uploads/2009/VsphereData.pdf