From owner-freebsd-stable@FreeBSD.ORG Wed Mar 7 10:56:18 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 01D18106566B for ; Wed, 7 Mar 2012 10:56:18 +0000 (UTC) (envelope-from peter.maloney@brockmann-consult.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by mx1.freebsd.org (Postfix) with ESMTP id 936408FC0C for ; Wed, 7 Mar 2012 10:56:17 +0000 (UTC) Received: from [10.3.0.26] ([141.4.215.32]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0MdoTN-1Rk6Dv1ztV-00PJ3r; Wed, 07 Mar 2012 11:56:10 +0100 Message-ID: <4F573ECA.6000001@brockmann-consult.de> Date: Wed, 07 Mar 2012 11:56:10 +0100 From: Peter Maloney User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 To: freebsd-stable@freebsd.org References: In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:j7c4vOz7ZrfLJ9pRGKUohZyeMUjDtKTCga69Boq7DQG Pm4ATrY1em2VF38PbrM5noOYp8HG+kUp67gHKgABD63NavMWGV MZ9BLIcKTb5E/57FoVx/xWfY74Zhxe4HWEtAVtAtLeqKCiWVWt vMbxMjeuz4r8cwyG0fOFHEu7F/cjWTWKU8r5eDfs7706Or+0hB ySxn6OD8VkfN+NsGz/TkZbnZVD+NtGJQ6TCLk75aeBHH1MzJKT SqSOnZxAU1c0947GTCBBxd9EMr/D3Tw8bHQCT78zYMAzl7ATa3 P/np6jG0aocoCuztWNpifUP6aUy0V2Ut+0fCvNHLb6xHI1LuZR 9BMFqpGWue9qZmw3yb7+T/W8FtNTr8dlsePgiRxiy Subject: Re: 9-stable: what happened to geom_labels? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 10:56:18 -0000 On 03/06/2012 05:08 PM, Warren Block wrote: > A new install of 9-release, updated to 9-stable today with the GENERIC > kernel. > gpart show -l shows GPT labels, yet there isn't even a /dev/gpt > directory. > > Has something changed with labels? I haven't tried 9 yet, but this happens with 8.2 also. I hate this bug... it seems so trivial. If there are no duplicate gpt labels now, why do I care if the disks were used on a different system? The labels are still there, so why not use them? [In Linux, the primary reason that I use labels is actually to transfer them between machines.] I also have one system where instead of seeing gptid, I only see the original device names "eg. da0p2", which is even stranger. (on this system, I moved the root to different disks, booted to the DVD before booting off the new disks, imported, rebooted to the new disks; on others). # zpool status zroot pool: zroot state: ONLINE scan: scrub repaired 0 in 0h3m with 0 errors on Tue Feb 28 16:06:45 2012 config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 da0p2 ONLINE 0 0 0 da1p2 ONLINE 0 0 0 da2p2 ONLINE 0 0 0 errors: No known data errors # gpart show -l da0 => 34 5860533101 da0 GPT (2.7T) 34 128 1 (null) (64k) 162 128862 - free - (62M) 129024 167731200 2 root1d1 (80G) 167860224 5692667904 3 data1d1 (2.7T) 5860528128 5007 - free - (2.5M) # glabel list | grep da0p2 (no results) # ls /dev/gpt/root1d1 (no results) With ZFS It is caused by importing the pool when booted off different media (eg. a DVD, or maybe another boot slice). When it happens, you will find your slices under /dev/gptid, and in /boot/loader.conf there is an option to change this. I don't know why it doesn't happen if you don't import the pool. # Setting this to 0 will get rid of the /dev/gptid directory and you will see your /dev/gpt directory again. kern.geom.label.gptid.enable=0 # Not sure what this does; I assume it means to show either gptid (if not disabled above) or the original device name (eg. da0p2) kern.geom.label.gpt.enable=0 I don't use the above settings, because although I can assume there are never duplicate gptids, I don't know what would happen if there were duplicate gpt labels. Normally, I would assume it would fall back to gptid. Someone else could clarify this. (ZFS should only display the gpt/gptid label and use its own guid [except with buggy pre-Sept. 2011 builds], but no idea about other things, like gmirror) Also, assuming you have redundancy and want to spend time resilvering, you can remove a disk, run "gpart delete -i ..." and "gpart create -i ... -l labelhere ..." to label it again ("gpart modify -l labelhere ..." will not work), and then replace/reattach the disk to your RAID (which is actually quite fast with ZFS if your partition start and end are the same since it only needs to do a partial update). > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" -- -------------------------------------------- Peter Maloney Brockmann Consult Max-Planck-Str. 2 21502 Geesthacht Germany Tel: +49 4152 889 300 Fax: +49 4152 889 333 E-mail: peter.maloney@brockmann-consult.de Internet: http://www.brockmann-consult.de --------------------------------------------