kern.geom.debugflags=16 does NOT allow me to write to device
Peter Schuller
peter.schuller at infidyne.com
Thu Apr 22 20:55:31 UTC 2010
open() in O_RDWR fails on the device in question (which is "used" by
glabel, indirectly by gmirror and zfs).
This is on an 8.0 userland and 8-STABLE kernel. This is a bit stupid I
know (nevermind why), but given that a plain open() syscall is failing
I highly doubt that it has anything to do with the userland being out
of synch. I cannot imagine GEOM changing like that in between 8.0 and
8-STABLE before the 8.1 release (correct me if this is a poor
assumption).
Observe:
% whoami
root
% sysctl -w kern.geom.debugflags=16
kern.geom.debugflags: 16 -> 16
% sysctl kern.geom.debugflags
kern.geom.debugflags: 16
% ktrace disklabel -B /dev/ad9s1
disklabel: Class not found
kdump shows:
15399 disklabel CALL open(0x800c02040,O_RDWR,<unused>0xa1a5)
15399 disklabel NAMI "/dev/ad9s1"
15399 disklabel RET open -1 errno 1 Operation not permitted
15399 disklabel CALL open(0x800651b68,O_RDONLY,<unused>0)
15399 disklabel NAMI "/dev/geom.ctl"
15399 disklabel RET open 4
15399 disklabel CALL ioctl(0x4,GEOM_CTL,0x800c04040)
15399 disklabel RET ioctl 0
15399 disklabel CALL close(0x4)
15399 disklabel RET close 0
15399 disklabel CALL write(0x2,0x7fffffffde90,0xb)
15399 disklabel GIO fd 2 wrote 11 bytes
"disklabel: "
15399 disklabel RET write 11/0xb
15399 disklabel CALL write(0x2,0x7fffffffdf70,0xf)
15399 disklabel GIO fd 2 wrote 15 bytes
"Class not found"
15399 disklabel RET write 15/0xf
It has these labels:
label/prboot1r1 N/A ad9s1a
label/prswap1r1 N/A ad9s1b
label/prtank1r1 N/A ad9s1d
prtank1r1 is part of a ZFS pool.
--
/ Peter Schuller
More information about the freebsd-fs
mailing list