I Love Virtualization

Posted on March 2, 2008 by nseidm1.
Categories: Nagios, RAID, Server, Windows, esata, file, linux, mail, rsync, sata, virtualization, vpn, xp.

Virtualization is simply the coolest. I currently have 4 linux servers running. I consolidate my mail server in my web server, which takes one virtual machine. Another virtual machine is running a file server. The third is running a VPN for my iPhone. And the last server is running Nagios to monitor the uptime of all my servers. In addition I am concurrently running Windows XP for a program that graphically monitors the visitors to my websites. In the end I am only consuming about 1.5 Gigabytes of ram after all the virtual machines have fully loaded. I can have many many many more virtual machines, given that I have 5 Gigabytes of ram on my PC.

This is power. Virtualization is power. The potential is incredible. Not to mention I have 3 hard drives in raid1 to ensure system stability in the case of hardware failure. I am going to set up the following:

I want a 4′th hard drive, which I am going to connect via an external SATA port. They call these ports ESATA, which could have been seen a mile away. I am still debating weather to sync the drive via raid, or via rsync. A raid sync will be seamless, whereas rsync will probably consume some computing power. Also if something happens to the software on my PC the raid will copy the corruptions to the backup drive. Using rsync manually would most likely avoid copying corrupted data.

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

USB Hard Drive in RAID1

Posted on January 31, 2008 by nseidm1.
Categories: RAID, hard drive, mdadm, usb.

This concept works just as for an internal hard drive. Although, USB drives seem to not remain part of the array after a reboot, therefore to use a USB device in a RAID1 setup, you will have to leave the drive connected, and the computer running. Another tactic is to occasionally sync your USB drive to the array, and shut down the USB drive after synchronization. Either tactic is effective.

You can create a quick script to add the USB partitions to the RAID1.

The first thing to do when synchronizing is to add the partition:

sudo mdadm --add /dev/md0 /dev/sdb1

I have 4 partitions therefore my script contains 4 add commands.

Then grow the arrays to fit the number of devices:

sudo mdadm --grow /dev/md0 --raid-devices=3

After growing the array your USB drive will magically sync :) USB is substantially slower than SATA or PATA. Anything over 100 Gigabytes will take some time. My 149 Gigabyte /home partition takes about an hour and a half to synchronize. Once its synced I do not experience any apparent difference in system performance.

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

SATA Integared RAID - Motherboards

Posted on December 5, 2007 by nseidm1.
Categories: RAID, debian, motherboard, pata, sata.

Some motherboards come with an integrated RAID controller. I currently use software RAID between two PATA and one SATA drive. I would like to add more SATA drives, configure them via hardware RAID, then link the RAID partitions via software to the PATA drives. The motherboard BIOS takes care of all the RAID configuration therefore during Debian (or your favorite distro) installation only one SATA drive will be detected by the software representing the mirrored drives. The drive will most likely be labeled SDA.

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

RAID1 New Drive After Drive Failure

Posted on December 2, 2007 by nseidm1.
Categories: RAID, hard drive, mdadm.

As requested in a comment, this is how you re-add a new internal hard drive after one has failed. The failed drive is usually removed from the MD devices automatically. To add the new drive start your favorite Linux installation, and during partitioning make the layout of the new drive match your remaining RAID drives. Re-configure the RAID, then re-configure your MD partitions to be the proper file system format and mount points. Mark each MD device not to be formatted!!!!. Your base OS will be re-installed and the installation will crash when trying to install the kernel. This is expected, and simply reboot your machine to boot your system; the main reason of the Linux installation was the hard drive partitioning. When your system boots use the mdadm program to re-add your new hard drive to RAID.

mdadm --add /dev/md* /dev/sda*

You can check your MD devices with:

cat /proc/mdstat

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

USB RAID Difficulties

Posted on by nseidm1.
Categories: RAID, usb.

I was trying to add a USB hard drive to my RAID system for backup purposes. I have not been successful. It seems that when the USB hard drive is removed the disk is marked “failed”; this is normal. But when the drive is re-inserted it is labeled differently causing a RAID conflict not removing the original drive label from the MD device. I am not quite sure of the resolution to this; but obviously USB RAID devices have a couple of hurdles to achieve proper system configuration. Also the partitions were not synchronizing properly; the drive was failing during the recovery.

In the end I am just going to use the USB hard drive as a standard backup medium. I will continue to research mounting a USB hard drive as a typical internal IDE or SATA. If the USB drive can be mounted as a typical drive there should be no reason for a RAID malfunction; it should operate as a normal hard drive.

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

RAID1 - Format Using Linux Installer Rather than FDisk

Posted on by nseidm1.
Categories: RAID, fdisk, linux.

The most important thing about your had drive partitions is that they are all the same size. Problems arise if they are not the same size, most notably data loss. I was playing around with fdisk for a while, and was unable to get a new hard drive to have the same partition sizes as the drives formatted during Linux installation.

To proceed I used the Debian installer to format the new drive with the appropriately sized raid partitions. When adding a new drive you do not need to add the raid partitions to the MD devices during Linux installation. You can add the new partitions to the respective MD device during normal system operation. Use the mdadm command as follows:

mdadm --add /dev/md0 /dev/sdb1

You will have to grow your RAID to accomodate the new drive:

mdadm --grow /dev/md0 --raid-devices=3

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

RAID1 - Ultimate USB Backup Solution

Posted on by nseidm1.
Categories: RAID, backup, usb.

Your here because you want a killer backup solution. RAID1 is the ticket. Once you have RAID setup you can add additional drives in a matter of several commands. USB is quick and simple, so start by pluggin in your USB hard drive. Open your gparted, disk configuration, or otherwise determine the label of your drive. For instance my USB hard drive is /dev/sdb1. Format the drive with Linux RAID autodetect:

fdisk /dev/sdb1

Use the “n” option to format the partitions. Select primary partitions and configure the size according to your needs. Then use the “t” option. T refers to type; select RAID Linux Autodetect with “fd”.

Write the changes to the disk with the “w” option.

Now your disk will work with an active RAID system. Add the new drive to a RAID MD partition:

mdadm --add /dev/md0 /dev/sdb1

Then grow the array to autosync the drive:

mdadm --grow /dev/md0 --raid-devices=3

Your USB drive will now be synchronized with the MD0 RAID partition. If the MD0 partition contains the boot and root directory you can install GRUB to make the USB hard drive completely bootable. As posted previously I recommend the Super Grub Disk to install GRUB on your RAID disks. Give a quick google search for Super GRUB disk, or you can search this blog. :)

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati