Skip to content

Improve add-db-to-osd.sh #8

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

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

Conversation

anthonyeleven
Copy link

Improve spelling and caps, add the ability to specify the number of offload slices per device, add an ok-to-stop check.

@anthonyeleven anthonyeleven force-pushed the improve-add-db-to-osd.sh branch from bac099a to f657006 Compare April 15, 2025 20:30
Copy link
Member

@bkelly16 bkelly16 left a comment

Choose a reason for hiding this comment

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

Thanks for the feedback Anthony

OSD_PER_DB_LIMIT=${OPTARG}
case $OSD_PER_DB_LIMIT in
''|*[!0-9]*) echo "OSDs per DB device ratio must be an integer" ; exit 1 ;;
esac
Copy link
Member

Choose a reason for hiding this comment

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

you have to close this block out with a ";;" or else it'll throw a syntax error

Copy link
Author

Choose a reason for hiding this comment

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

doh, nested. pushing.

add-db-to-osd.sh Outdated
FORCE="false"
PHYSICAL_EXTENT_SIZE_BYTES=4194304
OSD_PER_DB_LIMIT=5

while getopts 'b:fo:d:h' OPTION; do
while getopts 'b:fo:d:h:r' OPTION; do
Copy link
Member

Choose a reason for hiding this comment

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

":" needs to trail the r here, not precede

Copy link
Author

Choose a reason for hiding this comment

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

Ah, haven't used getopts much and was confused re the subtleties. Pushed an ammendment

add-db-to-osd.sh Outdated
echo "Set noout"
ceph osd set noout
echo "Stop OSD.$OSD_ID"
systemctl stop ceph-osd@$OSD_ID
# Is this a relic of Filestore and thus superfluous?
Copy link
Member

Choose a reason for hiding this comment

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

correct - we can remove this

Copy link
Author

Choose a reason for hiding this comment

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

pushed

Signed-off-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
@anthonyeleven anthonyeleven force-pushed the improve-add-db-to-osd.sh branch from f657006 to 3187d58 Compare April 15, 2025 20:54
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.

2 participants