Author Archives: Randy

XenServer 6.2 with Software RAID

Historically XenServer does not support software RAID out-the-box, and this is unchanged in the latest 6.2 release. We can convert it to RAID after installation. First we set up the 2nd disk by copying the partition tables whilst enabling a degraded RAID on it, then copy data over with custom initrd. sgdisk -R/dev/sdb /dev/sda # […]

EXT and LVM Local Storage in XenServer

On a new XenServer deployment EXT storage is default. Although EXT is nice (ability to manipulate raw VHD files and use sparse storage), LVM is faster and more stable. Here is how to switch between storage modes (be sure to back up all data first, as this will wipe everything in the repo): Use ‘xe […]

Track deleted (but open) file usage

From time to time the du command doesn’t match up with df. This is due to deleted files that are still held open by a process. You can total the deleted but ‘still open’ file usage: lsof | awk ‘/deleted/ {sum+=$7} END {print sum}’ Or, to simply list all the files and their processes: lsof […]

JWplayer iframe codes for Wowza

Allows easy embedding of on-demand and live media from a Wowza server using Iframes and a PHP server capable of .htaccess rewrite rules. http://djlab.com/stuff/jwplayer.zip Example of embed code: <iframe src=”http://mysite.com/jwplayer/Sportswire/sw-584-1.mp4?autoPlay=0&poster=http://mysite.com/images/poster.jpg” frameborder=”0″ scrolling=”no” width=”432px” height=”320px”></iframe>

Removing RAID metadata

Sometimes a hardware RAID controller or fakeraid (BIOS) can leave metadata that makes it impossible to install Windows or Linux, or it installs correctly, but causes a kernel panic or a 0xb7 blue screen error on the first boot. The only method I could find to delete the metadata *quickly* is to zero out the […]

Now Playing code example

Now Playing Live Example Now Playing HTML Code <iframe src=”http://http://199.58.163.11/rr/now_playing.php” width=”325″></iframe> Requests Popup HTML Code

Categories: Uncategorized. Comments Off on Now Playing code example

Syncing User Filesystems Between Two Cpanel Servers

After doing a WHM multi-account copy, you may want to refresh the users home directories (including email and web files). This one liner uses rsync over SSH to do a quick sync of only changed files, emails, and website files. Run these commands on the NEW server. First you need to create a list of […]

Categories: Uncategorized. Comments Off on Syncing User Filesystems Between Two Cpanel Servers

Syncing All MySQL Databases Between two Cpanel Servers

After you do a WHM multi-site transfer, you may want to resync all the MySQL databases before doing a DNS change. Here’s a quick and easy way to sync each Cpanel user’s databases on the new Cpanel server. After manually setting up a remote mysql root user on the original server (and opening a firewall […]

Categories: Uncategorized. Comments Off on Syncing All MySQL Databases Between two Cpanel Servers

MySQL Relationships (JOIN explained)

The visual diagrams still confuse me after so many years and I always forget…so here it is: INNER JOIN gets all records from one table that have some related entry in a second table LEFT JOIN gets all records from the LEFT linked table but if you have selected some columns from the RIGHT table, […]

Categories: Uncategorized. Comments Off on MySQL Relationships (JOIN explained)

Remount read/write in single user mode

If /etc/fstab is correct, you can simply type: # mount -n -o remount / If /etc/fstab is wrong, you must give the device name and possibly the type, too: e.g. # mount -n -o remount -t ext4 /dev/sda3 /

Categories: Uncategorized. Comments Off on Remount read/write in single user mode