Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
sticnarf committed Aug 23, 2018
1 parent 50013fb commit 4585ba2
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 141 deletions.
222 changes: 96 additions & 126 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ members = [
"dkfs",
"mkdk",
"mtdk"
]
]
53 changes: 44 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,60 @@
Donkey is a simple and naive file system for purposes of learning.
**Performance or reliability is never taken into consideration.**

This project contains:

* `dkfs`: Library that supports `mkdk` and `mtdk`.
* `mkdk`: Binary to make a donkey file system.
* `mtdk`: Binary to mount a donkey file system.
It has passed [pjdfstest](https://github.com/pjd/pjdfstest/) for correctness.

## Build

Rust 1.28 or above is required in order to build this project.

`pkg-config` and `libfuse-dev` are needed to build `mtdk`.
`pkg-config` and libfuse 2.x headers are needed to build `mtdk`.

Prebuilt binaries are available in the [releases section](https://github.com/sticnarf/donkey-fs/releases).

## Usage
## Format

`mkdk` is the format tool.

The `device` argument accepts regular files or block special files.

The size of a block device is automatically detected.

You can specify your own bytes/inode ratio for the file system.
Pay attention that this ratio cannot be modified after formatting.

```
USAGE:
mkdk [OPTIONS] <device>
OPTIONS:
-i <bytes-per-inode> Specify the bytes/inode ratio [default: 16384]
ARGS:
<device> Path to the device to be used
```

## Mount

Although this file system is not designed to depend on Linux FUSE,
the only way to mount a donkey file system now is to use `mtdk` with libfuse 2.x.

So you must install libfuse 2.x (`libfuse2` on Debian/Ubuntu) before running `mtdk`.

Note that `allow_other` option is enabled, so non-root users cannot mount using `mtdk`
unless you uncomment the `user_allow_other` line in `/etc/fuse.conf`.

```
USAGE:
mtdk <device> <dir>
Run `mkdk --help` or `mtdk --help` for usage.
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
Fuse 2.x library should be installed if you use `mtdk`.
ARGS:
<device> Path to the device to be used
<dir> Path of the mount point
```

## Limitations

Expand Down
2 changes: 1 addition & 1 deletion dkfs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dkfs"
version = "0.1.0"
version = "0.1.1"
authors = ["Yilin Chen <[email protected]>"]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion mkdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mkdk"
version = "0.1.0"
version = "0.1.1"
authors = ["Yilin Chen <[email protected]>"]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion mkdk/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn main() -> DkResult<()> {

let bpi = format!("{}", DEFAULT_BYTES_PER_INODE);
let matches = App::new("mkdk")
.version("0.1")
.version("0.1.1")
.author("Yilin Chen <[email protected]>")
.about("Make a donkey file system")
.arg(
Expand Down
2 changes: 1 addition & 1 deletion mtdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mtdk"
version = "0.1.0"
version = "0.1.1"
authors = ["Yilin Chen <[email protected]>"]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion mtdk/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() -> DkResult<()> {
use clap::*;

let matches = App::new("mtdk")
.version("0.1")
.version("0.1.1")
.author("Yilin Chen <[email protected]>")
.about("Mount a donkey file system")
.arg(
Expand Down

0 comments on commit 4585ba2

Please sign in to comment.