I have a server hosting some 80 small rails applications. We have recently upgraded the disk space, so now we have to move all sites to this new disk. The host is a VMware ESX server, so all disks are virtual.
We have an virtual host and apache config file for each file. In this file we define a development, testing, acceptance and production environment, each on its own domain. The production environment can have multiple domains. The websites are currently in a directory on the '/' partition (bad idea, I know), and need to be moved to a fresh partition. The websites run a Sqlite database, so that has to be copied as well.
We want to move these websites to a different disk. Easiest thing to do is shut down apache, copy the files, and remount the disk at the old location. This would cause significant downtime, since its around 100GB of data that needs to be copied.
Is there a way to synchronize the new disk with the old files, and then swapping them 'instantly'? Or maybe automatically moving the websites one by one, to minimize downtime for each? My greatest fear is corrupting the Sqlite databases if they are written to while the operation is in progress.