From owner-freebsd-geom@FreeBSD.ORG Wed Sep 10 12:58:41 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 641C1106566B for ; Wed, 10 Sep 2008 12:58:41 +0000 (UTC) (envelope-from mikej@paymentallianceintl.com) Received: from mx2.confluenttech.com (mx2.confluentasp.com [216.26.153.14]) by mx1.freebsd.org (Postfix) with ESMTP id 2A5AC8FC1B for ; Wed, 10 Sep 2008 12:58:41 +0000 (UTC) (envelope-from mikej@paymentallianceintl.com) Received: from calvin.pai.local (calvin.pai.local [10.0.6.33]) by mx2.confluenttech.com (8.14.1/8.13.8) with ESMTP id m8ACwboS011916 for ; Wed, 10 Sep 2008 08:58:37 -0400 (EDT) (envelope-from mikej@paymentallianceintl.com) Authentication-Results: mx2.confluenttech.com from=mikej@paymentallianceintl.com; sender-id=neutral; spf=neutral X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: Wed, 10 Sep 2008 08:58:32 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: How to FSCK GEOM GELI image Importance: normal Priority: normal Thread-Index: AckQ+hSx466ByfxCQwOmXG2Ff9pO5gAuZicw From: "Michael Jung" To: Subject: How to FSCK GEOM GELI image X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2008 12:58:41 -0000 FreeBSD 6.3-RELEASE-p2 #15 I've been using the image for some time and was well until a UPS failure. Here is the script I use to mount the encrypted file image ++++++++++++ mdconfig -a -t vnode -f /home/staff/mikej/image md0 geli attach -k /etc/gli/image.key /dev/md0c mount /dev/md0c.eli /private ++++++++++++ It fails to mount and I see this is dmesg GEOM_ELI: Device md0c.eli created. GEOM_ELI: Encryption: AES-CBC 128 GEOM_ELI: Crypto: software WARNING: R/W mount of /private denied. Filesystem is not clean - run fsck ++++++++++++ So... I mount -ro mount -o ro /dev/md0c.eli /private (root@firewall) /home/staff/mikej/bin# fsck -t ufs /dev/md0c.eli ** /dev/md0c.eli (NO WRITE) ** Last Mounted on /private ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 16 files, 254176 used, 1034826 free (14 frags, 258703 blocks, 0.0% fragmentation) (root@firewall) /home/staff/mikej/bin# But this does not mark the file system clean. If I then un-mount /dev/md0c.eli it still refuses to mount R/W. (root@firewall) /private# df -h Filesystem Size Used Avail Capacity Mounted on /dev/twed0s1a 1.1T 883G 109G 89% / devfs 1.0K 1.0K 0B 100% /dev linprocfs 4.0K 4.0K 0B 100% /usr/compat/linux/proc devfs 1.0K 1.0K 0B 100% /var/named/dev /dev/md0c.eli 4.9G 993M 3.6G 21% /private (root@firewall) /private# When mount R/O I can read data fine. How do you fsck a GELI image? Thanks --mikej CONFIDENTIALITY NOTE: This message is intended only for the use of the individual or entity to whom it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, please notify us by telephone at (502) 212-4001 or notify us at PAI , Dept. 99, 11857 Commonwealth Drive, Louisville, KY 40299. Thank you.