From c023479413aa979f64be376305cdca99c573f1ce Mon Sep 17 00:00:00 2001 From: Porama6400 Date: Sun, 23 Oct 2022 12:07:13 +0700 Subject: [PATCH 1/5] update Docker data persistent commands --- Getting-Started.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Getting-Started.md b/Getting-Started.md index 1e2a2a4..d3c9cab 100644 --- a/Getting-Started.md +++ b/Getting-Started.md @@ -138,13 +138,23 @@ docker build --no-cache -t 'chrislusf/seaweedfs' . ### In production 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 # start our weed server daemonized docker run --name weed -d -p 9333:9333 -p 8080:8080 -p 18080:8080 \ -v /opt/weedfs/data:/data chrislusf/seaweedfs server -dir="/data" \ -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. Dont forget to specify "-publicIp" for correct connectivity. From 0242369392f1251f56c26d48f228f28ddb0682ab Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 23 Oct 2022 14:15:48 -0700 Subject: [PATCH 2/5] Updated FAQ (markdown) --- FAQ.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/FAQ.md b/FAQ.md index 9f21eb7..0d8740a 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1,3 +1,15 @@ +### 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. + +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, or increasing the `-max` value. + ### How to access the server dashboard? SeaweedFS has web dashboards for its different services: From 45708ebb1057fa76c49aa66aaa68157f33ac62d4 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 23 Oct 2022 14:17:33 -0700 Subject: [PATCH 3/5] Updated FAQ (markdown) --- FAQ.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index 0d8740a..fdf5913 100644 --- a/FAQ.md +++ b/FAQ.md @@ -4,11 +4,12 @@ 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. -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, or increasing the `-max` value. +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. ### How to access the server dashboard? SeaweedFS has web dashboards for its different services: From edde87760f2b037264a8596d132a38b9589631f9 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 23 Oct 2022 22:48:59 -0700 Subject: [PATCH 4/5] Updated FAQ (markdown) --- FAQ.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/FAQ.md b/FAQ.md index fdf5913..d18f5a2 100644 --- a/FAQ.md +++ b/FAQ.md @@ -9,6 +9,13 @@ 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. ### How to access the server dashboard? From fea563e30da1ecf0c67c472f5441108a2272d06a Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 25 Oct 2022 10:43:51 -0700 Subject: [PATCH 5/5] Updated FAQ (markdown) --- FAQ.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FAQ.md b/FAQ.md index d18f5a2..44c4cfe 100644 --- a/FAQ.md +++ b/FAQ.md @@ -18,6 +18,8 @@ Specifically, 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? SeaweedFS has web dashboards for its different services: