Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error requesting encryption key #93

Closed
godofdream opened this issue Mar 25, 2020 · 2 comments
Closed

error requesting encryption key #93

godofdream opened this issue Mar 25, 2020 · 2 comments

Comments

@godofdream
Copy link

Kernel 5.4.28
bachefs version f858cdd
bcachefs-tools version 096f2ec00ed6165894aa3218fa5a7ab7a6c3c9e1

`
msowka@homeserver:/$ sudo bcachefs format --encrypted --errors=remount-ro --gc_reserve_bytes=40000000 --label=bcachefs /dev/sd[he]
[sudo] Passwort für msowka:
Enter passphrase:
Enter same passphrase again:
/dev/sdh contains a btrfs filesystem labelled 'new'
Proceed anyway? (y,n) y
External UUID: a2feb5ce-7d1e-449a-b3fd-b9aaf32c1ed8
Internal UUID: 123a3af5-6971-45b1-8a7b-0e3f9d905cb4
Label: bcachefs
Version: 10
Created: Wed Mar 25 17:06:11 2020
Block_size: 4.0K
Btree node size: 256.0K
Error action: remount-ro
Clean: 0
Features:
Metadata replicas: 1
Data replicas: 1
Metadata checksum type: crc32c (1)
Data checksum type: crc32c (1)
Compression type: none (0)
Foreground write target: none
Background write target: none
Promote target: none
String hash type: siphash (2)
32 bit inodes: 0
GC reserve percentage: 8%
Root reserve percentage: 0%
Devices: 2 live, 2 total
Sections: members,crypt
Superblock size: 936

Members (size 120):
Device 0:
UUID: 5e7bad86-d1f3-4f06-8ebd-bdf89058c7a3
Size: 10.9T
Bucket size: 512.0K
First bucket: 0
Buckets: 22888447
Last mount: (never)
State: readwrite
Group: (none)
Data allowed: journal,btree,data
Has data: (none)
Replacement policy: lru
Discard: 0
Device 1:
UUID: 795590e7-aeed-4e89-b422-2e18f7a4c3f7
Size: 10.9T
Bucket size: 512.0K
First bucket: 0
Buckets: 22888448
Last mount: (never)
State: readwrite
Group: (none)
Data allowed: journal,btree,data
Has data: (none)
Replacement policy: lru
Discard: 0
msowka@homeserver:/$ sudo bcachefs unlock /dev/sdh
Enter passphrase:
msowka@homeserver:/$ sudo bcachefs unlock /dev/sde
Enter passphrase:
msowka@homeserver:~/bcachefs/bcachefs-tools$ sudo mount -t bcachefs /dev/sdh:/dev/sde /mnt/bcachefs/
[sudo] Passwort für msowka:
mount: /mnt/bcachefs: mount(2) system call failed: Nicht genügend Hauptspeicher verfügbar. #### Not enough RAM

sudo dmesg
#################
[ 7373.686888] bcachefs (a2feb5ce-7d1e-449a-b3fd-b9aaf32c1ed8): error requesting encryption key: -126
`

I have issues creating an encrypted disk and mounting it with current master.
I have build bcachefs without acl, quota, etc. but with debuging activated.

any hints how I can debug encryption?
Is encrpytion ready at all?

@hyperfekt
Copy link

Sounds like NixOS/nixpkgs#32279. Try adding session required pam_keyinit.so force revoke to the relevant PAM configuration files.

@clonejo
Copy link

clonejo commented Jul 20, 2020

I get the same errors, running 5.7.8-arch1-1-bcachefs-git-256266-g2c71b506e567 built using https://aur.archlinux.org/pkgbase/linux-bcachefs-git/ (2c71b50), bcachefs-tools b867ddadb35c.

bcachefs unlock seems to work, it does ask for a passphrase and throws an error if it's wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants