Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an AWS Windows box (Windows 2008 R2) with the following disks:

C:\ 60 Gb (EBS)
D:\ 200 Gb (EBS)
Y:\ 40 Gb (Ephemeral SSD) 
Z:\ 40 Gb (Ephemeral SSD)

Every time it boots I change ephemeral drives to D: and E: and EBS drive to Z:. Some times after a reboot ephemeral drives are not mounted. I really need to be this way as I have a program that has its data in D: drive and cannot be changed. I want to benefit of extra speed of Ephemeral SSD.

What is the best way of automating this in AWS?

I thought of making a PowerShell script that uses WMI to change drive letters on boot (following this), but I am not sure if this is the best option. Does AWS has some way to control/configure ephemeral drives?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

This can be configured using the EC2ConfigService Settings application that's included on the standard Windows instance builds (or available separately from the AWS Developer Tools site.)

After launching your instance, select Start -> All Programs -> EC2ConfigService Settings. Access the 'Storage' tab, check the box for 'Map volume names to drive letters.' and then click the 'Mappings' button to set up the drive letters. Use the default volume name assigned to the ephemeral drive. After each reboot, the drive will have the letter that you specified.

EC2ConfigService Drive Letter Mapping screenshot

share|improve this answer
    
Exactly what I was looking for :) –  cad Mar 15 at 10:05

You may find that this: http://www.uwe-sieber.de/usbdlm_e.html does the trick. It was designed to deal with USB drives wandering around the drive letter space. However it can deal with arbitrary storage devices.

Simply copy the contents of the zip to say C:\usbdlm and then run up usbdriveinfo.exe. This will give you device strings that you can use to uniquely identify the SSDs. Be careful though - those strings may change per invocation of the VM.

You then create entries in the .ini file to force those IDs to a particular drive letter.

After a double RDP session - here's an example .ini file from one of my systems. It's for USB but you should get the idea. The first driveletters block makes those deviceids get U:, the second block is how to "remark out" a block safely and the third one makes all other USB disks end up as X or Y as a fallback default.

I would imagine that you wont see USB IDs for your disks (!) but you should find something that you can use in usbdriveinfo. Have a look at the docs, you can use part matches for IDs and also regexs I believe.

[Settings]
CheckLettersOnStartup=1
LoadUsbdlm_Usr=3
VolumeReadyMaxWait=20000
NoMediaNoLetter=0
WriteLogFile=1
LogFile=C:\USBDLM\_USBDLM.LOG
LogLevel=3

[BalloonTips]
Enabled=1
Timeout=6000

; To get the DeviceID, run usbdriveinfo.exe
;    Select the Drives tab
;    Find the Disk (parent device, not the volume) in left hand pane
;    Find  "USB DevID    ="
;    Copy the data after the = sign
;    Paste it into the relavent section here under Driveletters
;    net stop usbdlm  and then net start usbdlm

[DriveLetters1]
Letter=U
DeviceID1=USB\VID_0411&PID_0170\00101007000C8B640
DeviceID2=USB\VID_0411&PID_0170\00101007000A104B0
DeviceID3=USB\VID_0411&PID_0170\00101007000A0C770
DeviceID4=USB\VID_0411&PID_0170\00101007000915F00
DeviceID5=USB\VID_0411&PID_0170\001010070008146D0
DeviceID6=USB\VID_0411&PID_0170\00101007000915F50
DeviceID7=USB\VID_0411&PID_0170\00101007000716A90
DeviceID8=USB\VID_0411&PID_0170\00101007000A0C5F0

[xxxx DriveLetters2]
Letter=V

[DriveLetters]
Letters=X,Y
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.