Author Archives: Randy

Kickstart 4-disk RAID10 Recipe

Here’s a nice recipe for a RAID10 array comprised of 4x SSD disks. Tested to work on CentOS 6 (RHEL 6). Be sure to add the discard option in fstab for Trim support. zerombr yes bootloader –location=partition –driveorder=sda,sdb,sdc,sdd clearpart –all –initlabel –drives=sda,sdb,sdc,sdd part raid.100000 –size=250 –ondisk=sda part raid.100001 –size=250 –ondisk=sdb part raid.100002 –size=250 –ondisk=sdc part […]

Orphaned databases in Cpanel

If for some reason Cpanel’s database cache is out of sync and you can’t remove or delete non-existant databases, you can do so manually: Remove orphaned DB entries from: /var/cpanel/databases/dbindex.db Same here: /var/cpanel/databases/<username>.yaml Then execute the following: /usr/local/cpanel/bin/setupdbmap /scripts/update_db_cache

Xen 4 and Libvirt From Source on CentOS 6

Install some prerequisites: yum groupinstall “Development Libraries” “Development Tools” yum install mercurial python-devel dev86 iasl ncurses-devel ncurses \ glib2-devel glib2 openssl-devel yajl-devel libuuid-devel libuuid \ pciutils-devel pciutils texinfo kernel-xen bridge-utils gnutls gnutls-devel \ libxml2 libxml2-devel libnl libnl-devel libxslt libxslt-devel pygtk2 xorg-x11-xauth \ xorg-x11-fonts* device-mapper* gnome-python2-gconf pygtk2-libglade dbus-x11 \ gtk-vnc-python netcf netcf-devel netcf-libs vte vte-devel Pull […]

Fixing default console resolution in Ubuntu

In recent releases of Ubuntu (at least 10.x) by default the non-graphical console attempts to use the max possible resolution supported by the connected monitor. Other than being hard on the eyes, this can cause issues with some KVM units and even more issues for headless machines that need to be troubleshooted with a crash […]

The mysterious /tmp/.tmp folder

If LFD reports a /tmp/.tmp folder on your server you have been hit with the latest timthumb.php hack, which is circulating among wordpress sites which dodged the first mass infection last August for unknown reasons. The /tmp/.tmp folder contains a list of firefox visitor IP’s who have visited your site and were exposed to malicious […]

MDADM Cheat Sheet

This info is taken from here. 1. Create a new RAID array Create (mdadm –create) is used to create a new array: mdadm –create –verbose /dev/md0 –level=1 /dev/sda1 /dev/sdb2 or using the compact notation: mdadm -Cv /dev/md0 -l1 -n2 /dev/sd[ab]1 2. /etc/mdadm.conf /etc/mdadm.conf or /etc/mdadm/mdadm.conf (on debian) is the main configuration file for mdadm. After […]