Skip to content

Instantly share code, notes, and snippets.

@kgilpin
Created October 11, 2012 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kgilpin/3873480 to your computer and use it in GitHub Desktop.
Save kgilpin/3873480 to your computer and use it in GitHub Desktop.
Find a free drive letter
# Need to find the next available device to let AWS know where to attach
# the volume
drive = (Array('c'..'z').map{|c| "/dev/xvd#{c}"} - Dir.glob("/dev/xvd*"))[0]
device_id = drive[-1..-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment