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

Create lvm exclude filter #107

Merged
merged 8 commits into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions roles/backend_setup/tasks/lvm_exclude_filter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Backup lvm.conf file
copy:
src: /etc/lvm/lvm.conf
dest: /backup
Copy link
Member

Choose a reason for hiding this comment

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

Will this directory be available? isn't it better to backup to same location with different name?

Copy link
Member Author

Choose a reason for hiding this comment

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

okay,

Choose a reason for hiding this comment

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

This part of the code is not required. This information is added in the doc, as the user is prone to make such mistakes while editing manually, as this is covered in ansible, this code block is safe to be ignored

Copy link
Member Author

Choose a reason for hiding this comment

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

@satheesaran , meaning backup is not necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

done


- name: Remove the existing LVM filter
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this fail if the pattern is not exist incase of deployment failure in middle before restore?
Should we need to add ignore_error=true ?

shell: >
sed -i /^filter/d /etc/lvm/lvm.conf

11 changes: 8 additions & 3 deletions roles/backend_setup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@
when: gluster_infra_lvm is defined
tags:
- lvmconfig



- name: Exclue LVM Filter rules
import_tasks: lvm_exclude_filter.yml
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to be move to very first, otherwise blacklist mpath also will fail.


#phase #1
- name: Create a vdo disk
import_tasks: vdo_create.yml
Expand Down Expand Up @@ -101,7 +103,10 @@
when: gluster_infra_mount_devices is defined and gluster_infra_mount_devices is not none
tags:
- mount


- name: Re-generate new LVM Filrer rules
import_tasks: regenerate_new_lvm_filter_rules.yml

# set kernel boot params for lvm volumes
- name: Configure lvm kernel parameters
import_tasks: lvm_kernelparams.yml
Expand Down
4 changes: 4 additions & 0 deletions roles/backend_setup/tasks/regenerate_new_lvm_filter_rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- name: Regenerate new LVM filter rules
shell: >
vdsm-tool config-lvm-filter -y