Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Apr 2010 21:04:40 -0700
From:      Carl Johnson <carlj@peak.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: How to determine /dev/ad* from mount label
Message-ID:  <87y6g9v8vb.fsf@cjlinux.localnet>
In-Reply-To: <4BD6375B.6030500@giovannetti.ca> (Mark G.'s message of "Mon\, 26 Apr 2010 21\:01\:15 -0400")
References:  <4BD6375B.6030500@giovannetti.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
"Mark G." <mark-fbsd-quest-10+20100426@giovannetti.ca> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87y6g9v8vb.fsf>