Monthly Archive for July, 2007

Things that MIMESweeper can’t do

Question: What happens when a user sends a 1Mb e-mail to 2000 external recipients, and also requests delivery receipts?

Answer: MailSweeper delivery service will die and mail will start to queue on your server. Messages will build up in the 'domains' folders and in 'holding' as your the policy server becomes unable to deliver any more mail.

This happened to me today. It was noticed early as I use an spool watching utility (free on JMC's mswtools.org) which uses blat to send alerts when the number of files in the MSW spool directories go over certain thresholds.

According to the ClearSwift engineer I spoke to, the problem is to do with the way the delivery service can only handle 50 threads at a time. One would imagine a policy server would cope with 2000 messages being dumped on it but apparently this will just keel it over. Multiple reboots did seem to give enough short bursts to clear the 'domains' queues apart from one internal domain containing around 800 delivery receipts and 100 business e-mails. The problem was, on most of these delivery receipts and delivery failures the original message was attached, and the queue was standing at around 900Mb. This would not clear and forcing a retry seemed to make the processing just freeze up. Unfortunately MailSweeper lacks controls on this part of the homepage to delete items in the delivery queue, so to purge all of the delivery receipts I had to delete the corresponding files in the file system on the PS. The problem to overcome then is, how do you make sure you only delete the delivery receipts when the folder is full of randomly named RCP files? I used the following commands within that domain folder to achieve this:

findstr /S /M "Message relayed" *.RCP > output.txt
FOR /F %I IN (output.txt) DO del %I

Tomorrow I'll be implementing a much lower limit on the number of recipients per message that can be sent through Exchange, and of course suggesting a better method of delivering this PDF in the future. I'm thinking Morse code ...

Edit: Just found the default in Exchange 2003 is a maximum of 64000 recipients per message!

Technorati Tags: ,

Upgrade ESX from 3.0.0 to 3.0.1

There seems to be some debate on whether in-place upgrades of ESX server are a good idea, or whether it's better to abandon old versions and go for clean installs. My opinion is that if your server is healthy and you don't have any issues or problems, then there's no need to be scared about upgrading your existing installation.

First download it from vmware and untar it:

tar zxfv 3.0.1-32039-full.tgz
cd 32039
ls

You will the tarball contains a load of .rpm files. Updating from this directory should then be as easy as:

/usr/sbin/esxupdate -n update

However if you have already done some patching on your server you may receive the following error:

INFO: 1 packages need to be downgraded.
Please use the --force option and try again.

Do not use the --force option in this situation as doing so will downgrade your previously installed patches. Instead, check your update log and see which packages are flagging the errors.

grep -i downgrade /var/log/vmware/esxupdate.log

Then use the -x switch to exclude those patches from the esxupdate.

/usr/sbin/esxupdate -x VMware-esx-scripts.i386 -x krb5-libs.i386 -n update

The -n switch supresses an automatic reboot so you can review the output of the command, but you will need to restart your server when the update has finished.

Technorati Tags: ,

Patch ESX Server, the easy way

I've discovered a really great tool for patching ESX servers from Windows: VMTS Patch Manager. It's a bit like WSUS in that all patches are downloaded once to a central repository and you select what you want pushed out from there. You don't need to log on to any ESX servers or spend any time at the command line, and it integrates with Virtual Centre which enables you to manage the patching of your whole virtual infrastructure by connecting to one place. All this is packaged in an easy-to-use GUI and available to download for free.

ESX Patch Manager
VMTS Patch Manager

It's also clever enough to recognise patches that will downgrade your system or are not required, and it will not install them for you. It's not quite perfect and does have a few quirks and rough edges, but I would definitely recommend the download if you have an ESX deployment that needs patching. I've seen a few alternatives to VMTS Patch Manager that are basically perl scripts and http repositories, but nothing else I've seen is as good as this.

Technorati Tags: , ,

Extending virtual disks in ESX Server 3.01

Below is the procedure on how to extend the disk of a Windows 2003 virtual server.

Before starting please note the following:

  • Microsoft's diskpart utility can only be used to extend dynamic disks. Before using this utility you will need to convert your disks to dynamic using the Disk Management utility in the Computer Management console.
  • System or boot volumes cannot be extended using diskpart.
  • GParted cannot manage dynamic disks. If you are resizing a system or boot disk, configure it as a dynamic disk after it has been resized. If you convert to dynamic first, you may not be able to convert it back to a basic disk.
  • Before making any changes ensure you have a backup of your server, or at the least a snapshot of your VM.

1. Power down your VM gracefully
2. SSH to the ESX Server hosting the VM
3. cd to the directory containing your .vmdk disk file (you can check the name and location on the Hardware tab of your VM in Virtual Infrastructure Manager). e.g.

cd /vmfs/volumes/vmStore

4. Use vmkfstools to extend the disk using the following syntax: (Please use a double dash, not a single dash. Wordpress automatically reformats this from a double to single dash)

vmkfstools --extendvirtualdisk [size] [vmdk filename]

Size can be in Mb, for example 5000m, or in Gb, for example 5g. e.g.

vmkfstools --extendvirtualdisk 11g S05010094.vmdk

If you are resizing your C: drive or system/boot partition, continue at step 9. Otherwise, continue below:

5. Power up your VM
6. In Computer Management � Disk Management you should now see the unallocated space on the disk.
7. Open a command prompt window and use the diskpart utility to extend the partition.

Diskpart
List volume
Select volume z
Extend size=x disk=y

Where z = the volume number, x= the size in MB and y= the disk number in Disk Management

8. Your server may need a restart for the changes to take effect.

If you are resizing your C: drive , follow steps 1-4 above. Then:

9. Obtain a copy of the GParted live CD iso, copy it to your ESX server and configure it as your CD ROM drive on your VM.

Note: GParted will only recognize your disks if your VM's SCSI Controller is configured to emulate a BUS Logic SCSI controller. Changing type from LSI Logic to BUS Logic is dangerous. Make sure you know what you are doing or you could make your disk inaccessible to Windows.

10. Change SCSI Controller type from BUS Logic to LSI Logic.
11. Boot your VM from the ISO image.
12. Use GParted to delete the extra space and extend your volume into the unallocated space.
13. Power down VM. Change SCSI Controller type from LSI Logic to BUS Logic. Configure VM to boot from hard disk.
14. Power on VM, chkdsk should run as part of the startup proces and your disk should then be extended.