Should kern.disks always show currently attached drives?
Peter Steele
psteele at maxiscale.com
Tue Apr 7 09:45:43 PDT 2009
I wanted to use the kern.disks sysctl variable but it doesn't seem to work the way I'd expect. When I first inspected this variable it showed the four hard drives I would expect:
ad4 ad6 ad8 ad10
Then I inserted a USB stick and checked kern.disks again, and this time the new USB drive was included:
da0 ad4 ad6 ad8 ad10
So far so good. Then I removed the USB disk, expecting it to be removed from kern.disks as well, but it was still included in the list. As another test, I removed the hard drive ad8 (it's a hot swappable SATA drive) and like the USB drive, kern.disks still included ad8 in the list. To make matters worse, when I put ad8 back in, an additional entry was added to kern.disks:
ad8 da0 ad4 ad6 ad8 ad10
Is this normal behavior? Is there a way to force FreeBSD to refresh this list?
More information about the freebsd-questions
mailing list