I want to improve the performance of a web application running on Apache, so I created a Raid Array on /dev/md0.

Now I need to figure out how to move the application to the array and make sure that Apache will still serve it when someone accesses my domain.

Web application is in the directory: /var/www/html - Raid Array device is: /dev/md0

How do I make the application run on the array?

Cross Posted at: https://unix.stackexchange.com/questions/21713/move-web-directory-to-raid-array

2 Answers 2


Copy all of your files to the new device, stop apache, then mount the new device on top of your existing /var/www/html and restart apache.

mount /dev/md0 /mnt
cp -r /var/www/html/* /mnt 
umount /mnt
service httpd stop
mount /dev/md0 /var/www/html
service httpd start

You would then need to ensure it's mounted at boot by editing the /etc/fstab

/dev/md0    /var/www/html ....
  • 1
    Also, make a filesystem on md0 if there isn't already. Sep 29, 2011 at 16:31

You can copy the contents of /var/www/html (or /var/www or all of /var if you want) to /dev/md0 and just mount /dev/md0 as /var/www/html (or whatever). Shouldn't be too complicated.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .