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

Not enough disk selection regex in wipe-all-disks-destructive.sh while there is a lot of disks #1

Open
helixzz opened this issue Dec 19, 2023 · 0 comments

Comments

@helixzz
Copy link

helixzz commented Dec 19, 2023

In maas-commissioning-scripts/wipe-all-disks-destructive.sh line 11:
find /dev -maxdepth 1 -type b -regextype "posix-extended" -regex '.*/(sd[a-z]$|nvme[0-9]n[0-9])$'|xargs -rn1 -P1 bash -c '

The regex selector (sd[a-z]$|nvme[0-9]n[0-9])$ may not enough on some large capacity machines.
e.g. For our storage server it is possible that there are more than 26 SAS/SATA disks or 10 NVMe devices or namespaces on one machine.

I suggest to extend the regex pattern by adding +. For example: (sd[a-z]+$|nvme[0-9]+n[0-9]+)$.

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

No branches or pull requests

1 participant