|
发表于 2011-4-26 14:35:09
|
显示全部楼层
Post by blance;2136484
我被打败了,在未找到解决办法前只有把sda sdb全部按ssd方式来“优化”了~ #!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
function setup_ssd()
{
device=$1
scheduler=$2
readlink /dev/disk/by-id/$device > /dev/null 2>&1 || return 1
diskname=`readlink /dev/disk/by-id/$device | sed 's/.*\(sd.\)/\1/g'`
hdparm -W1a0A0 /dev/$diskname > /dev/null 2>&1
echo $scheduler > /sys/block/$diskname/queue/scheduler
if [[ "x$scheduler" == "xdeadline" ]]; then
echo 1 > /sys/block/$diskname/queue/iosched/fifo_batch
fi
}
setup_ssd scsi-SATA_KINGSTON_SV100S08AAA0008487 noop 我的修改版的rc.local |
|