Question:
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
Answer:
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 ....
REFERENCES
http://serverfault.com/questions/316891/move-web-directory-to-raid-array