Date: Sun, 22 Aug 2004 14:47:45 +0200 From: DOT <dot@data.pl> To: DOT <dot@data.pl> Cc: freebsd-geom@freebsd.org Subject: Re: can't reattach gbde slice 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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: -----<start>----- #!/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 -----<end>----- 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: -----<start>----- ******* 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: <UNUSED> -----<end>----- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040822144745.2d1a00a8.dot>