mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-11 21:29:29 +02:00
fix detect unmounted HDD size
This commit is contained in:
parent
96c9fd3f63
commit
db77299b0c
@ -34,20 +34,20 @@ if [ ${existsHDD} -eq 1 ]; then
|
||||
echo ""
|
||||
echo "*** HDD Size Check ***"
|
||||
# bitcoin > 450 GB
|
||||
min1kblocks=450000000
|
||||
minSize=450000000000
|
||||
# litecoin > 31 GB
|
||||
if [ "${network}" = "litecoin" ]; then
|
||||
min1kblocks=31000000
|
||||
minSize=31000000000
|
||||
fi
|
||||
num1Kblocks=$(df | grep "dev/${device}" | awk '$1=$1' | cut -d " " -f 2)
|
||||
echo "num1Kblocks(${num1Kblocks})"
|
||||
if [ ${num1Kblocks} -lt ${min1kblocks} ]; then
|
||||
if [ ${num1Kblocks} -gt 1 ]; then
|
||||
isSize=$(lsblk -o NAME,SIZE -b | grep "${device}" | awk '$1=$1' | cut -d " " -f 2)
|
||||
echo "isSize(${num1Kblocks})"
|
||||
if [ ${isSize} -lt ${minSize} ]; then
|
||||
if [ ${isSize} -gt 1 ]; then
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo "WARNING: HDD might be too small"
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo "You HDD was detected with the size of ${num1Kblocks}000 bytes"
|
||||
echo "For ${network} at least ${min1kblocks}000 bytes is recommended"
|
||||
echo "You HDD was detected with the size of ${isSize} bytes"
|
||||
echo "For ${network} at least ${minSize} bytes is recommended"
|
||||
echo "If you want to change to a bigger HDD:"
|
||||
echo "* Unplug power of RaspiBlitz"
|
||||
echo "* Make a fresh SD card again"
|
||||
|
Loading…
x
Reference in New Issue
Block a user