From owner-freebsd-questions@FreeBSD.ORG Sat Jan 16 00:33:05 2010 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 2BB9B1065670 for ; Sat, 16 Jan 2010 00:33:05 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8E0488FC0C for ; Sat, 16 Jan 2010 00:33:04 +0000 (UTC) Received: from phenom.cordula.ws (phenom [192.168.254.60]) by fw.farid-hajji.net (Postfix) with ESMTP id 721D1372FB; Sat, 16 Jan 2010 01:33:01 +0100 (CET) Date: Sat, 16 Jan 2010 01:33:01 +0100 From: cpghost To: Scott Bennett Message-ID: <20100116003301.GB1530@phenom.cordula.ws> References: <201001150725.o0F7Pook010484@mp.cs.niu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201001150725.o0F7Pook010484@mp.cs.niu.edu> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-questions@freebsd.org Subject: Re: GELI file systems unusable after "glabel label" operations 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: Sat, 16 Jan 2010 00:33:05 -0000 On Fri, Jan 15, 2010 at 01:25:50AM -0600, Scott Bennett wrote: > >Check /var/backups. There should be *.eli files there. Those are the automa= > >tic > > No joy. :-( > > >metadata backups that 'geli init' makes (at least in 8.0). You can restore > >those backups with 'geli restore'. > > Those must be new in 8.0. I don't see any in 7.2, just {aliases,group, > master.passwd}.bak{,2} in /var/backups. [No help here, just a me-too...] I can confirm this: no metadata of GELI partitions generated on RELENG_7 were saved in /var/backups, but GELI partitions created since RELENG_8 were! I've noticed this by chance with "geli init" on an external disk, and thought that geli init would only create metadata backup automatically for disks that are not the same than the one hosting /var/backups (for obvious reasons, i.e. when you want to quickly destroy a key, and for- getting to wipe out the metadata backup). Apparently, it was the version bump, and not the different disks. Good to know indeed. Would a "geli backup" on those old RELENG_7 GELI partitions (or rather provider partitions) have the same effect as a RELENG_8-style "geli init" to get those metadata files? Maybe /usr/src/UPDATING should contain a little hint for those of us with old GELI partitions without auto-backups of metadata? > I have a new 1 TB drive that I will soon connect to the system and begin > creating file systems. I will make gzipped image files with dd(1) of the > damaged partitions and store them on the new drive for a while in case a > workable idea turns up. I feel your pain (having lost some data in a similar scenario while experimenting with glabel on geli partitions, but not as much as you). There should really be a big obvious warning in the glabel(8) and geli(8) man pages, because that's a big trap waiting to spring on unsuspecting users (POLA violation). :-( -cpghost. -- Cordula's Web. http://www.cordula.ws/