geli partition accepts passphrase but won't mount [SOLVED]
John
freebsd-lists at potato.growveg.org
Sat Apr 25 10:53:49 UTC 2015
On Fri, Apr 24, 2015 at 11:52:49PM +0100, John wrote:
> Hello,
>
> I'm running 11.0-CURRENT #0 r281867. I've followed the instructions
> given at
> https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/disks-encrypting.html
> section 18.12.2.
>
> I was able to create the encrypted slice and mount it. I transferred
> some documents to that drive for safekeeping and unmounted it. Updated
> the machine and added these lines to the kernel:
>
> options GEOM_ELI
> device crypto
>
> but before I could rebuild the system later, it (some hours after this)
> went into a hard lock. Powering off then on again rebooted the system
> and from there I was able to run buildworld and friends. Rebooted again,
> now trying to mount the disk:
>
> root@:~ # geli attach -k /root/da0p1.key /dev/da0p1
> Enter passphrase:
> root@:~ #
>
> root@:~ geli status
> Name Status Components
> da0p1.eli ACTIVE da0p1
>
> Trying to mount it, this happens:
>
> root@:~ # mount /dev/da0p1.eli /mnt
> mount: /dev/da0p1.eli: Invalid argument
>
> I think this needs fsck but I get
>
> root@:~ # fsck -p -t ffs /dev/da0p1.eli
> Cannot find file system superblock
>
> What can I do?
In the grand tradition of replying to my own question, thought I'd post
what fixed this.
For some reason, I had both a /dev/da0p1.key and a /dev/da0.key. Both
were the same. Firstly tried restoring the metadata for /dev/da0p1.eli.
Was able to attach but failed mount. Then had the idea of restoring from
/var/backups/da0.eli. Then tried to attach da0.key but this time it gave
a better error message that said unable to mount r/w because the
filesystem was dirty. So I ran fsck_ffs -y /dev/da0.eli and from there
(after fixing lots of incorrect block count errors) I was able to mount
da0.eli and read/write to it.
da0p1.eli I think was made because the initial format of the disk gave
da0p1. But looking back at the time before this that the disk was
successfully mounted (in the system log emails) the disk appeared as
/dev/da0.eli.
*whew!*
--
John
More information about the freebsd-current
mailing list