On Thu, Dec 03, 2015 at 07:43:10PM +0100, Petar Bogdanovic wrote: > > # for i in disksort fcfs priocscan; do (...) Since there is no facility where one could set bufq strategies for all disks, here a simple rc-script in case there are other people who prefer rc.conf to rc.local. /etc/rc.conf: dkstrat=YES dkstrat_flags=fcfs /etc/rc.d/dkstrat: #! /bin/sh # # PROVIDE: dkstrat # REQUIRE: DISKS # BEFORE: fsck $_rc_subr_loaded . /etc/rc.subr name=dkstrat rcvar=$name start_cmd=dkstrat_start stop_cmd=: dkstrat_start () { local newstr= for str in $(sysctl -n kern.bufq.strategies); do if [ $str = "$dkstrat_flags" ]; then newstr=$str fi done if [ -z "$newstr" ]; then echo "No valid bufq strategy defined." return 1 fi for dev in $(sysctl -n hw.disknames); do dkctl $dev strategy $newstr done } load_rc_config $name run_rc_command "$1"
Attachment:
signature.asc
Description: PGP signature