Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a CentOS 5 production server with multiple OS-managed RAID-1 sets. I'd like to add a new mirrored set and move the /var partition to the new drives. What is the best way to do this?

On a non-RAID system I would boot from the install CD to edit fstab and copy the existing files to the new drive, but I'm pretty sure booting off the install CD does not recognize my RAID setup.

share|improve this question
up vote 1 down vote accepted
  1. Make sure all programs accessing /var are stopped (hint lsof -T -V | grep /var).

  2. Probably should just switch to init 1

  3. Setup /etc/fstab to mount the new partition as /var


mount /var
mkdir /mnt/old-root; mount / /mnt/old-root -obind,ro
mv /mnt/old-root/var/* /var
umount /mnt/old-root

No need to boot a livecd, however having SystemRescueCD handy is always a good thing, and I'm positive it will load your raid just fine.

edit: I misread the question, same rules apply except for the mount part :

mount /dev/new-md /mnt/new-var
mv /var/* /mnt/new-var
umount /mnt/new-var /var
mount /dev/new-md /var
share|improve this answer

You can easily achieve your goal with a rescue CD. For example, sysrescd ( will boot with full RAID/LVM support.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.