Your Linux Data Center Experts

A few weeks ago I had a 1U system that had a RAID card, but we needed to add more network interfaces to. I had the idea of switching it to software RAID, freeing up the only slot for the network card, and it went amazingly smoothly.

The bulk of the system was installed on an LVM, with just a small /boot partition. So what I did was add two drives to the system, and partition them with a small partition for /boot, and the remainder for LVM. These partitions were set up with software RAID-1.

I then added the LVM partition to the existing LVM, and did a “pvmove”.

“pvmove” is a great tool that tells LVM to move the blocks from one device to another. It achieves this by first creating a mirror of a block from the source device on the destination, waiting for that mirror to sync up, and then breaking the mirror by removing the source block. After an hour or two, with the system still operating normally, the source RAID array just contained /boot.

Finally, I copied the /boot partition over to the software RAID, rebuilt the initrd to include the software RAID tools, re-ran grub-install on the two new drives.

So with fairly little muss and fuss, and little down-time, I had migrated from a hardware RAID array to software, on 2 new drivers. LVM is a very wonderful thing!

comments powered by Disqus

Join our other satisfied clients. Contact us today.