From owner-freebsd-questions@FreeBSD.ORG Tue Jan 25 08:46:11 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 F0280106566B for ; Tue, 25 Jan 2011 08:46:11 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: from mailout-eu.gmx.com (mailout-eu.gmx.com [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id 44AD08FC1A for ; Tue, 25 Jan 2011 08:46:11 +0000 (UTC) Received: (qmail invoked by alias); 25 Jan 2011 08:46:09 -0000 Received: from adsl-193.79.107.89.tellas.gr (EHLO moby.local) [79.107.89.193] by mail.gmx.com (mp-eu004) with SMTP; 25 Jan 2011 09:46:09 +0100 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX19wV+A3pOhw80Uqf/652zKDw5a3hhspx2yDs242jU absNpvKpskF4iQ Message-ID: <4D3E8DC0.9060605@gmx.com> Date: Tue, 25 Jan 2011 10:45:52 +0200 From: Nikos Vassiliadis User-Agent: Thunderbird 2.0.0.23 (X11/20100313) MIME-Version: 1.0 To: "J. Porter Clark" References: <20110125014223.GA13385@auricle.charter.net> In-Reply-To: <20110125014223.GA13385@auricle.charter.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-questions@freebsd.org 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 08:46:12 -0000 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. > So, how do I make this work? > glabel apart from the generic device labeling, supports UFS labels which are *part* of the filesystem, that is, you *don't* have external metadata living in a sector outside the filesystem. Check tunefs manual page and specifically the -L option. HTH, Nikos