2024-10-23T23:14:53.710Z | <ljon> Hi, I came across a rbd error: `rbd=-1 operation not permitted`
We are doing backup for many volumes and when creating rbd snapshot, occasionally rbd gave me the above error. And retry works for the same rbd image.
I have a script that can reproduce the error:
```# Enable 'exit on error' and 'pipefail' options
set -e -o pipefail
image_name=volume-abc/volume-7f7df77d-ea0f-4c93-a357-84bd9b3d7a0f
for i in {0..100000}; do
now=$(date '+%Y-%m-%d %H:%M:%S')
echo "TIME: ${now}"
rbd snap create ${image_name}@jun-snap${i}
if [[ ${i} -gt 0 ]]; then
rbd snap rm ${image_name}@jun-snap$((i-1))
fi
sleep 4
done```
At about 7000 times, rbd had `operation not permitted` error at snapshot create line.
Do you know why is that?
Other than retry, is there other way to fix the issue?
Thanks for helping! |