mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-12-05 03:29:03 +08:00
Merge branch 'master' of https://github.com/chrislusf/seaweedfs.wiki
commit
ca693351d4
22
FAQ.md
22
FAQ.md
@ -1,3 +1,25 @@
|
|||||||
|
### How many volumes do I need?
|
||||||
|
|
||||||
|
The SeaweedFS volume here is different from common storage volume.
|
||||||
|
| SeaweedFS Volume | Common Volume |
|
||||||
|
| --- | --- |
|
||||||
|
| A disk file | A disk |
|
||||||
|
|
||||||
|
The following is all about SeaweedFS volumes.
|
||||||
|
|
||||||
|
SeaweedFS assumes there are many SeaweedFS volumes. Data placement, replication, collection, S3 buckets, TTL, CSI mount, etc, are all based on volumes. So if the error is `no free volumes left`, please add more volumes.
|
||||||
|
|
||||||
|
Specifically,
|
||||||
|
* A different replication would need a different set of volumes.
|
||||||
|
* A different collection would need a different set of volumes.
|
||||||
|
* A different TTL would need a different set of volumes.
|
||||||
|
* A different S3 bucket is mapped to a collection, would need a different set of volumes.
|
||||||
|
* A CSI mount is automatically mapped to a bucket, which needs a few volumes.
|
||||||
|
|
||||||
|
The default volume size is 30GB, and default to 8 volumes. Very likely you would need to customize a bit. Either through reducing the volume size in `weed master -volumeSizeLimitMB=xxx`, or increasing the `weed volume -max=xxx` value.
|
||||||
|
|
||||||
|
`-volumePreallocate` will preallocate disk spaces to volumes. These disk spaces are "taken" by the assigned volume, and could not be used by other volumes, even though the "df" command would report them as "free" if the volumes are not full.
|
||||||
|
|
||||||
### How to access the server dashboard?
|
### How to access the server dashboard?
|
||||||
SeaweedFS has web dashboards for its different services:
|
SeaweedFS has web dashboards for its different services:
|
||||||
|
|
||||||
|
@ -138,13 +138,23 @@ docker build --no-cache -t 'chrislusf/seaweedfs' .
|
|||||||
### In production
|
### In production
|
||||||
|
|
||||||
You can use docker volumes to persist data:
|
You can use docker volumes to persist data:
|
||||||
|
```bash
|
||||||
|
# start our weed server daemonized
|
||||||
|
docker run --name weed -d -p 9333:9333 -p 8080:8080 -p 18080:8080 \
|
||||||
|
-v seaweedvolume:/data chrislusf/seaweedfs server -dir="/data" \
|
||||||
|
-publicIp="$(curl -s cydev.ru/ip)"
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, you can mount a directory on the host machine into the container:
|
||||||
```bash
|
```bash
|
||||||
# start our weed server daemonized
|
# start our weed server daemonized
|
||||||
docker run --name weed -d -p 9333:9333 -p 8080:8080 -p 18080:8080 \
|
docker run --name weed -d -p 9333:9333 -p 8080:8080 -p 18080:8080 \
|
||||||
-v /opt/weedfs/data:/data chrislusf/seaweedfs server -dir="/data" \
|
-v /opt/weedfs/data:/data chrislusf/seaweedfs server -dir="/data" \
|
||||||
-publicIp="$(curl -s cydev.ru/ip)"
|
-publicIp="$(curl -s cydev.ru/ip)"
|
||||||
```
|
```
|
||||||
|
Note that according to [Docker's documentation](https://docs.docker.com/storage/volumes/), volumes are the preferred mechanism for persisting data.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Now our SeaweedFS server will be persistent and accessible by localhost:9333, :8080 and :18080 on host machine.
|
Now our SeaweedFS server will be persistent and accessible by localhost:9333, :8080 and :18080 on host machine.
|
||||||
Dont forget to specify "-publicIp" for correct connectivity.
|
Dont forget to specify "-publicIp" for correct connectivity.
|
||||||
|
Loading…
Reference in New Issue
Block a user