bcachefs-tools/rust-src
Colin Gillespie 4d04fe4262 cmd_mount: use the correct keyring key type
Mount is checking for and adding encryption keys using the logon key
type instead of the user key type. This was causing it to not be able to
unlock volumes on its own, and ask for a passphrase on already unlocked
volumes.

Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
2023-08-12 12:06:24 -04:00
..
bch_bindgen Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshots 2023-05-02 00:41:47 -04:00
src cmd_mount: use the correct keyring key type 2023-08-12 12:06:24 -04:00
.gitignore
Cargo.lock rust: Filesystem options now supported 2023-02-28 06:15:48 -05:00
Cargo.toml ci: set and verify MSRV 2023-08-04 20:13:38 +02:00
README.md
rustfmt.toml

Usage

bcachefs-mount 0.1.0
Mount a bcachefs filesystem by its UUID

USAGE:
    bcachefs-mount [OPTIONS] <uuid> <mountpoint>

FLAGS:
    -h, --help       
            Prints help information

    -V, --version    
            Prints version information


OPTIONS:
    -o <options>                 
            Mount options [default: ]

    -p, --password <password>    
            Where the password would be loaded from.
            
            Possible values are: "fail" - don't ask for password, fail if filesystem is encrypted; "wait" - wait for
            password to become available before mounting; "ask" -  prompt the user for password; [default: fail]

ARGS:
    <uuid>          
            External UUID of the bcachefs filesystem

    <mountpoint>    
            Where the filesystem should be mounted

Caveats

  • --password ask is not yet implemented, but you can use --password wait, and load the key with bcachefs unlock.

Build

$ git submodule update --init --recursive
$ cargo build --release

Binary will be built in target/release/bcachefs-mount

Dependencies:

  • rust
  • blkid
  • uuid
  • liburcu
  • libsodium
  • zlib
  • liblz4
  • libzstd
  • libkeyutils