From owner-freebsd-questions@FreeBSD.ORG Fri Jan 25 04:51:41 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AC325325 for ; Fri, 25 Jan 2013 04:51:41 +0000 (UTC) (envelope-from carlj@peak.org) Received: from redcondor2.peak.org (redcondor2.peak.org [69.59.192.56]) by mx1.freebsd.org (Postfix) with ESMTP id 5E54FD0E for ; Fri, 25 Jan 2013 04:51:40 +0000 (UTC) Received: from zmail-mta01.peak.org ([207.55.16.111]) by redcondor2.peak.org ({6c724cae-de34-4c5f-b615-3072b86419fa}) via TCP (outbound) with ESMTP id 20130125044818169 for ; Fri, 25 Jan 2013 04:48:18 +0000 X-RC-FROM: X-RC-RCPT: Received: from bonsai.localnet (rad0.peak.org [69.59.192.40]) by zmail-mta01.peak.org (Postfix) with ESMTPSA id E7E9C461210 for ; Thu, 24 Jan 2013 20:48:17 -0800 (PST) Received: from oak.localnet (oak.localnet [192.168.193.34]) by bonsai.localnet (Postfix) with ESMTP id E1C203DB53 for ; Thu, 24 Jan 2013 20:48:16 -0800 (PST) Received: from oak.localnet (localhost.localnet [127.0.0.1]) by oak.localnet (Postfix) with ESMTP id 99D45C146 for ; Thu, 24 Jan 2013 20:48:16 -0800 (PST) Received: (from carlj@localhost) by oak.localnet (8.14.4/8.14.4/Submit) id r0P4mGrE014775; Thu, 24 Jan 2013 20:48:16 -0800 (PST) (envelope-from carlj@peak.org) X-Authentication-Warning: oak.localnet: carlj set sender to carlj@peak.org using -f From: Carl Johnson To: freebsd-questions@freebsd.org Subject: Re: How to see all labels? References: <87ehhsocs3.fsf@oak.localnet> Mail-Followup-To: freebsd-questions@freebsd.org Date: Thu, 24 Jan 2013 20:48:16 -0800 In-Reply-To: <87ehhsocs3.fsf@oak.localnet> (Carl Johnson's message of "Thu, 10 Jan 2013 15:10:04 -0800") Message-ID: <87vcaleulr.fsf@oak.localnet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MAG-OUTBOUND: peakinternet.redcondor.net@207.55.16/22 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2013 04:51:41 -0000 Carl Johnson writes: > I recently installed 9.1 on a system and labels don't seem to work as > I would expect. I can get them to work in /etc/fstab, but only the > ones referenced there show up in /dev/ufs and /dev/gpt. I have seen > this in previous versions, and in those cases they sometimes work. In > at least one previous case one ufs label (of several) would never work > even in fstab. The following shows my current configuration: > > $ uname -a > FreeBSD bonsai.localnet 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: > Tue Dec 4 09:23:10 UTC 2012 > root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 > $ gpart backup ada0 > GPT 128 > 1 freebsd-boot 64 128 > 2 freebsd-ufs 192 35651584 Bonsai > 3 freebsd-swap 35651776 4224671 BonsaiSwap > $ glabel status > Name Status Components > gptid/150b03ac-5767-11e2-a154-001485411fc8 N/A ada0p1 > ufs/Bonsai N/A ada0p2 > gpt/BonsaiSwap N/A ada0p3 > $ ls -l /dev/ufs > total 0 > crw-r----- 1 root operator 0, 109 2013-01-08 09:42 Bonsai > $ ls -l /dev/gpt > total 0 > crw-r----- 1 root operator 0, 112 2013-01-08 09:42 BonsaiSwap > $ cat /etc/fstab > # Device Mountpoint FStype Options Dump Pass# > #/dev/ada0p2 / ufs rw 1 1 > #/dev/ada0p3 none swap sw 0 0 > /dev/ufs/Bonsai / ufs rw 1 1 > /dev/gpt/BonsaiSwap none swap sw 0 0 > > In this case I have two GPT labels defined, but only the one used in > fstab (BonsaiSwap) is shown in /dev/gpt and by glabel. When I used > the original fstab without labels, there were no /dev/gpt or /dev/ufs > directories, and glabel didn't show any of them. > > Does anybody have any ideas about how to get the system to recognize > all labels? A command after boot would be acceptable since I could > just put it in /etc/rc.local. I just discoved the sysctl 'kern.geom.label.debug=2' and did some further testing. It appears that the system removes what it considers redundant labels. For the Bonsai label it has labels for ufs, ufsid, gpt, and gptid; so it removes the ufsid, gpt, and gptid labels after I use the ufs label. The swap partition has gpt and gptid labels, and it removes the gptid label after I use the gpt label. I don't really agree with it, but I feel better about it now that I think I understand what it is doing. -- Carl Johnson carlj@peak.org