How to FSCK GEOM GELI image

Michael Jung mikej at
Wed Sep 10 12:58:41 UTC 2008

FreeBSD 6.3-RELEASE-p2 #15

I've been using the image for some time and was well until a UPS

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


So... I mount -ro

mount -o ro /dev/md0c.eli  /private
(root at 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%
(root at 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 at 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 at firewall) /private#

When mount R/O I can read data fine. How do you fsck a GELI image?



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.

More information about the freebsd-geom mailing list