Date: Wed, 07 Mar 2012 11:56:10 +0100 From: Peter Maloney <peter.maloney@brockmann-consult.de> To: freebsd-stable@freebsd.org Subject: Re: 9-stable: what happened to geom_labels? Message-ID: <4F573ECA.6000001@brockmann-consult.de> In-Reply-To: <alpine.BSF.2.00.1203060752300.68597@wonkity.com> References: <alpine.BSF.2.00.1203060752300.68597@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 --------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F573ECA.6000001>