On Sat, Jun 22, 2013 at 12:24 AM, David Montgomery < " target="_blank"> > wrote:--What is the best chefonic method to achive this is a recipe?then mount the the volume with the /data directory.create a directory called /dataI need to now format the volumeHi,I used the below to attach a volume to an ec2 isntances.
aws_ebs_volume "db_ebs_volume" do
aws_access_key aws['aws_access_key_id']
aws_secret_access_key aws['aws_secret_access_key']
size 50
device "/dev/sdi"
action [ :create, :attach ]
end
I have tried this before, and I called out to shell to do invoke mkfs. Problem arises when you want ext3/ext4 -- the ext3utils don't give you a way to test whether a volume is formatted before you reformat it :-/ mkfs.xfs will, however, return a non-zero exit code that you can use.
For mounting, you can use the built-in mount resource.
http://docs.opscode.com/resource_mount.html
- Julian
[ Julian C. Dunn < " target="_blank"> > * Sorry, I'm ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]
Archive powered by MHonArc 2.6.16.