Windows 2008 additional disk going offline with reboots on Amazon EC2

amazon ec2diskmanagementwindows-server-2008

OK, so I took the stock Windows 2008 64-bit Amazon AMI and wanted to add a D: drive for page file space and crash dumps. I launched the instance with a second EBS volume attached as xvdf and went into Disk Management set it online, and added the page file and crash dump settings and all that works.

But when I reboot, the box comes back up with that second drive as "Offline." How do I get that disk to automatically come online on reboot (or most notably, when I turn this into an AMI and launch more instances off it – I've tried that too and same deal with the D:).

Best Answer

For future reference, it turns out that if you launch the instance and attach a volume to it as part of the launching thus:

ec2-run-instances -k services-dev -g build -z us-east-1d -t m1.large -b "/dev/sda1=:50" -b "xvdf=:20:true" ami-d9e40db0

The additional drive (xvdf in this case) will NOT stay online across reboots as it should.

What you have to do instead is create the instance, then separately create an EBS, attach the volume to your instance, in Disk Management bring the disk online and initialize it, then format the partition on it - then it'll "stick" across reboots and you can create an AMI that will have both disks working correctly.