Commit 4fb79c45 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add util for gluster file real placement

parent c606f978
#!/bin/sh
# Проверяет указанный файл на наличие в возможных местах размещения
get_bricks()
{
gluster volume info ftp-pvt | grep Brick"[0-9]" | sed -e "s|Brick[0-9]: ||g"
}
file="$(echo $1 | sed -e 's|/var/ftp/pvt||g')"
for i in $(get_bricks) ; do
host=$(echo $i | sed -e "s|:.*||g")
path=$(echo $i | sed -e "s|.*:||g")
echo $host - $path
ssh $host ls -l $path$file
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment