From owner-freebsd-geom@FreeBSD.ORG Sun Aug 22 12:35:21 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D48BF16A4CE for ; Sun, 22 Aug 2004 12:35:21 +0000 (GMT) Received: from v00058.home.net.pl (data.pl [212.85.96.58]) by mx1.FreeBSD.org (Postfix) with SMTP id CA8A143D2F for ; Sun, 22 Aug 2004 12:35:20 +0000 (GMT) (envelope-from dot@data.pl) Received: from localhost (HELO nonSpace) (dot.data@home@127.0.0.1) by matrix01.home.net.pl with SMTP; 22 Aug 2004 12:35:16 -0000 Date: Sun, 22 Aug 2004 14:47:45 +0200 From: DOT To: DOT Message-Id: <20040822144745.2d1a00a8.dot@data.pl> In-Reply-To: <20040818132658.3d8805ad.dot@data.pl> References: <20040816203143.21c95a45.dot@data.pl> <20040817211821.GD33859@afields.ca> <20040818132658.3d8805ad.dot@data.pl> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd5.2.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-geom@freebsd.org Subject: Re: can't reattach gbde slice X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2004 12:35:22 -0000 God damn, it happen's again.. Hi, this time my passphrase works for few days, only few days. And I didn't use any software that could cause this. I'm sure that it's not accident, probably I'm doing something wrong so please point me where it is, because restoring data again has no sense unless the problem is solved. Durning installation of FreeBSD I've created 4 partitions: ad0s1 for Windows, ad0s2 for Freebsd, ad0s3 for my encrypted home directory and ad0s4 for future purposes. Didn't label ad0s3. Then I've initialized encrypted partition (gbde init /dev/ad0s3 -i -L /etc/gbde/ad0s3.lock) with one key, sector size 2048, filled with random data. New file system (newfs -U /dev/ad0s3.bde) and my small script in /usr/local/etc/rc.d/ for automate attaching and mounting of home directory: ---------- #!/bin/sh device="/dev/ad0s3" lockfile="/etc/gbde/ad0s3.lock" mountpoint="/usr/home/PRIVATE" ir="dot" case "$1" in start) echo "GBDE for ${device}" /sbin/gbde attach ${device} -l ${lockfile} if [ -c ${device}.bde ]; then if [ ! -d ${mountpoint}/${ir} ]; then fsck -p -t ffs ${device}.bde mount ${device}.bde ${mountpoint} && \ echo "${mountpoint} mounted" && \ pw unlock ${ir} else pw unlock ${ir} fi else pw lock ${ir} fi ;; stop) if [ -c ${device}.bde ]; then if [ -d ${mountpoint}/${ir} ]; then umount ${mountpoint} && \ echo "unmounted" fi gbde detach ${device} && \ echo "detached" fi pw lock ${ir} ;; *) echo "$0 start|stop" ;; esac ---------- After restoring data I could get back to work, and it works fine in everyday use for some time. And suddenly, without any signs of disaster, I can't attach ad0s3 anymore. Lockfile is untouched, system boot like always, passphrase is correct. There is fdisk output: ---------- ******* Working on device /dev/ad0 ******* parameters extracted from in-core disklabel are: cylinders=77520 heads=16 sectors/track=63 (1008 blks/cyl) Figures below won't work with BIOS for partitions not in cyl 1 parameters to be used for BIOS calculations are: cylinders=77520 heads=16 sectors/track=63 (1008 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 6 (0x06),(Primary 'big' DOS (>= 32MB)) start 63, size 11261502 (5498 Meg), flag 0 beg: cyl 0/ head 1/ sector 1; end: cyl 700/ head 254/ sector 63 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 11261565, size 30716280 (14998 Meg), flag 80 (active) beg: cyl 701/ head 0/ sector 1; end: cyl 1023/ head 254/ sector 63 The data for partition 3 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 41977845, size 34089930 (16645 Meg), flag 0 beg: cyl 1023/ head 255/ sector 63; end: cyl 1023/ head 254/ sector 63 The data for partition 4 is: ---------- Unfortunately I can't tell if something change here. If You have ANY idea what could cause my problems, or how to check this out, please share with me. Michal Bartkowiak