Nastavení RAIDu
ARRAYS=""
DISKS=""
for field in `cat /proc/mdstat | grep "active raid6"`
do
if [[ "x${field:0:2}x" == "xmdx" ]]
then
ARRAYS="$ARRAYS $field"
elif [[ "x${field:0:2}x" == "xsdx" ]]
then
DISKS="$DISKS ${field:0:3}"
fi
done
for disk in $DISKS
do
# read-ahead to 16MB
blockdev --setra 16384 /dev/$disk
# Queue Tuning
echo 1024 > /sys/block/$disk/queue/read_ahead_kb
echo 256 > /sys/block/$disk/queue/nr_requests
# disable NCQ
echo 1 > /sys/block/$disk/device/queue_depth
done
for array in $ARRAYS
do
# read-ahead to 64MB
blockdev --setra 64536 /dev/$array
# stripe-cache size
echo 16384 > /sys/block/$array/md/stripe_cache_size
done
--
LeoGalambos - 28 Oct 2018