mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Updated weed shell (markdown)
parent
193ac3ae33
commit
255cd987f6
|
@ -24,6 +24,8 @@ Type: "help <command>" for help on <command>
|
||||||
fs.mv # move or rename a file or a folder
|
fs.mv # move or rename a file or a folder
|
||||||
fs.pwd # print out current directory
|
fs.pwd # print out current directory
|
||||||
fs.tree # recursively list all files under a directory
|
fs.tree # recursively list all files under a directory
|
||||||
|
lock # lock in order to exclusively manage the cluster
|
||||||
|
unlock # unlock the cluster-wide lock
|
||||||
volume.balance # balance all volumes among volume servers
|
volume.balance # balance all volumes among volume servers
|
||||||
volume.configure.replication # change volume replication value
|
volume.configure.replication # change volume replication value
|
||||||
volume.copy # copy a volume from one volume server to another volume server
|
volume.copy # copy a volume from one volume server to another volume server
|
||||||
|
@ -35,10 +37,9 @@ Type: "help <command>" for help on <command>
|
||||||
volume.move # move a live volume from one volume server to another volume server
|
volume.move # move a live volume from one volume server to another volume server
|
||||||
volume.tier.download # download the dat file of a volume from a remote tier
|
volume.tier.download # download the dat file of a volume from a remote tier
|
||||||
volume.tier.upload # upload the dat file of a volume to a remote tier
|
volume.tier.upload # upload the dat file of a volume to a remote tier
|
||||||
volume.unmount # unmount a volume from one volume server
|
volume.unmount # unmount a volume from one volume server```
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
```
|
```
|
||||||
$ weed shell
|
$ weed shell
|
||||||
|
@ -46,18 +47,28 @@ $ weed shell
|
||||||
block:2715 byte: 31895432 /objects
|
block:2715 byte: 31895432 /objects
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For most volume operations, you would need to prevent other possible concurrent operations. To do so, lock this way:
|
||||||
|
```
|
||||||
|
> lock
|
||||||
|
> volume.fix.replication
|
||||||
|
> volume.mount ...
|
||||||
|
> ...
|
||||||
|
> unlock
|
||||||
|
```
|
||||||
|
|
||||||
Another example: 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:
|
Another example: 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
|
# check any volume that are under replicated, and there are servers that meet the replica placement requirement
|
||||||
$ echo "volume.fix.replication -n " | weed shell
|
$ echo "lock; volume.fix.replication -n ; unlock" | weed shell
|
||||||
replicating volume 241 001 from localhost:8080 to dataNode 127.0.0.1:7823 ...
|
replicating volume 241 001 from localhost:8080 to dataNode 127.0.0.1:7823 ...
|
||||||
|
|
||||||
# found one, let's really do it
|
# found one, let's really do it
|
||||||
$ echo "volume.fix.replication" | weed shell
|
$ echo "lock; volume.fix.replication ; unlock" | weed shell
|
||||||
replicating volume 241 001 from localhost:8080 to dataNode 127.0.0.1:7823 ...
|
replicating volume 241 001 from localhost:8080 to dataNode 127.0.0.1:7823 ...
|
||||||
|
|
||||||
# all volumes are replicated now
|
# all volumes are replicated now
|
||||||
$ echo "volume.fix.replication -n" | weed shell
|
$ echo "lock; volume.fix.replication -n ; unlock" | weed shell
|
||||||
no under replicated volumes
|
no under replicated volumes
|
||||||
|
|
||||||
```
|
```
|
Loading…
Reference in a new issue