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

Add lvm mount option and xfs tuning option #106

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Other attributes include:
- `node['gluster']['server']['volumes'][VOLUME_NAME]['volume_type']` - the volume type to use; this value can be 'replicated', 'distributed-replicated', 'distributed', 'striped' or 'distributed-striped'
- `node['gluster']['server']['volumes'][VOLUME_NAME]['size']` - The size of the gluster volume you would like to create, for example, 100M or 5G. This is passed through to the lvm cookbook.
- `node['gluster']['server']['volumes'][VOLUME_NAME]['filesystem']` - The filesystem to use. This defaults to xfs.
`node['gluster']['server']['volumes'][VOLUME_NAME]['filesystem_params']` - The filesystem parameters to use. Not define by default.
Copy link
Owner

Choose a reason for hiding this comment

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

Please add the missing leading hyphen similar to the above and below line

- `node['gluster']['server']['volumes'][VOLUME_NAME]['options']` - Optional options to configure on volume

## Custom Resources
Expand Down
3 changes: 3 additions & 0 deletions attributes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@

# Default path to use for mounting bricks
default['gluster']['server']['brick_mount_path'] = '/gluster'
default['gluster']['server']['brick_mount_path_option'] = 'default'
default['gluster']['server']['brick_mount_path_dump'] = 0
default['gluster']['server']['brick_mount_path_pass'] = 2
# Gluster volumes to create
default['gluster']['server']['volumes'] = {}
# Set by the cookbook once bricks are configured and ready to use
Expand Down
6 changes: 5 additions & 1 deletion recipes/server_setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@
logical_volume volume_name do
size volume_values['size']
filesystem filesystem
mount_point "#{node['gluster']['server']['brick_mount_path']}/#{volume_name}"
filesystem_params volume_values['filesystem_params'] if volume_values.attribute?('filesystem_params')
mount_point "#{node['gluster']['server']['brick_mount_path']}/#{volume_name}",
options: node['gluster']['server']['brick_mount_path_option'],
dump: node['gluster']['server']['brick_mount_path_dump'],
pass: node['gluster']['server']['brick_mount_path_pass']
end
end
else
Expand Down