From owner-freebsd-questions@FreeBSD.ORG Tue Jan 25 14:07:12 2011 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 89F9C106566C for ; Tue, 25 Jan 2011 14:07:12 +0000 (UTC) (envelope-from clarkjp@charter.net) Received: from mail.cluebytwelve.org (clueby12.org [198.186.190.239]) by mx1.freebsd.org (Postfix) with ESMTP id 604148FC13 for ; Tue, 25 Jan 2011 14:07:12 +0000 (UTC) Received: from localdomain.local (24-158-157-74.dhcp.jcsn.tn.charter.com [24.158.157.74]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cluebytwelve.org (Postfix) with ESMTPSA id 8365B1B5D9 for ; Tue, 25 Jan 2011 08:07:11 -0600 (CST) Received: by localdomain.local (Postfix, from userid 1001) id 3F6A12844E; Tue, 25 Jan 2011 08:07:05 -0600 (CST) Date: Tue, 25 Jan 2011 08:07:05 -0600 From: "J. Porter Clark" To: freebsd-questions@freebsd.org Message-ID: <20110125140705.GA20041@auricle.charter.net> References: <20110125014223.GA13385@auricle.charter.net> <4D3E8DC0.9060605@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D3E8DC0.9060605@gmx.com> Organization: http://www.angelfire.com/ego/porterclark/ User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: How to label a GELI device 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, 25 Jan 2011 14:07:12 -0000 On Tue, Jan 25, 2011 at 10:45:52AM +0200, Nikos Vassiliadis wrote: > J. Porter Clark wrote: > > I have an encrypted partition, /dev/da0s1d. I can use geli > > attach da0s1d and obtain a device /dev/da0s1d.eli, which is a > > UFS filesystem. All that works just fine. > > > > I'd like to label /dev/da0s1d so that I don't have to refer to > > the exact drive number, etc., which might change if I reboot > > with a USB stick in the system or whatever. But glabel puts the > > label in the last sector, which is where GELI stores metadata. > > You don't have to worry about this. geli uses the last sector for > its metadata and creates a device with one sector less to its clients. > The original device is 2048 sectors, the device geli provides is 2047 > sectors: > > moby# diskinfo /dev/md0 /dev/md0.eli > > /dev/md0 512 1048576 2048 0 0 > > /dev/md0.eli 512 1048064 2047 0 0 > > There is no way for the "internal" GEOM to mess with the "external's" > metadata. That's fine, but I want to label the "external" /dev/md0, not the "internal" /dev/md0.eli. What I eventually want to do is to "geli attach" the device using a name that doesn't depend on drive numbering. -- J. Porter Clark