Created weed shell (markdown)

Chris Lu 2019-03-23 14:14:10 -07:00
parent 8fc1395c53
commit 206887f1d2

33
weed-shell.md Normal file

@ -0,0 +1,33 @@
`weed shell` starts an interactive console to do some maintenance operations.
Here are some operations currently support
* For master and volume servers
* list all collections
* list all volumes
* fix volumes that are under replicated
* For filer
* show disk usage for a folder or file
For example:
```
$ weed shell
> fs.du http://localhost:8888/some/
block: 4 byte: 4012896 /some/path
block: 5 byte: 4700786 /some
```
Sometimes one of your volume server may go down, and a new volume server is added. Here is the command you can run to fix volumes that are under replicated:
```
# check any volume that are under replicated, and there are servers that meet the replica placement requirement
$ echo "volume.fix.replication -n " | weed shell
replicating volume 241 001 from localhost:8080 to dataNode 127.0.0.1:7823 ...
# found one, let's really do it
$ echo "volume.fix.replication" | weed shell
replicating volume 241 001 from localhost:8080 to dataNode 127.0.0.1:7823 ...
# all volumes are replicated now
$ echo "volume.fix.replication -n" | weed shell
no under replicated volumes
```