Skip to content

Commit

Permalink
Merge pull request #14 from rightscale-cookbooks/ST-244_xfs_updates
Browse files Browse the repository at this point in the history
St 244 xfs updates
  • Loading branch information
douglaswth committed Apr 20, 2015
2 parents 7714af2 + 6287587 commit 56078eb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ rs-storage Cookbook CHANGELOG

This file is used to list changes made in each version of the rs-storage cookbook.

v1.0.5
------

- Handle use of XFS when using rs-storage::volume.

v1.0.4
------

Expand Down
7 changes: 4 additions & 3 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@
# Whether to destroy volume(s) on decommission
default['rs-storage']['device']['destroy_on_decommission'] = false

# The additional options/flags to use for the `mkfs` command. If the whole device is formatted, the force (-F) flag
# can be used (on ext4 filesystem) to force the operation. This flag may vary based on the filesystem type.
default['rs-storage']['device']['mkfs_options'] = '-F'
# The additional options/flags to use for the `mkfs` command. If the whole device is formatted, the force flag
# can be used to force the operation. This flag varies based on the filesystem type.
default['rs-storage']['device']['mkfs_options'] =
node['rs-storage']['device']['filesystem'] == 'xfs' ? '-f' : '-F'

# The stripe size to use while creating LVM
default['rs-storage']['device']['stripe_size'] = 512
Expand Down
6 changes: 4 additions & 2 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Provides recipes for managing volumes on a Server in a RightScale supported cloud'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.0.4'
version '1.0.5'

depends 'chef_handler', '~> 1.1.6'
depends 'filesystem', '~> 0.10.0'
Expand Down Expand Up @@ -38,7 +38,9 @@

attribute 'rs-storage/device/nickname',
:display_name => 'Device Nickname',
:description => 'Nickname for the device. Example: data_storage',
:description => 'Nickname for the device. rs-storage::volume uses this for the filesystem label, which is' +
' restricted to 12 characters. If longer than 12 characters, the filesystem label will be set to the' +
' first 12 characters. Example: data_storage',
:default => 'data_storage',
:recipes => ['rs-storage::volume', 'rs-storage::stripe', 'rs-storage::decommission'],
:required => 'recommended'
Expand Down
2 changes: 2 additions & 0 deletions recipes/volume.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
action [:create, :attach]
end

# Filesystem label must be <= 12 chars
filesystem device_nickname do
label device_nickname[0, 12]
fstype node['rs-storage']['device']['filesystem']
device lazy { node['rightscale_volume'][device_nickname]['device'] }
mkfs_options node['rs-storage']['device']['mkfs_options']
Expand Down

0 comments on commit 56078eb

Please sign in to comment.