Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support XFS as ebs_raid filesystem. Tweak README. #63

Merged
merged 4 commits into from
Mar 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ Attribute Parameters:

Manage Elastic Block Store (EBS) raid devices with this resource.

Actions:

* `auto_attach` - creates RAID device and attaches.

Attribute Parameters:

* `aws_secret_access_key`, `aws_access_key` - passed to
Expand All @@ -210,7 +214,8 @@ Attribute Parameters:
* `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. 'ext4' or 'xfs'
currently supported (default: 'ext4')
* `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
Expand Down
2 changes: 2 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
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"

depends "xfs"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the xfs cookbook only installs xfsdump we can remove this and leave it up to the user to have a system capable of formatting and XFS volume

5 changes: 4 additions & 1 deletion providers/ebs_raid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,12 @@ def create_raid_disks(mount_point, mount_point_owner, mount_point_group, mount_p
case filesystem
when "ext4"
system("mke2fs -t #{filesystem} -F #{md_device}")
when "xfs"
run_context.include_recipe 'xfs'
system("mkfs -t #{filesystem} #{md_device}")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mkfs.xfs #{md_device} is how I normally setup the FS, so I'll test this with my change and resubmit the PR assuming everything works.

else
#TODO fill in details on how to format other filesystems here
Chef::Log.info("Can't format filesystem #{filesystem}")
Chef::Log.info("Can't format filesystem #{filesystem}. Only ext4 or xfs currently supported.")
end
end
end
Expand Down