Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
Stop formatting disks when deleting a filesystem
Browse files Browse the repository at this point in the history
Rather than format the disks, just delete the logical volumes and volume
groups. This should stop using up SSD life on formatting the disks.
  • Loading branch information
JohnGarbutt committed Apr 16, 2019
1 parent 8c02d2f commit 5567c09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fs-ansible/roles/lustre/tasks/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
osts: "{{ vars[fs_name + '_osts'] | default({}) }}"
client_port: "{{ vars[fs_name + '_client_port'] }}"
mdt_size: "{{ vars[fs_name + '_mdt_size'] | default('10%') }}"
tags: [ 'never', 'format_mgs', 'reformat_mgs', 'format']
tags: [ 'never', 'format_mgs', 'reformat_mgs', 'format', 'clean']

- name: Ensure MGS has been formatted
command: /usr/sbin/mkfs.lustre --mgs /dev/{{ mgs }}
Expand Down Expand Up @@ -67,7 +67,7 @@
when:
- osts is defined

tags: [ 'never', 'reformat_mdts', 'reformat_osts', 'format']
tags: [ 'never', 'reformat_mdts', 'reformat_osts', 'format', 'clean']


- name: Ensure MDTs setup
Expand Down
2 changes: 1 addition & 1 deletion internal/pkg/pfsprovider/ansible/ansible.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func executeAnsibleTeardown(fsType FSType, volume registry.Volume, brickAllocati
return err
}

formatArgs := "dac.yml -i inventory --tag format"
formatArgs := "dac.yml -i inventory --tag clean"
err = executeAnsiblePlaybook(dir, formatArgs)
if err != nil {
return err
Expand Down

0 comments on commit 5567c09

Please sign in to comment.