I manage a web server that's running on Windows Server 2008 as a 64bit virtual host. All service software is running independently, and not as part of an AMP stack. The data drive has nearly filled up and my systems admin has provisioned a new virtual drive with more space. My task is to copy everything over from the old volume to the new volume.
When creating the volume, I ensured that it was created with the same volume type, file system, block size, etc. I stopped all the relevant services (Apache, MySQL, both of which run from C: but whose data is all located on D:, including logs), and copied all the files over.
From here, I've tried two different approaches to getting the services to depend on the new volume, and forget about the old. MySQL has no problems either way, but Apache can't start as a service using either method. Here's what shows up in the System event log:
The Apache2.2 service terminated with service-specific error Incorrect function
Nothing appears in
First, I tried simply changing the drive letters. I took the old D: and changed it to something arbitrary, and assigned D: to the new volume. This yielded the error above. I tried rebooting the server with the new drive designations, "just in case", but the same error occurred. Because I don't fully understand Windows mount points, I changed the drive letters back to what they were originally, and confirmed that the Apache service starts just fine.
Second, I tried simply updating all the Apache and MySQL configuration files. Every occurrence of "D:" (case-insensitive) was changed to F: (the new drive letter). I know the configuration files well, so I know I found every occurrence. The error above occurred again, exactly the same way. In order to get the web server back up and running, I reverted all the changes, and the services successfully started.
Some more information I gathered:
- httpd.exe runs successfully when started not as a service, from the command line. There are no syntax errors.
- Even if run from the command line, Apache will not start as a service (
httpd.exe -k runservice).
- The issue is probably not one of file access permissions. I spot-checked key locations (a couple of directories, log files), and the permissions were identical. However, I did not test this exhaustively.
One thing I have not tested is to try moving only one of the data and log locations to the new drive, while leaving the other as is. I didn't think that was likely to make a difference.
... That said, I don't actually know what's going on here. I can't think of any reason why Apache would be failing to run as a service just by changing the location of the log files and data.
I would very much appreciate any suggestions or advice on this matter. I'm happy to investigate further in response to suggestions. If any of you think it's worthwhile to try moving only one of the items (logs or data) as mentioned, I will try that. Likewise, if any of you think I've been too hasty discounting permissions, I will do a more thorough examination.
Any and all input is welcome! I've exhausted all my ideas.