Problem running custom startup script at proper time

Aaron drizzt321 at
Sun Sep 19 20:03:40 UTC 2010

I'm having trouble getting a custom startup script to run at the
proper time. I'm having to use gnop with my new Western Digital
WD10EARS (1TB, 4K sector size) because it reports the standard 512
byte to the OS. I'm basing it on which
also says that it needs to be run on each boot so that ZFS will use
the .nop devices. So, I've created a custom startup script to
automatically do this for me at the proper time (before zfs starts and
auto-mounts). I'm having trouble getting it to work properly though.
In services -r, it is listed before the zfs startup script, but in
dmesg the gnop messages come after the zfs startup messages. Below is
excerpts from services -r, dmesg, and the startup script in its

EXCERPT FROM services -r

Trying to mount root from ufs:/dev/ad0s1a
ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present;
            to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf.
ZFS filesystem version 3
ZFS storage pool version 14
GEOM_NOP: Device ad6.nop created.
GEOM_NOP: Device ad8.nop created.
GEOM_NOP: Device ad10.nop created.
GEOM_NOP: Device ad12.nop created.

STARTUP SCRIPT, /etc/rc.d/gnop
# PROVIDE: gnop
# REQUIRE: mdconfig
. /etc/rc.subr


for i in ad6 ad8 ad10 ad12; do gnop create -S 4096 $i; done

load_rc_config $name
run_rc_command "$1"

More information about the freebsd-questions mailing list