Skip to content

Commit

Permalink
Merge pull request #25 from orgsync-cookbooks/fix-mount-point
Browse files Browse the repository at this point in the history
Removes static options from LVM mounting
  • Loading branch information
rshade committed Mar 15, 2016
2 parents 8786c8f + 974dfcd commit 8735fb0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Place the `ephemeral_lvm::default` in the runlist and the ephemeral devices will

* `node['ephemeral_lvm']['filesystem']` - the filesystem to be used on the ephemeral volume. Default: `'ext4'`
* `node['ephemeral_lvm']['mount_point']` - the mount point for the ephemeral volume. Default: `'/mnt/ephemeral'`
* `node['ephemeral_lvm']['mount_point_properties']` - the options used when mounting the ephemeral volume. Default: `{options: ['defaults', 'noauto'], pass: 0}`
* `node['ephemeral_lvm']['volume_group_name']` - the volume group name for the ephemeral LVM. Default: `'vg-data'`
* `node['ephemeral_lvm']['logical_volume_size']` - the size to be used for the ephemeral LVM. Default: `'100%VG'` - This will use all available space in the volume group.
* `node['ephemeral_lvm']['logical_volume_name']` - the name of the logical volume for ephemeral LVM. Default: `'ephemeral0'`
Expand Down
6 changes: 6 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
# The ephemeral mount point
default['ephemeral_lvm']['mount_point'] = "/mnt/ephemeral"

# The ephemeral mount point options
default['ephemeral_lvm']['mount_point_properties'] = {
options: ["defaults", "noauto"],
pass: 0
}

# The ephemeral volume group name
default['ephemeral_lvm']['volume_group_name'] = "vg-data"

Expand Down
7 changes: 7 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
:recipes => ["ephemeral_lvm::default"],
:required => "recommended"

attribute "ephemeral_lvm/mount_point_properties",
:display_name => "Ephemeral LVM Mount Properties",
:description => "The options used when mounting the ephemeral volume",
:default => {:options => ["defaults", "noauto"], :pass => 0},
:recipes => ["ephemeral_lvm::default"],
:required => "optional"

attribute "ephemeral_lvm/volume_group_name",
:display_name => "Ephemeral LVM Volume Group Name",
:description => "The volume group name for the ephemeral LVM",
Expand Down
4 changes: 3 additions & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
logical_volume node['ephemeral_lvm']['logical_volume_name'] do
size node['ephemeral_lvm']['logical_volume_size']
filesystem node['ephemeral_lvm']['filesystem']
mount_point location: node['ephemeral_lvm']['mount_point'], options: ['defaults', 'noauto'], pass: 0
mount_point node['ephemeral_lvm']['mount_point_properties'].merge(
location: node['ephemeral_lvm']['mount_point']
)
if ephemeral_devices.size > 1
stripes ephemeral_devices.size
stripe_size node['ephemeral_lvm']['stripe_size'].to_i
Expand Down

0 comments on commit 8735fb0

Please sign in to comment.