opscode-cookbooks/aws — pull request #27 by yossigo (2013-06-23 08:41:22+00:00)
Title: Add support for mounting existing raids and reusing volumes.

I came across two unsupported scenarios that involve re-using existing EBS volumes:
* Attach and mount a previously created RAID to a new node.
* Reuse existing volumes but create a new RAID.

My quick solution was to pre-populate node[:aws][:ebs_volume] with the correct mapping before proceeding to create the raid, and add the following changes:
* Provide an 'existing_raid' option that will re-configure the existing raid without re-creating it.
* Handle cases where the raid was auto-created when attached by deleting it before trying to re-create it.