Crucial Paradigm Australia Official Blog
server administration
If you are receiving the following error in XenServer/XenCenter, there is a quick fix!
4/05/2011 4:05:40 PM Error: Migrating VM ’36′ from ‘blXXX’ to ‘blXXX’ – Internal error: INTERNAL_ERROR: [ Failure("The VDI 996b046b-1960-4315-bad7-48830254d4c3 is already attached in RO mode; it can't be attached in RW mode!") ]
Or
5/05/2011 7:09:08 AM Error: Migrating VM ‘n3 – NTP’ from ‘blXXX’ to ‘blXXX’ – Internal error: INTERNAL_ERROR: [ Xb.Invalid ]
This can be fixed by running:
xe-toolstart-restart
So today I was tasked with creating an entire system that does ubuntu automated installations, the first hurdle was actually getting ubuntu automated deployment, unfortunately there was a lot of misguidance laying around the net on the best way to approach this, so this is my attempt… it worked and I think it does the job…
If you have noticed your Citrix XenServer machine grind to a halt due a process “cdrommon” this is a known bug with a particular CD-ROM drive in XenServer. A fix for the bug can be found here:
http://support.citrix.com/article/CTX126919
In short to check if you are effected by the bug, run the following:
dmesg | grep DV-28
This bug applies to “TEAC DV-28E-V” CD-ROm drives.
If you have tried to empty any large folders, such as mailbox directories or temporary folders on a linux server you will probably encountered the following error:
-bash: /bin/rm: Argument list too long
An easy way around this is to use the following command (this will remove all files in the folder you run this command):
find . | xargs rm
If you want to delete files with a specific string in them, you can do with the following:
find . -name ‘*string*’ | xargs rm
The quick easy way to install dig on CentOS is:
yum install bind-utils -y
Deleting mail from an entire inbox (purging) can be done in a few ways on Zimbra:
zmmailbox -z -m user@domain.com emptyFolder /Inbox
or
zmmailbox -a admin -p password -m user@domain.com emptyFolder /Inbox
or
zmmailbox
mbox> adminAuthenticate -u https://server.domain.com:7071 admin@domain.com password
mbox> selectMailbox user@domain.com
mbox user@domain.com> emptyFolder /Inbox
If you are getting an error something along this lines of the following:
-bash-3.2# sh ./latest
Creating directory installd
Verifying archive integrity… All good.
Uncompressing cplyr1-cPanel………………………………………………………………………………………………..
____ _
___| _ \ __ _ _ __ ___| |
/ __| |_) / _` | ‘_ \ / _ \ |
| (__| __/ (_| | | | | __/ |
\___|_| \__,_|_| |_|\___|_|Installer Version 11.25.0 r176
Ensuring system time is set
Updated system time from rdate.cpanel.net: Fri Mar 12 04:54:26 UTC 2010
Verified directory /scripts exists.
Verified directory /scripts/cPScript exists.
Verified directory /usr/local/cpanel exists.
Verified directory /usr/local/cpanel/logs exists.
Verified directory /usr/local/cpanel/Cpanel exists.
Verified directory /var/cpanel exists.
cPanel configuration /var/cpanel/cpanel.config already exists.
Syncing /scripts
Unable to sync: $! at ./updatenow line 38.
Done syncing /scripts
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FATAL! Failed to properly update /scripts
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-bash-3.2#
Make sure you have install rsync, and perl. You can do this by doing:
yum install rsync perl -y
On some of our older servers we have an issue where the official memtest CD does not boot while using IPMI (virtual CD drive). Upon looking for a work around we found 2 options to allow memtest to run even if it did not boot from the official ISO. The first option is RIPLinux 9.3 (we prefer the non-X version), just boot the CD and select the Memory Test option.
The second option is UBCD5 (in beta currently, v4 did not work over IPMI), just start the CD, select the Memory menu and select which version of Memtest you wish to use.
UBCD5 comes with the latest version (4) of memtest, while RIPLinux comes with v2.
In an effort to try and cut down the manual labour in burning in new hardware, we have been working with RIP linux on a USB key. The idea is to fully automate a read and write to all drives in the system, and then automatically run memtest. This way we can just plug the USB key into the system, start the script and it will perform and record the burn in tests to the USB key which we can review after a few days (burn in tests can take up to a few days depending on the hardware!).
To do this we needed to modify the boot menu on the RIPLinux USB key, and set memtest to start automatically after 10 seconds of no input. This can be done by doing the following:
Under:
LABEL Boot Memory Tester!
Enter:
MENU DEFAULT
Under:
DEFAULT menu.c32
Enter:
TIMEOUT 100
A script can then placed to run automatically run when RIPLinux boots into the standard kernel. The script will complete the hard drive tests, then it will reboot the server automatically and the memtest will run.
Gzip can reduce page size by an impressive amount, especially for high traffic sites. We have optimised some of customers sites receiving high traffic and have easily been able to reduce bandwidth usage by 60-80%.
If you have zlib compiled into PHP and you are running PHP then the easy way to enable gzip compression is to add the following line to your .htaccess file:
php_value output_handler ob_gzhandler
This will only enable gzip compression on PHP, and not on css, javascript, html, etc files – this needs to be done in the apache config file.



