求助:多存储后端怎么配置Minio(兼容s3的存储)

单存储配置S3兼容的对象存储时可以这么配置, 使用minio测试成功。
[commit_object_backend]
name = s3
bucket = my-commit-objects
key_id = your-key-id
key = your-secret-key
host = 192.168.1.123:8080
path_style_request = true

不过S3不适合存很多小对象,想再配置一个本地文件系统测试小对象。官网资料的样例是这么配置的
[
{
“storage_id”: “hot_storage”,
“name”: “Hot Storage”,
“is_default”: true,
“commits”: {“backend”: “s3”, “bucket”: “seafile-commits”, “key”: “ZjoJ8RPNDqP1vcdD60U4wAHwUQf2oJYqxN27oR09”, “key_id”: “AKIAIOT3GCU5VGCCL44A”},
“fs”: {“backend”: “s3”, “bucket”: “seafile-fs”, “key”: “ZjoJ8RPNDqP1vcdD60U4wAHwUQf2oJYqxN27oR09”, “key_id”: “AKIAIOT3GCU5VGCCL44A”},
“blocks”: {“backend”: “s3”, “bucket”: “seafile-blocks”, “key”: “ZjoJ8RPNDqP1vcdD60U4wAHwUQf2oJYqxN27oR09”, “key_id”: “AKIAIOT3GCU5VGCCL44A”}
},

]

缺少关键的path_style_request、host等。 我手动加上测试不行,看错误日志没有正确的访问minio。

补充下, pro 版本10.0.9

seafile.log错误如下, 访问s3出错

2023-10-22 19:01:52 …/common/s3-client.c(929): [S3] libcurl failed to head seafile-comm:043f2c54-15be-45d1-b2b4-08333c2dc3f1/8a8fa7771302808e9117cf611769d426157e1609: Couldn’t connect to server.
2023-10-22 19:01:52 …/common/s3-client.c(929): [S3] libcurl failed to head seafile-comm:043f2c54-15be-45d1-b2b4-08333c2dc3f1/8a8fa7771302808e9117cf611769d426157e1609: Couldn’t connect to server.
2023-10-22 19:01:52 …/common/s3-client.c(929): [S3] libcurl failed to head seafile-comm:043f2c54-15be-45d1-b2b4-08333c2dc3f1/8a8fa7771302808e9117cf611769d426157e1609: Couldn’t connect to server.
2023-10-22 19:01:52 …/common/s3-client.c(704): [S3] libcurl failed to put seafile-comm:043f2c54-15be-45d1-b2b4-08333c2dc3f1/8a8fa7771302808e9117cf611769d426157e1609: Couldn’t connect to server.
2023-10-22 19:01:52 …/common/s3-client.c(704): [S3] libcurl failed to put seafile-comm:043f2c54-15be-45d1-b2b4-08333c2dc3f1/8a8fa7771302808e9117cf611769d426157e1609: Couldn’t connect to server.
2023-10-22 19:01:52 …/common/s3-client.c(704): [S3] libcurl failed to put seafile-comm:043f2c54-15be-45d1-b2b4-08333c2dc3f1/8a8fa7771302808e9117cf611769d426157e1609: Couldn’t connect to server.

host 等直接添加就行

感谢大佬解答,实际测试不行。麻烦帮我看看错误。这个minio配置不用多后端存储直接使用时ok的。

报错如下, 我直接curl 192.168.31.145:9220是能收到minio响应的,所以感觉还是没配置正确。 由于没有demo,也不知道该怎么配。
2023-10-23 11:13:02 …/common/s3-client.c(929): [S3] libcurl failed to head seafile-comm:2a553e07-5c26-4e47-a843-961a68142c6f/3fe3ed657165ad9c6e2f558a125b4770ecb77613: Couldn’t resolve host name.
2023-10-23 11:13:02 …/common/s3-client.c(929): [S3] libcurl failed to head seafile-comm:2a553e07-5c26-4e47-a843-961a68142c6f/3fe3ed657165ad9c6e2f558a125b4770ecb77613: Couldn’t resolve host name.
2023-10-23 11:13:02 …/common/s3-client.c(929): [S3] libcurl failed to head seafile-comm:2a553e07-5c26-4e47-a843-961a68142c6f/3fe3ed657165ad9c6e2f558a125b4770ecb77613: Couldn’t resolve host name.
2023-10-23 11:13:02 …/common/s3-client.c(704): [S3] libcurl failed to put seafile-comm:2a553e07-5c26-4e47-a843-961a68142c6f/3fe3ed657165ad9c6e2f558a125b4770ecb77613: Couldn’t resolve host name.
2023-10-23 11:13:02 …/common/s3-client.c(704): [S3] libcurl failed to put seafile-comm:2a553e07-5c26-4e47-a843-961a68142c6f/3fe3ed657165ad9c6e2f558a125b4770ecb77613: Couldn’t resolve host name.
2023-10-23 11:13:02 …/common/s3-client.c(704): [S3] libcurl failed to put seafile-comm:2a553e07-5c26-4e47-a843-961a68142c6f/3fe3ed657165ad9c6e2f558a125b4770ecb77613: Couldn’t resolve host name.

配置如下
[
{
“storage_id”: “s3”,
“name”: “S3 storage.”,
“is_default”: true,
“commits”: {
“backend”: “s3”,
“bucket”: “seafile-comm”,
“key_id”: “seafile-”,
“key”: “xxx”,
“host”: “192.168.31.145:9220”,
“region”: “cn”,
“path_style_request”: “true”
},
“fs”: {
“backend”: “s3”,
“bucket”: “seafile-fs”,
“key_id”: “seafile-”,
“key”: “xxx”,
“host”: “192.168.31.145:9220”,
“region”: “cn”,
“path_style_request”: “true”
},
“blocks”: {
“backend”: “s3”,
“bucket”: “seafile-blk”,
“key_id”: “seafile-”,
“key”: “xxx”,
“host”: “192.168.31.145:9220”,
“region”: “cn”,
“path_style_request”: “true”
}
},
{
“storage_id”: “unsafe_ssd”,
“name”: “Unsafe ssd”,
“is_default”: false,
“fs”: {
“backend”: “fs”,
“dir”: “/shared/seafile/seafile-data”
},
“commits”: {
“backend”: “fs”,
“dir”: “/shared/seafile/seafile-data”
},
“blocks”: {
“backend”: “fs”,
“dir”: “/shared/seafile/seafile-data”
}
}
]

s3是专业版功能, github上没有代码。 找不到s3-client.c 也无从debug。
希望大佬帮看看 @han-seafile

已解决,记录下相关问题。

  1. “path_style_request”: “true” 改为 “path_style_request”: true
  2. 之前的资料库不可用,因为没有存储后端信息。需要删了重建。 这个点建议优化。
1 个赞

谢谢分享 :heart:

您好,社区版可以使用吗

社区版不支持。