免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 24668600 | 回复: 24668600

[FastDFS] 一台机器上面启动多个storage [复制链接]

论坛徽章:
0
发表于 2012-12-28 10:02 |显示全部楼层
我需要在1台机器上面启动多个storage。有一个问题请教。
我将storage.conf的端口一个设置为23000,一个设置为23001,
在启动的时候分别指定storage.conf文件,例如:
fdfs_storaged /etc/fdfs/storage1.conf
fdfs_storaged /etc/fdfs/storage2.conf
到这里都没有任何问题。

但是在集成nginx后,问题出现了,
在mod_fastdfs.conf文件里面,设置storage_server_port=23000
那么剩下的一个23001,如何设置?
group_name又该如何设置?

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
发表于 2012-12-28 11:32 |显示全部楼层
nginx和apache扩展模块模块暂时不支持多个group,只能支持一个group。
后续会考虑支持多个group,敬请期待!

论坛徽章:
0
发表于 2013-01-05 11:28 |显示全部楼层
看来只能通过nginx做一个负载,在fastdfs的nginx前面在搭建一台nginx来实现。

论坛徽章:
0
发表于 2013-01-06 19:07 |显示全部楼层
本帖最后由 yayu_myself 于 2013-01-06 19:15 编辑

最新的nginx 模块的1.4似乎多了多组的支持,不过感觉好像不是LZ提到的这个

配置文件中有

# set the group count
# set to none zero to support multi-group
# set to 0  for single group only
# groups settings section as [group1], [group2], ..., [groupN]
# default value is 0
# since v1.14
group_count = 0

# group settings for group #1
# since v1.14
# when support multi-group, uncomment following section
#[group1]
#group_name=group1
#store_path_count=2
#store_path0=/home/yuqing/fastdfs
#store_path1=/home/yuqing/fastdfs1

# group settings for group #2
# since v1.14
# when support multi-group, uncomment following section as neccessary
#[group2]
#group_name=group2
#store_path_count=1
#store_path0=/home/yuqing/fastdfs






我现在也是多组配置的问题,有多个storage:

storage1   group1  192.168.19.117
storage2   group2  192.168.19.116

现在只在 storage1上装了 nginx和扩展模块:
  1.          location /M00 {
  2.              root /home/fastdfs/data;
  3.              ngx_fastdfs_module;
  4.          }
复制代码
这样只能访问117上的storage,如何配置可以让nginx访问到 116上group2的文件。

论坛徽章:
0
发表于 2013-01-07 14:20 |显示全部楼层
不是组的概念。

是指一台机器上面启动多个storage,每个storage端口不一样,导致集成nginx后,mod_fastdfs.conf文件里面的端口无法指定。

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
发表于 2013-01-07 17:15 |显示全部楼层
回复 5# payend

用nginx就不需要storage server端口了。
当文件在本地不存在时,会走nginx的proxy模块去请求源storage server上的nginx。

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
发表于 2013-09-12 19:27 |显示全部楼层
回复 2# happy_fish100


那如何按group来横向扩展存储的容量?

   

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
发表于 2013-09-12 19:38 |显示全部楼层
happy_fish100 发表于 2013-01-07 17:15
回复 5# payend

用nginx就不需要storage server端口了。




用nginx就不需要storage server端口了---没看懂这个

论坛徽章:
0
发表于 2013-12-18 12:17 |显示全部楼层
就是nginx不回去访问storage的server端口取文件,而是直接看本机硬盘上是否存在文件

论坛徽章:
0
发表于 2014-02-13 20:12 |显示全部楼层
我在一台机器上部署了2个storage,结果只有一个storage有效,另一个虽然进程是在的,但是文件不会上传到第二storage,通过fdfs_monitor查看就只有一个storage,请问一下,一台机器上真的能配置2个storage,有人成功过吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP