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

ansible-scylla-node: auto-detect NVMe: only use non-mounted disks. #413

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vreniers
Copy link
Collaborator

@vreniers vreniers commented Oct 11, 2024

NVMe disks should only be selected that are not in use, which should be the case when they are not mounted.

Fixes #407

@vreniers vreniers marked this pull request as draft October 11, 2024 12:50
@vreniers vreniers marked this pull request as ready for review October 21, 2024 07:13
@vreniers vreniers force-pushed the auto_detect_nvme_fix branch from eca0278 to a9d2694 Compare October 22, 2024 13:38
@vreniers vreniers changed the title ansible-scylla-node: auto-detect NVMe: only use non-partitioned disks. ansible-scylla-node: auto-detect NVMe: only use non-mounted disks. Oct 22, 2024
@vreniers vreniers force-pushed the auto_detect_nvme_fix branch from a9d2694 to ae5f053 Compare October 23, 2024 11:07
@vreniers vreniers changed the title ansible-scylla-node: auto-detect NVMe: only use non-mounted disks. ansible-scylla-node: auto-detect NVMe: only use non-mounted and non-partitioned disks. Oct 23, 2024
@tarzanek
Copy link
Collaborator

tarzanek commented Nov 5, 2024

  lsblk -oNAME,PATH,PTTYPE,MOUNTPOINT -nd | grep nvme | awk '{if ($3=="" && $4=="") print $2}'

misbehaves on md0 with multiple nvmes

@vreniers vreniers force-pushed the auto_detect_nvme_fix branch from ae5f053 to c86cfd5 Compare November 5, 2024 10:05
@vreniers vreniers changed the title ansible-scylla-node: auto-detect NVMe: only use non-mounted and non-partitioned disks. ansible-scylla-node: auto-detect NVMe: only use non-mounted disks. Nov 5, 2024
nvme list | awk '{print $1}' | tail -n +3
for nvme_disk in $(lsblk -oNAME -nd | grep nvme)
do
{ echo -n "/dev/$nvme_disk "; lsblk "/dev/$nvme_disk" -o MOUNTPOINT | grep / | wc -l; } | awk '{if ($2=="0") print $1}'
Copy link
Collaborator

@tarzanek tarzanek Nov 5, 2024

Choose a reason for hiding this comment

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

lsblk -n ?
to avoid printing header ?

NVMe disks should only be selected that are not in use, which should be the case when they are not mounted.
Fixes scylladb#407

Signed-off-by: Vincent Reniers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

detect_nvmes feature doesn't work for AWS
3 participants