Welcome to the blog of mechanised.com
This blog is mainly a technical repository of information on Virtualisation tools and management for our hosting service.
Also for HP's Bladesystem that we use at both our datacentres.
Other articles are also included on .Net development and MS SQL Server as well as other interesting things we come across.
Monday, 7 November 2011
Export a backup copy of your IIS 7.0 configuration
Open Server Manager
Expand Roles – Web Server (IIS) – Internet Information Services (IIS) Manager
Highlight the web server name
From the Management category, double click Shared Configuration
Under Actions, select Export Configuration. Accept or change the default export path of C:\Windows\system32\inetsrv\config\export
Click the Connect As button, and enter administrative credentials. If the server is a domain member, you may need to enter your credentials in the format domain\username or username@domain.com
Enter the encryption keys password twice and press OK
You should now have three files in the C:\Windows\system32\inetsrv\config\export directory: administration.config, applicationHost.config, and configEncKey.key. Save the files in a safe place.
Saturday, 1 October 2011
Watch that VG rename
Tuesday, 29 March 2011
Moving FT catalogs from SQL 2005 to SQL 2008
When you detach DB from 2005 make sure you select the option to save the FT catalogs.
Move the physical catalog files to the new path for SQL 2008, to see where they currently are try this:
select * from sys.master_files where type = 4
When reattaching SQL 2008 will complain the files are not found so then point to the new locations and it should all work fine!
Friday, 22 October 2010
IIS7 site and file synchronisation for web farms
This great bit of software allows you to sync all sites and their files from a master machine to all other members of the cluster automatically.
We have come across problems when a non administrator account is used for synchronising though.
To get round this we use the Web Management Service and a slightly different command line to sync with.
First, make sure the Web Management Service is on automatic and in Server Manager expand out the Roles/Web Server (IIS)/IIS Manager and choose the server instance, in the Management panel under Management Service you can enable remote connections. Then start/restart the service.
We then use a command line in this format:
msdeploy -verb:sync -source:webServer,wmsvc=192.168.0.1,username=user1,password=password1,includeAcls=true -dest:webServer,wmsvc=192.168.0.2,username=user2,password=password2 -enableLink:AppPoolExtension -allowUntrusted=true
As you can see the wmsvc service is used to authenticate, NTLM is the default authentication and if like us you use cloned servers the -allowUntrusted just bypasses the need to have an authorised certificate on the destination servers.
Just run multiple times in a batch for all the servers in the cluster and everything is all in sync!
Wednesday, 13 October 2010
Server 2008 - remove old NICs so you can rename new NICs properly
Execute the following:
SET DEVMGR_SHOW_NONPRESENT_DEVICES=1
START DEVMGMT.MSC
When device manager opens choose 'show hidden devices' from the 'view' menu.
You can then right click and uninstall any old NICs (shown as greyed out)
This is always a problem for us when cloning VMWare machines!
Monday, 20 September 2010
Reset machine ID for WSUS clients
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v AccountDomainSid /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v PingID /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId /f
net stop wuauserv
net start wuauserv
wuauclt /resetauthorization /detectnow
Tuesday, 27 July 2010
Open excel 2007 docs in multiple windows
My Computer
Tools
Folder Options
File Types
Choose XLS (or XLSX if you want)
Go to Advanced
Uncheck "browse in same window" in advanced window.
Then highlight Open
Edit
Make sure in the Action box it says &Open
Copy the following and paste into "application used to perform action":
"C:\Program Files\Microsoft Office\OFFICE12\EXCEL.EXE" "%1"
Check the box next to use DDE
Remove anything that is in DDE Message box and DDE Application Not Running box.
Make sure the application box says: EXCEL
And in the Topic box it says: System
Monday, 19 July 2010
Quick fix for tables marked as crashed in MySQL
/etc/init.d/mysql stop or service mysql stopGo into the directory where the tables are stored:
cd /var/lib/mysqlCheck each database for errors:
myisamchk -cs a*/*.MYIIf errors found then run the fix:
myisamchk -r a*/*.MYIOnce all checked and repaired, restart the service:
/etc/init.d/mysql start or service mysql start
Wednesday, 14 July 2010
Installing VMWare open tools on RHEL5/Centos5
/etc/yum.repos.d/vmware-tools.repoAnd put this in it:
[vmware-tools]Replace [esx-version] with 3.5u2, 3.5u3, 3.5u4, 3.5u5, 4.0, 4.0u1, 4.0u2, or 4.1, depending on the ESX/ESXi version.
name=VMware Tools for Red Hat Enterprise Linux $releasever - $basearch
baseurl=http://packages.vmware.com/tools/esx/[esx-version]/rhel5/$basearch
enabled=1
gpgcheck=1
gpgkey=http://packages.vmware.com/tools/VMWARE-PACKAGING-GPG-KEY.pub
Then use yum to install the server version, as no gui tools needed.
yum install vmware-tools-noxVerify installation by:
service vmware-tools statusShould be shown as running, if not then use same command above but 'start' instead of 'status'
You should be able to see for the guest that VMWare tools is shown as 'Unmanaged' so tools will need to be updated on each guest manually.
Tuesday, 27 April 2010
How to monitor an LSI MegaRAID controller within OpenFiler
Extract the files eg.
rpm2cpio MegaCli-8.00.11-1.i386.rpm | cpio -idmv
and make sure you move the binaries into /opt/MegaRAID/MegaCli/
cd /etc/cron.hourly
Create a new hourly script to check the drives and send an email alert if there's a problem
vi MegaRAIDcron
#!/bin/bash
cd /opt/MegaRAID/MegaCli
./MegaCli64 -AdpAllInfo -aALL | grep "Degraded" > degraded.txt
./MegaCli64 -AdpAllInfo -aALL | grep "Failed" >> degraded.txt
cat degraded.txt | grep "1" > /dev/null
if [[ $? -eq 0 ]];
then
./MegaCli64 -LdPdInfo -aALL | mailx -s 'Degraded RAID on '$HOSTNAME -r $HOSTNAME@youremail.com alert@youremail.com
fi
:wq
chmod 775 MegaRAIDcron
You can test this works by running the script manually but replace the grep "1" on the 5th line with grep "0" so it'll send an alert if there are 0 failures instead of 1. Don't forget to change it back!
This script was adapted from this post on the Openfiler forums.
You can also send a daily/weekly overview email (to make sure it's still working!) by creating a similar file as above in the cron.daily or cron.weekly folder.
#!/bin/bash
cd /opt/MegaRAID/MegaCli
./MegaCli64 -LDInfo -Lall -aALL >/tmp/MegaCli64.txt
mailx -s 'RAID INFO on '$HOSTNAME -r $HOSTNAME@computerlove.co.uk -v -a /tmp/MegaCli64.txt you@youremail.com
Friday, 16 April 2010
Removing Linux server headers
Edit /etc/httpd/conf/httpd.conf
Find ServerTokens and change to ServerTokens Prod
Edit /etc/php5/php.ini
Find expose_php and change to expose_php = Off
This will make sure fingerprinting a server for vulnerabilities is slightly reduced.
Friday, 5 February 2010
HP Hard disc model matrix
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=c00305257&prodTypeId=15351&prodSeriesId=397642#A4
Wednesday, 11 November 2009
Converting VMDK files to thin provisioned
vmkfstools -i fatdisk.vmdk -d thin thindisk.vmdk
Don't forget to either rename the existing disk (and edit meta data) or change your VMX file afterwards to point to the new disk.
Does take a considerable time though!
Wednesday, 7 October 2009
IIS Metabase update to set processor affinity for an IIS application pool
Within each application pool you add 2 new identifiers:
MD_APPPOOL_SMP_AFFINITIZED - as an inherited server string 'true'
MD_APPPOOL_SMP_AFFINITIZED_PROCESSOR_MASK - as an inherited server number, this needs to be mask of the CPU cores in binary converted to decimal, for instance a 4 core server can use 3 to signify the first 2 cores to be used only.
Tuesday, 6 October 2009
Restarting management agents for ESXi from command line
All this without disrupting running guest machines.
/sbin/services.sh restart
Thursday, 27 August 2009
Fix for VMWare tools install failure with error 1722
1. Open registry editor, locate HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\COM3, and then delete this key.
2. From the Start menu, point to Settings, click Control Panel, and then click Add/Remove Programs.
3. Click Add/Remove Windows Components.
4. Proceed through the wizard, and accept all of the defaults. (COM is reconfigured)
5. Restart the computer.
6. Install Vmware Tools
Friday, 10 July 2009
Reminder: temporary change to enable a proxy for system updates
Rpath example:
export http_proxy="http://10.141.12.254:80"
To remove the proxy for when system is going into production:
unset http_proxy
Thursday, 18 June 2009
Vote for Code at the Big Chip Awards
We are up for 2 sites but we'd love you to vote for Original Source.
Just text SOURCE to 84433, it's just the cost of a normal text.
Thanks!
Update: Hurrah! We won the 'Tasty website' award for Original Source, thanks to everyone who voted! We also won Best On-line Brand Development for Crown Paint.
Wednesday, 17 June 2009
Useful reminder of disk alignment boundaries
Summary:
- Select a disk in DISKPART
- create partition primary align=64
- Check with msinfo32/System info
- Note: If your using 2003 enterprise or datacenter edition there is a bug where you receive an error when trying to format, the work around is to assign a drive letter in disk part and then format
Tuesday, 16 June 2009
A billion year ultra-dense nanotechnology memory chip
They reckon this'll be on the market within the next couple of years, the storage density is thousands of times higher than current technology.
http://www.nanowerk.com/news/newsid=10999.php
Friday, 5 June 2009
Disaster-proof storage device?
They even do NAS storage devices that can withstand an hours fire and 30 days in water!
http://iosafe.com/
Friday, 8 May 2009
HP warranty and care pack checking tools
http://www.itrc.hp.com/service/ewarranty/warrantyInput.do
http://www.hp.com/uk/carepack/
Little reminder as well, UK066E is 3 year 24/7 4 hour support for BL460's and UH311E is for the C3000 enclosures with the same cover.
Friday, 1 May 2009
What are the best practices when it comes to VMWare ESX Server 3.5 and Open-E?
http://kb.open-e.com/entry/4/
Sunday, 26 April 2009
VMware ESXi problem with NIC teaming and CARP with virtual firewall/router
Turns out you must only have a single NIC on a vSwitch with a guest VM being used as a MASTER for CARP, otherwise will always show as BACKUP.
Can't even have a NIC in the standby list, 2nd NIC has to be completely removed.
There may well be a setting in the advanced options somewhere that might get this to work, if anyone has done this please let us know!
Friday, 24 April 2009
Setting up a High Availability NAS/SAN using Openfiler
Run through on configuring DRDB to run a high availabilty cluster using Openfiler
http://www.the-mesh.org/tiki-index.php?page=OpenFilerHaSetup
Friday, 3 April 2009
Getting higher iSCSI throughput on VMware
http://virtualgeek.typepad.com/virtual_geek/2009/01/a-multivendor-post-to-help-our-mutual-iscsi-customers-using-vmware.html
Monday, 19 January 2009
rPath appliance setup
Easiest thing to do is edit these files at the console to get a static IP assigned.
vi /etc/sysconfig/networkRestart networking and then you can get to the appliance config screen with your static IP.
NETWORKING=yes
HOSTNAME=xxxxx
GATEWAY=1.2.3.4
vi /etc/resolv.conf
nameserver 1.2.3.4
nameserver 4.3.2.1
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=1.2.3.255
IPADDR=1.2.3.4
NETMASK=255.255.255.0
NETWORK=1.2.3.0
ONBOOT=yes
TYPE=Ethernet
Also the admin is usually out of date so as root you'll need to do a conary updateall and a restart to get all the latest updates.
Friday, 21 November 2008
Low cost HP ESXi server for lab testing
It can be picked up for £571.76 from imldirect.com.
This is a low spec dual core Xeon but it does have the HP Smart Array E200i and will support 6 SAS/SATA drives, only comes with 1GB RAM but RAM is cheap.
We'll be using in our lab with the HP USB embedded ESXi for testing etc.
HP product code is 470064-100.
Sunday, 9 November 2008
Convert old VMWare server disk directly to ESX/ESXi format
Here's how to make the transition easy, assuming all your disks use LSILogic or BusLogic drives:
On your vmware server host, use "vmware-vdiskmanager -r (source disk path) -t 2 (destination disk path)" to convert your disk to "monolithicFlat"
Open "disk.vmdk" it is just a text file
Change "monolithicFlat" to "vmfs" and change "FLAT" (note the case!) below that to "vmfs".
Just add the disk to the ESX/ESXi VM and boot!
Tuesday, 7 October 2008
Thursday, 25 September 2008
Force WSUS update
here is what you would put in a script to force immediate WSUS checkup by client:
--------
net stop wuauserv
REG DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v LastWaitTimeout /f
REG DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v DetectionStartTime /f
Reg Delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v NextDetectionTime /f
net start wuauserv
-----------
A more lightweight command:
wuauclt /detectnow
Monday, 22 September 2008
Moving VM's in VMware ESXi via SSH
Both machines need SSH enabling, then in the directory where the disk files are stored you can use SCP to copy to the other machines datastore.
scp * root@hostname:/vmfs/volumes/datastorename/vm-dir
Sunday, 21 September 2008
Interesting binary diff tool, would help enormously for our daily backup's to SAN
Do a monthly full on first of each month then daily backups are diffed against the original. At any point a previous day backup can be regenerated from the 2 files.
I'll have to do some testing on the many terrabytes of storage to see just how much we could save! In theory savings of at least 50% size could be possible, especially with large mainly static databases and site files.
UPDATE:
Tried this and found that especially databases are never exactly the same data in the same place so it doesn't quite work out, also takes a very long time and so not really usable for daily backups.
This is not really as critical as SQL Server 2005 now has differential backup and site files are backed up with a full monthly and then incremental daily changes. This is keeping our backup sizes down small enough to not run out of space on our backup NAS drives.
Thursday, 18 September 2008
Event log error fix for RS errors after SQL 2005 installed
.NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Failed to compile: Microsoft.ReportingServices.QueryDesigners, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91 . Error code = 0x80070002
To Fix, drag
C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\Microsoft.ReportingServices.Design.dll
to
C:\WINDOWS\assembly
To install the offending library to the GAC.
Double check all is fine:
C:\WINDOWS\microsoft.net\Framework\v2.0.50727\ngen executeQueueditems
Most annoying...
New switch upgrade? Need fibre GBICs
The HP 24-port ProCurve Switch 2824 with 20 10/100/1000 ports has 4 dual-personality ports for 10/100/1000 or mini-GBIC connectivity.
Ideal for medium to large networks, the Switch 2824 cost-effectively offer the maximum in bandwidth performance with 10 times the speed of 100 Mbit switches. Migrating to Gigabit switches will allow you to take full advantage of your existing high-performance, Gigabit-enabled PCs, laptops, and servers - and see noticeably improved application response and file transfer times. By implementing the Switch 2824, you will seamlessly protect your existing network investment while preparing for future growth.
Product : HP ProCurve Switch 2824 - Switch - 24 ports - EN, Fast EN, Gigabit EN - 10Base-T, 100Base-TX, 1000Base-T + 4 x mini-GBIC (empty)
Buy Price: £845.00
Mfr Code : J4903A
Alternatively 2810, still stackable and layer 2 as well, code is J9021A, cheaper at about £559
Or 2510 gigabit version, identical specifications as the 2810 but about £360, code is J9279A, not stackable though, but used as dual connectivity with MPIO iSCSI SAN it wouldn't matter!
Switching 64bit server to run 32bit IIS exclusively
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 true
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -ir -enable
Monday, 15 September 2008
Nice runthrough of how to get Openfiler SAN working correctly with ESXi
Will report back on how this goes once we have our new SANs setup. Critically need to make sure NIC teaming is working fully.
Maximum single LUN size to ESXi and MS initiator (XP 32bit) is 2097120 MB
Handy list of MS KB articles to refer to
http://support.microsoft.com/default.aspx?scid=kb;EN-US;247297
Thursday, 11 September 2008
Objectdock stack
http://matias.securityconsultant.com.ar/StackDocklet-preview.zip
Wednesday, 10 September 2008
ESXi backup to remote datastore by snapshots
UPDATE:
This idea has been progressed further and looks like a better method is here:
http://communities.vmware.com/docs/DOC-8760
Tuesday, 2 September 2008
Backing up ESXi at image level
esXpress v3.1 The ONLY scalable and completely fault tolerant backup, restoration and disaster recovery solution for Virtual Infrastructure 3.x. Whether you have 1TB of data or 50TB, esXpress makes a 100% complete backup of your entire virtual farm every night.
Wednesday, 20 August 2008
Country blocking lists in various formats
Very useful to block the spammers even includes bogon ranges. Updated every 24 hours.
Country IP Blocks now offers Network Data in 7 Separate Formats: CIDR, Netask, .htaccess deny, .htaccess allow, IP Range, Decimal/CIDR* and Hexadecimal/CIDR. You decide who can access your websites and servers.
Block a country, allow a country. Now you can take complete control of your website and network traffic. IP Blocks are a simple and effective way to improve security by limiting spammers, hackers, bandwidth wasters or malicious traffic.
Handy app for blocking IP address ranges in IIS
Tuesday, 19 August 2008
MS article for registry settings for WSUS 3
Friday, 8 August 2008
How to patch ESX3i using command line
Wednesday, 6 August 2008
How to get XPx64 to change a site's .Net level
Run from the appropriate .Net folder under c:\windows\microsoft .net\framework\....
aspnet_regiis -sn W3SVC/99999/ROOT/
VMWare appliance to run a Cacti station
Need to watch out if an unclean shutdown that /usr/opt/apache/logs/httpd.pid is removed for the apache daemon to run on reboot, can always check to see if httpd process is running and restart if necessary.
Also need to watch disk space, logs etc. can eat them up, check with df -h that capacity isn't all used up.
Easy one to release space is the cacti.log file, just remove from /usr/opt/apache/htdocs/cacti/log
Saturday, 2 August 2008
PRTG monitoring
Found this a bit fiddly and prefer Opmanager, there is an older version that allows you to monitor 20 devices, not available for download anymore but keeping on my FTP server.
ftp://ftp.mechanised.com/software/ManageEngine_OpManager_6_windows2.exe
Friday, 1 August 2008
Handy HP Part numbers for ordering
HP BLc3000 Single-Phase Enclosure w/2 Power Supplies and 4 Fans w/8 Insight Control Environment Trial Licenses - Rack-mountable - power supply £1,902.96
UH311E
Electronic HP Care Pack 4-Hour 24x7 Same Day Hardware Support - Extended service agreement - parts and labour - 3 years - on-site - 24 hours a day / 7 days a week - 4 h £483.84
410917-B21
HP GbE2c Ethernet Blade Switch - Switch - 16 ports - EN, Fast EN, Gigabit EN - 10Base-T, 100Base-TX, 1000Base-T 5x10/100/1000Base-T(uplink) - plug-in module £685.00
406740-B21
HP 1Gb Ethernet Pass-Thru Module - Expansion module - Gigabit EN - 1000Base-TX - 16 ports £399.00
437572-B21
HP - Power supply - redundant - 1.2 kW £128.00
412140-B21
HP Active Cool Fan - Fan unit £69.00
AK502A
HP ProLiant BL460c - Blade - 2-way - 1 x Quad-Core Xeon E5440 / 2.83 GHz - RAM 4 GB - hot-swap 2.5" - no HDD - Gigabit Ethernet - Monitor : none £1,006.49
431958-B21 & 432320-001
HP Single Port - Hard drive - 146 GB - hot-swap - 2.5" - SAS - 10000 rpm £130.00
397413-B21
HP - Memory - 4 GB ( 2 x 2 GB ) - FB-DIMM 240-pin - DDR2 - 667 MHz / PC2-5300 - Fully Buffered - ECC
UK066E
Electronic HP Care Pack 4-Hour 24x7 Same Day Hardware Support - Extended service agreement - parts and labour - 3 years - on-site - 24 hours a day / 7 days a week - 4 h £245.25
445978-B21
HP NC360m Dual Port 1GbE BL-c Adapter - Network adapter - PCI Express x4 - EN, Fast EN, Gigabit EN - 2 ports £165.00
406771-B21
HP NC326m PCI Express Dual Port 1Gb Server Adapter - Network adapter - PCI Express x4 - EN, Fast EN, Gigabit EN - 10Base-T, 100Base-TX, 1000Base-T - 2 ports £105.00
378343-002
HP/Compaq SFF Small Form Factor 2.5inch SATA / SAS drive Tray / Caddy
BL460c
http://h18004.www1.hp.com/products/quickspecs/12518_div/12518_div.html
HP SAS Enterprise and SAS Midline Hard Drives
http://h18004.www1.hp.com/products/quickspecs/12244_div/12244_div.html
Thursday, 31 July 2008
Seagate Cheetah 15K.5 146.8GB 15,000rpm 16MB SAS 3Gb/s Hard Disk Drive
Technical Description: Seagate HD Cheetah 15k.5/147GB SAS 15Krpm 16MB - ST3146855SS (Components Internal Hard Drives)
The fifth-generation Cheetah 15K.5 enterprise hard drive features innovative perpendicular recording technology, setting new standards for 15K-RPM drive capacity, performance and reliability. The Seagate Cheetah 15K.5 hard drive is the first to break the 100-MB/s sustained transfer rate barrier. These drives lead the industry in reliability, performance and value by delivering higher throughput with fewer drives than conventional 10K-RPM solutions . The Cheetah 15K.5 enterprise hard drive sets a new standard for storage cost effectiveness with an unprecedented blend of storage performance, capacity and reliability.
Warranty: 1 Year Warranty
Features
# 16-MB cache
# Perpendicular recording technology for maximum capacity
# Up to 125-MB/s sustained transfer rate
# 30 percent more IOPS than 10K 3.5-inch drives
# Reduced RAID rebuild times
# Highest reliability rating in the industry
# Lower total cost of ownership (TCO)
# 5-year warranty
# Number of pins on the I/O connector - 5
Specification
Disk Size: 3.5 Inches
Disk Capacity: 146.8GB
Disk Speed: 15000RPM
Data Buffer: 16384KB
Interface: SAS 3Gb/s SAS
Data Transfer Rates: 300MB/s
Heads: 4
Performance
Average Latency: 2.0ms
Mean Time Between Failure (MTBF): 1.4 Million Hours
Environmental
Acoustics (Idle Mode): 3.2dB
Operating Temperature: 5 to 55°C
Relative Humidity: 5 to 95%
Vibration (Operating): 0.5 Gs
Shock (Operating): 60Gs for 2ms
Electrical
Power Requirement Idle (Ready): 11.2Watts
Physical
Enclosure type: Internal
Dimensions: 10.185cm (W) x 14.699cm (D) x 2.611cm (H) - Weight 0.839kg