mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-09 04:21:01 +00:00
15 lines
566 B
Bash
15 lines
566 B
Bash
#!/bin/bash
|
|
|
|
# Script to deploy on an instance that has an ephemeral volume as /dev/nvme0n1 (adjust env var PARTITION if different)
|
|
# Ensures the partition is xfs-formatted, any existing partition contents will be overwritten if formatted otherwise.
|
|
# An existing xfs partition will be left alone.
|
|
|
|
PARTITION=/dev/nvme0n1
|
|
FSTYPE=$(blkid -p $PARTITION -s TYPE -o value)
|
|
if [ "$FSTYPE" != "xfs" ]; then
|
|
echo FSTYPE was "$FSTYPE" but should have been xfs. Formatting $PARTITION...
|
|
mkfs.xfs -f $PARTITION
|
|
else
|
|
echo FSTYPE was "$FSTYPE" which is just right :-\)
|
|
fi
|