Skip to content

Commit

Permalink
ansible-scylla-node: auto-detect NVMe: only use non-partitioned disks.
Browse files Browse the repository at this point in the history
NVMe disks should only be selected that are not in use, which should be the case when they are not partitioned.

Fixes #407
  • Loading branch information
vreniers committed Oct 11, 2024
1 parent cb6a054 commit eca0278
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion ansible-scylla-node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ scylla_dependencies:
- curl
- wget
- python3-yaml # this will fail on non centos systems
- nvme-cli
#- software-properties-common
#- apt-transport-https
#- gnupg2
Expand Down
5 changes: 0 additions & 5 deletions ansible-scylla-node/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@
for i in `yum search python3|grep -i pyyaml|awk '{ print $1 }'`; do sudo yum -y install $i; done
become: true

- name: install nvme-cli
shell: |
yum install -y nvme-cli
become: true

- name: install and configure Scylla Manager Agent
block:
- name: add Scylla Manager repo
Expand Down
6 changes: 5 additions & 1 deletion ansible-scylla-node/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
block:
- name: Get list of NVMEs
shell: |
nvme list | awk '{print $1}' | tail -n +3
lsblk -oNAME,PTTYPE -nd | grep nvme | awk '{if ($2=="") print "/dev/"$1}'
register: _detected_nvmes

- set_fact:
Expand Down Expand Up @@ -80,6 +80,10 @@
_disable_online_discard: "--online-discard {{ scylla_raid_online_discard }}"
when: _scylla_raid_setup_help.stdout is search("--online-discard")

- name: "ansible-scylla-node: common.yml: Setting raid setup with disks"
debug:
msg: "Using the following disk devices: {{ scylla_raid_setup | join(',') }}"

- name: run raid setup if there is no scylla mount yet
shell: "scylla_raid_setup --disks {{ scylla_raid_setup | join(',') }} --update-fstab {{ _disable_online_discard }}"
become: true
Expand Down

0 comments on commit eca0278

Please sign in to comment.