Skip to content

Commit aadd726

Browse files
pcncdarora
authored andcommitted
chore: bail on executing grow_fs is resize2fs is already running
1 parent 189b8b5 commit aadd726

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ansible/files/admin_api_scripts/grow_fs.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ set -euo pipefail
44

55
VOLUME_TYPE=${1:-data}
66

7+
if pgrep resizefs; then
8+
echo "resize2fs is already running"
9+
exit 1
10+
fi
11+
712
if [ -b /dev/nvme1n1 ] ; then
813
if [[ "${VOLUME_TYPE}" == "data" ]]; then
914
resize2fs /dev/nvme1n1

0 commit comments

Comments
 (0)