From owner-freebsd-questions@FreeBSD.ORG Tue Apr 27 04:04:48 2010 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 3EC921065672 for ; Tue, 27 Apr 2010 04:04:48 +0000 (UTC) (envelope-from carlj@peak.org) Received: from redcondor1.peak.org (redcondor1.peak.org [69.59.192.54]) by mx1.freebsd.org (Postfix) with ESMTP id 05ECC8FC1E for ; Tue, 27 Apr 2010 04:04:47 +0000 (UTC) Received: from peak-mail-gateway.peak.org ([69.59.192.42]) by redcondor1.peak.org ({e03e86cd-14ae-47ce-9578-3c080ce9c462}) via TCP (outbound) with ESMTP id 20100427040447384 for ; Tue, 27 Apr 2010 04:04:47 +0000 X-RC-FROM: X-RC-RCPT: Received: from cjlinux.localnet (207.55.91.197.peak.org [207.55.91.197] (may be forged)) (authenticated bits=0) by peak-mail-gateway.peak.org (8.12.10/8.12.8) with ESMTP id o3R44eZm022811 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 26 Apr 2010 21:04:46 -0700 (PDT) Received: from carlj by cjlinux.localnet with local (Exim 4.69) (envelope-from ) id 1O6c2K-0000Xa-Cc for freebsd-questions@freebsd.org; Mon, 26 Apr 2010 21:04:40 -0700 To: freebsd-questions@freebsd.org References: <4BD6375B.6030500@giovannetti.ca> From: Carl Johnson Date: Mon, 26 Apr 2010 21:04:40 -0700 In-Reply-To: <4BD6375B.6030500@giovannetti.ca> (Mark G.'s message of "Mon\, 26 Apr 2010 21\:01\:15 -0400") Message-ID: <87y6g9v8vb.fsf@cjlinux.localnet> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: How to determine /dev/ad* from mount label 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, 27 Apr 2010 04:04:48 -0000 "Mark G." writes: > Hi, > > I've tried the mount, tunefs and df manuals, and don't know > where to look next. > > I am trying to find out what device, in terms of /dev/ad0s1a > and so on, is actually 'connected' to a label mounted file > system. Here is my fstab (from PC-BSD, by the way): > > # more /etc/fstab > # Device Mountpoint FStype Options Dump Pass > /dev/label/rootfs0 / ufs rw,noatime 1 1 > /dev/label/swap0 none swap sw 0 0 > /dev/label/var0 /var ufs rw,noatime 1 1 > /dev/label/usr0 /usr ufs rw,noatime 1 1 > procfs /proc procfs rw 0 0 > linprocfs /compat/linux/proc linprocfs rw 0 0 > tmpfs /tmp tmpfs rw,mode=1777 0 0 > > I just wanted to know if there was a utility to tell me > which actual device was mounted. I also tried camcontrol devlist > and atacontrol list. The latter allowed me to determine that > /dev/label/rootfs0 is ad2s1a based on the actual disk size > and a process of elimination. > > Does anyone know a magic incantation to output this label->device > mapping? Try looking at glabel(8). I don't know what option will list which is mounted, but 'glabel status' shows the names and what partitions they are associated with. -- Carl Johnson carlj@peak.org