mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
Check: if disk with UUID are btrfs by blkid
Old check can't find btrfs fs, if fs not mounted Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
parent
82b3ba76fa
commit
4b592ec2a3
@ -52,16 +52,18 @@ DB_SIZE="${DB_SIZE:-$((64*AL16M))}"
|
||||
LOG_SHORT_PATH="${LOG_SHORT_PATH:-N}"
|
||||
LOG_FILTER_TIME="${LOG_FILTER_TIME:-N}"
|
||||
|
||||
INFO "Check: BTRFS UUID exists"
|
||||
if [ ! -d "/sys/fs/btrfs/$UUID" ]; then
|
||||
ERRO "Can't find BTRFS UUID: $UUID"
|
||||
fi
|
||||
|
||||
INFO "Check: Disk exists"
|
||||
if [ ! -b "/dev/disk/by-uuid/$UUID" ]; then
|
||||
ERRO "Missing disk: /dev/disk/by-uuid/$UUID"
|
||||
fi
|
||||
|
||||
it_btrfs(){ [ "$(blkid -s TYPE -o value "$1")" == "btrfs" ]; }
|
||||
|
||||
INFO "Check: Disk with btrfs"
|
||||
if ! it_btrfs "/dev/disk/by-uuid/$UUID"; then
|
||||
ERRO "Disk not contain btrfs: /dev/disk/by-uuid/$UUID"
|
||||
fi
|
||||
|
||||
INFO "WORK DIR: $WORK_DIR"
|
||||
mkdir -p "$WORK_DIR" || exit 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user