From owner-freebsd-questions@FreeBSD.ORG Tue Apr 7 16:45:42 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E59D1106564A for ; Tue, 7 Apr 2009 16:45:42 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from exprod7og121.obsmtp.com (exprod7og121.obsmtp.com [64.18.2.20]) by mx1.freebsd.org (Postfix) with SMTP id 975E98FC1B for ; Tue, 7 Apr 2009 16:45:42 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from source ([209.85.146.178]) by exprod7ob121.postini.com ([64.18.6.12]) with SMTP ID DSNKSduDNrqDZ5K3q3tH89vfyvNK9SAIzgcM@postini.com; Tue, 07 Apr 2009 09:45:42 PDT Received: by wa-out-1112.google.com with SMTP id j32so1458774waf.29 for ; Tue, 07 Apr 2009 09:45:42 -0700 (PDT) Received: by 10.114.197.10 with SMTP id u10mr171283waf.96.1239122741796; Tue, 07 Apr 2009 09:45:41 -0700 (PDT) Received: from localhost ([76.231.178.131]) by mx.google.com with ESMTPS id l28sm7048465waf.65.2009.04.07.09.45.41 (version=SSLv3 cipher=RC4-MD5); Tue, 07 Apr 2009 09:45:41 -0700 (PDT) Date: Tue, 7 Apr 2009 09:44:20 -0700 (PDT) From: Peter Steele To: #freebsd-questions Message-ID: <20445545.981239122658390.JavaMail.HALO$@halo> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Should kern.disks always show currently attached drives? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2009 16:45:43 -0000 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?