Skip to content

Commit

Permalink
rebasing and adding @bazbremner contributions. Replaces #63
Browse files Browse the repository at this point in the history
  • Loading branch information
iennae committed Mar 11, 2016
1 parent cf6aa41 commit 0854708
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This file is used to list changes made in each version of the aws cookbook.

## UNRELEASED

- [#63][] Add xfs support for ebs_raid filesystem [@bazbremner][]

## v2.9.3 (2016-03-07)

- Resolved a default value warning in ebs_raid when running Chef 12.7.2+
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ Manage Elastic Block Store (EBS) raid devices with this resource.
- `disk_count` - number of EBS volumes to raid
- `disk_size` - size of EBS volumes to raid
- `level` - RAID level (default 10)
- `filesystem` - filesystem to format raid array (default ext4)
- `filesystem` - filesystem to format raid array (default ext4 supported ext4 or xfs) *NOTE* Using xfs assumes that you provide the underlying packages required for xfs to work.
- `filesystem_options` - String of options to mount the filesystem with (default rw,noatime,nobootwait)
- `snapshots` - array of EBS snapshots to restore. Snapshots must be taken using an ec2 consistent snapshot tool, and tagged with a number that indicates how many devices are in the array being backed up (e.g. "Logs Backup [0-4]" for a four-volume raid array snapshot)
- `disk_type` - "standard", "io1", or "gp2" ("standard" is magnetic, "io1" is provisioned iops SSD, "gp2" is general purpose SSD)
Expand Down
10 changes: 10 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@
%w(ubuntu debian centos redhat amazon scientific fedora oracle freebsd windows).each do |os|
supports os
end

name "aws"
maintainer "Opscode, Inc."
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "LWRPs for managing AWS resources"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "2.1.2"
recipe "aws", "Installs the right_aws gem during compile time"

8 changes: 5 additions & 3 deletions providers/ebs_raid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,13 @@ def create_raid_disks(mount_point, mount_point_owner, mount_point_group, mount_p

Chef::Log.info("Format device found: #{md_device}")
case filesystem
when 'ext4'
when "ext4"
system("mke2fs -t #{filesystem} -F #{md_device}")
when "xfs"
system("mkfs -t #{filesystem} -F #{md_device}")
else
# TODO: fill in details on how to format other filesystems here
Chef::Log.info("Can't format filesystem #{filesystem}")
#TODO fill in details on how to format other filesystems here
Chef::Log.info("Can't format filesystem #{filesystem}. Only ext4 or xfs currently supported.")
end
end
end
Expand Down

0 comments on commit 0854708

Please sign in to comment.