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

Tools directory changes: #31

Merged
merged 2 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion tools/create-write-delete-namespaces.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ case "$SIZE" in
./lvm.sh create

# Write a little something to the logical volume to give the drives some work to do on delete-ns operation
fio --direct=1 --rw=randwrite --bs=32M --ioengine=libaio --iodepth=128 --numjobs=4 --runtime=30s --time_based --group_reporting --name=rabbit --eta-newline=1 --filename=/dev/rabbit/rabbit
fio --direct=1 --rw=randwrite --bs=32M --ioengine=libaio --iodepth=128 --numjobs=4 --runtime=5m --time_based --group_reporting --name=rabbit --eta-newline=1 --filename=/dev/rabbit/rabbit

if [ $DELAY_TO_COOL_CPU != 0 ]
then
Expand All @@ -57,6 +57,17 @@ case "$SIZE" in
# Delete the logical volume to tidy up
./lvm.sh delete

# Format the namespace to speed up deletion
./nvme.sh cmd format -f -n 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Indent issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see it.


# Wait for the format to finish
areWeDone=$(nvme list | grep KIO | awk '{if ($6 > 0) { print "wait" } else { print "done" }}')
while [ "$areWeDone" != "done" ]; do
sleep 1
printf "Formatting, space left %f\n" "$(nvme list | grep KIO | awk '{print $6}')"
areWeDone=$(nvme list | grep KIO | awk '{if ($6 > 0) { print "wait" } else { print "done" }}')
done

# Show the nvme namespaces for the record
nvme list | grep KIO

Expand Down
2 changes: 1 addition & 1 deletion tools/lvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ drives() {
if [ "${NAMESPACEID::-1}" == "$NAMESPACE" ];
then
echo " Found Namespace ${NAMESPACE}"

DRIVES+=(${DRIVE})
fi
fi
Expand Down
9 changes: 7 additions & 2 deletions tools/nvme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ Arguments:
-h display this help
-t time each command

Example:
nvme.sh -t delete 1
Examples:
./nvme.sh -t delete 1
./nvme.sh cmd id-ctrl | grep -E "^fr " # firmware level
./nvme.sh cmd id-ctrl | grep -E "^mn " # model name
./nvme.sh cmd format -f -n <namespace id> # format specified namespace
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use long form names so they are not as cryptic to the reader


./nvme.sh cmd virt-mgmt --cntlid=3 --act=9 # enable CM7 virtual functions
EOF
}

Expand Down
Loading