2023-12-03 02:08:29 +00:00
|
|
|
# datashake - level out zpools by rewriting files
|
|
|
|
|
|
|
|
## Background
|
|
|
|
|
2023-12-07 02:33:26 +00:00
|
|
|
See [this blog post](https://blog.humancabbage.net/posts/datashake) for the
|
|
|
|
motivation behind this program. Basically, this program copies files back-and-
|
|
|
|
forth between ZFS datasets to attempt to address unbalanced utilization among
|
|
|
|
vdevs.
|
2023-12-03 02:08:29 +00:00
|
|
|
|
2023-12-07 02:33:26 +00:00
|
|
|
## Usage
|
2023-12-03 02:08:29 +00:00
|
|
|
|
2023-12-07 02:33:26 +00:00
|
|
|
```text
|
|
|
|
$ datashake --source /tank/stuff --temp /tank/temp --concurrency 2
|
|
|
|
```
|
2023-12-03 02:08:29 +00:00
|
|
|
|
2023-12-07 02:33:26 +00:00
|
|
|
## Shortcomings
|
2023-12-03 02:08:29 +00:00
|
|
|
|
2023-12-07 02:33:26 +00:00
|
|
|
* The way actions and errors are logged in-memory and only persisted at the
|
|
|
|
end is not robust enough. Program crashes or system power loss can cause
|
|
|
|
files to be lost in the temporary directory. In the meantime, the program
|
|
|
|
still writes to `stdout` for each copy operation, so piping the output to
|
|
|
|
`tee` should suffice for now.
|