Monday, August 31, 2009

Enable ICMP Response on W2k8 Firewall

The firewall on Windows Server 2008 is turned on by default and ICMP echoes are disabled. According to Microsoft you should be able to enable it using:

netsh advfirewall firewall add rule name=”ICMP Allow incoming V4 echo request” protocol=icmpv4:8,any dir=in action=allow

The result of this is "An invalid value was specified" which makes sense if you look at what netsh should be provided with. Rather than adding this custom rule, I had a look to see if there was a rule already there, but disabled. There is, but it's called "File and Printer Sharing (Echo Request - ICMPv4-In)" for some reason.

So, to enable it use:

netsh advfirewall firewall set rule name="File and Printer Sharing (Echo Request - ICMPv4-In)" new enable=yes

Happy pinging.

Thursday, August 27, 2009

GUI vs CLI

I always lament the way Microsoft seem to insist on changing user interfaces, seemingly burying things I need to configure one or more clicks away in successive versions of Windows, or implementing "Wizards" which require you to click fill in a piece of information, click Next, fill in another piece of information, click next, and so on. (At the risk of sounding like an old man) I liked the way things were in the NT days e.g. if you needed to configure a WINS Server, most of the settings you needed were presented in a single properties page e.g.:



This allowed you to enter everything required and hit OK once instead of hitting Next umpteen times.

Thankfully there isn't a Wizard (yet) for setting up IP addresses, but there's still a significant number of mouse clicks required to get the job done. At least the command line is never more than six key strokes away (Windows Key+R - cmd - Return). So rather than wearing out the button on your mouse, the next time you need to configure IP addresses at the command line, try netsh instead:

Set an IP address
netsh interface ip set address name="Local Area Connection" static ip mask gateway metric e.g.:
netsh interface ip set address name="Local Area Connection" static 10.10.1.100 255.255.255.0 10.10.1.1 1

Primary DNS
netsh interface ip set dnsserver name="Local Area Connection" static DNSServerIPAddress e.g.:
netsh interface ip set dnsserver name="Local Area Connection" static 82.195.128.192

Secondary DNS
netsh interface ip add dnsserver "Local Area Connection" DNSServerIPAddress e.g.:
netsh interface ip add dnsserver "Local Area Connection" 82.195.146.192

Saturday, June 27, 2009

Seven Million Files on NTFS

I had occasion to look into performance problems on a Windows 2003 server the other day. The server is running IIS and generally runs along tickety-boo. Then someone started to delete some files from an NTFS volume and the server practically locked up. That's when I was called in.

I quickly discovered that the one volume had approximately seven million files files on it. This amount of files will pose probems: even if the application(s) using the volume can cope, explorer.exe won't fair so well.

I've never been particularly impressed with Explorer's performance when large file operations are required, wheter that's working with a small number of large files, or a large number of small files. In fairness though, deleting seven million files is bound to take some time. That said, it shouldn't appear to lock up the entire system.

Any component of an operating system has its limits. Seven million files appears to be beyond what explorer on W2k3 can cope with by default. The application was also generating long files names with the dfferences in the names at the end of the filenames which poses an overhead for 8.3 filename generation. It is of course possible to tweak NTFS performance using fsutil to turn off 8.3 filename generation, but I favour leaving things at their defaults unless there is a compelling reason to do otherwise.

Debug logging had been left enabled in the application and was generating the files. It was not required in normal operations so was turned off. A quick format of the volume blew the files away quicker than a traditional delete could ever do. Log file generation reverted to a more respectable level and normal operations were resumed.

If you want to know more about the innards of NTFS, here's some good starting points:

What is NTFS?
How NTFS Works
NTFS Documentation
NTFS.com
Linux NTFS Wiki

B

Monday, June 8, 2009

NAT Woes Resolved

Having started with Hosting365 I had to offload my NAT woes to a professional acquantance. Bottom line: the IP settings provided by the ISP were incorrect and the ZyWall NAT settings were caused by some finger trouble. All sorted now.

Saturday, June 6, 2009

All My Sons

My wife and I went to see All My Sons at The Gate Theatre last Tuesday. The performance was absolutely fanntastic. The set was impressive too. I first heard of this Arthur Miller play coming to The Gate Theatre back in February when we saw The Real Thing. At the time I figured it'd be one to see. How right I was.

The performances were the best I've ever seen on stage. Len Cariou's performance, his Gate debut, was particularly convincing. He wasn't acting: he was Joe Keller. Barbara Brennan's performance of, Kate, the distraught mother, is also first rate. And Garrett Lombard did a good Chris. In fact, at the risk of sounding like Father Ted, all the performances were very good.

To be fair, the material they have to work with is extraordinary. Miller delivers lines at just the right times, turning the audience's opinion of different characters from apathy to empathy as their inner conflicts are revealed.

This is without doubt a special production and is one to be seen if you have any chance. There were a couple of empty seats on Tuesday night, so if you have a free evening and a few Euro to spare, make a point to go see it. You won't be disappointed.

B

Thursday, April 30, 2009

Hyper-V R2

I attended a Windows User Group session on Hyper-V R2 this morning. New features include:

Live Migration / Clustered Shared Volumes
Hyper-V leverages MSCS which operates on a shared nothing basis. Clustered Shared Volumes have been introduced to facilitate Live Migrations (only). Dave did a live demo which worked well: he set up a ping -t to the VM for the duration of the Live Migrations, which proved that it worked.

Core Parking
More of a W2k8 feature than Hyper-V per se. Essentially W2k8 can park unneeded CPU cores to reduce power consumption, waking them when they're needed again.

Second-Level Address Translation (SLAT)
SLAT essentially improves VM memory access. It's hardware based. "On Intel-based processors, this is called Extended Page Tables (EPT), and on AMD-based processors, it is called Nested Page Tables (NPT)" Source: What's New in Hyper-V in Windows Server 2008 R2

Dave also touched on booting from VHDs which is pretty cool.

One thing I like about Hyper-V is that VMs are treated as cluster resources. Anyone familiar with MSCS will get their heads around VMs running as a cluster resource in no time.

One point I want to pick Dave up on is his statement that Microsoft "gives" you HA without an additional licence cost, whereas with VMware you have to pay for it. Well, that's not entirely true - HA requires Windows Server Enterprise Edition - which costs more than Standard Edition. In my book, that's not much different than VMware's licensing model i.e. you pay more for HA.

IMHO
The new features in Hyper-V are welcome and Hyper-V is certainly worth considering. However, VMware has the edge over Hyper-V e.g. you don't need a LUN per VM, and vSphere will provide fault tolerance as a feature. Microsoft are catching up on VMware, but they're not quite there yet.

B

Tuesday, April 28, 2009

The Parameter Is Incorrect

When SysAdmins are troubleshooting the last thing they need are unhelpful error messages. I had one of those situations today. I was copying a 13GB file to an external drive on a Windows Server 2003 machine. On starting the copy I got the following error message:

Cannot Copy [filename] The Parameter is Incorrect.

Marvellous. Thankfully I came across this one before and remembered that it occurs when you try to copy a file >4GB onto a volume formatted with FAT32 i.e. the maximum file size on a FAT32 volume is approximately 4GB.

For curiosity's sake, this evening I fired up a Windows Server 2008 virtual machine on VMware Workstation, created an 8GB FAT32 volume and tried to copy a 5GB file to it.
Thankfully the error message in Windows Server 2008 is much more informative i.e. "The file [filename] is too large for the destination file system.":



As for the original problem, a quick convert f: /fs:ntfs solved the problem.

B