免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3192 | 回复: 0
打印 上一主题 下一主题

[GlusterFS] GlusterFS文档翻译 - GlusterFS Translators v1.3 中文化 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-15 10:15 |只看该作者 |倒序浏览

                说明
本人能力有限,如果翻译过来的内容使你产生疑惑,请见原始文档:
http://www.gluster.org/docs/index.php/GlusterFS_Translators_v1.3
性能相关的translators
当client端和server端都加载时,性能相关的translators会工作的很好。记住:'io-threads' 工作的级别要比所有性能相关的translator要低才会有预想的效果。
Read Ahead Translator (预读)
基于预设值,read-ahead
会顺序地预取一些块。当你的应用忙于处理一些数据的时候,GlusterFS能够预读下一批等待处理的数据。这样能够使的读取操作更加流畅和迅速。而且,
工作起来像一个读的集合器一样(read-aggregator),也就是说,将大量的、零散的读取操作集合成少量的、大一些的读操作,这样,减小了网络
和磁盘的负载。page-size 描述了块的大小。page-count 描述了预读块的总数量。
volume readahead
  type performance/read-ahead
  option page-size 128kB        # 256KB is the default option
  option page-count 4           # 2 is default option
  option force-atime-update off # default is off
  subvolumes
end-volume
注意: 这个translator比较适合于应用在IB-verbs transport环境里。在百兆和千兆以太网接口、没有read-ahead的环境下,能够达到这种连接的最高速度。
Write Behind Translator (后写)
通常情况下,写操作会比读要慢。通过使用"aggregated background write"技术,write-behind
translator
相当显著地改善了写的性能。更确切地说,大量小的写操作被集中起来,形成少量的、大一些的写操作,并且进行后台写处理(non-blocking)。后写
方式在client端上聚合了写操作,减小了必须传递的网络包数量。在server端,它帮助服务器优化写的磁盘寻道时间。
aggregate-size
该选项决定了在汇聚写操作之前块的大小。参照你的连接速度、RAM的大小,以及工作负载情况,你可以调整这个值。默认的,该值为128KB,能够比较好的
满足大多数应用情况。无限制的增加和减小这个值可能会带来性能上的降低。你可以逐渐调整和分析,慢慢找出一个最优化的结果。
flush-behind 该选项也同样是为了提升处理大量小文件的性能。在这个选项里close()/flush()能够被堆到后台,允许客户端去处理下一个请求。默认值是off
volume writebehind
  type performance/write-behind
  option aggregate-size 1MB # default is 0bytes
  option flush-behind on    # default is 'off'
  subvolumes
end-volume
注意: 通常情况下,protocol translator对于一个请求或者转发的数据包有一个4MB的上限。因此,如果你在client端用了上面的write-behind(大多数会如此),并且aggregate-size大于4MB,他也不会发出大的数据包。
Threaded I/O Translator
AIO增加了异步(后台)读写的功能。通过加载这个translator,你可以利用server的空闲时间去处理新的任务。当server在
DMA方式处理读或者写操作的时候,CPU、内存或者网络并没有被使用。这个translator可以将资源更好的利用起来去处理和增加当前的I/O性
能。
volume iothreads
  type performance/io-threads
  option thread-count 4  # deault is 1
  option cache-size 32MB #64MB
  subvolumes
end-volume
注意:
  • io-threads translator 只有在unify之上或者在Server protocol之下才会有效果。如果在unify和namespace brick之间,因为没有文件io的处理,所以不会有效果。
  • 'thread-count'小于或等于你的CPU数量。
    IO-Cache Translator
    IO-Cache translator 如果在client端被加载,能够帮助减小server的负载(如果client正在读一些文件,而且这个文件在两次读操作期间没有被修改)。举个例子,在编译内核时所需要访问的头文件。
    volume io-cache
      type performance/io-cache
      option cache-size 64MB             # default is 32MB
      option page-size 1MB               #128KB is default option
      option priority *.h:3,*.html:2,*:1 # default is '*:0'
      option force-revalidate-timeout 2  # default is 1
      subvolumes
    end-volume
    Booster Translator
    同样的,GlusterFS是一个userspace文件系统,它使用FUSE模块去get the fops,许多使用者会问"难道没有一种方法能够消除使用fuse这种上层结构吗?"
    尽管使用FUSE作为上层的理由很小,就像网络的上层结构,但是,他对处理大的文件I/O会很有帮助。因此Gluster团队提供了Booster
    translator作为处理文件I/O的一种方法。使用booster
    translator,可以带来更高的吞吐。它能够在client或者server端被加载。
    注意: booster translator需要预先加载"glusterfs-booster.so".
    volume booster
      type performance/booster
    # option transport-type tcp # Default is 'unix', which is only used when booster is loaded on client side.
    # when used on server side, it does take all the options of client protocol and server protocol.
      subvolumes
    end-volume
    注意: 通常情况下,这个没有考虑过小文件,一旦我们使用booster测试了,我们会推荐应用在这种场景里。
    集群\聚合相关的Translators
    Automatic File Replication Translator (AFR)
    AFR
    提供了与RAID-1相似的功能。AFR将文件和目录进行复制,存放到subvolume里。所以,如果AFR有4个subvolume,他就会把文件和
    目录复制4份。AFR提供了HA高可用。当一个subvolume失效(比如,服务器宕机、网络失效等),AFR会继续服务,从其他副本中响应请求。
    AFR同时也提供了自我恢复的功能。假设失效的AFR节点重新恢复了,将会从其他节点自动同步到最新的数据。AFR使用扩展特性,后台跟踪文件和目录的版本已完成自我恢复功能。
    注意: 以前支持的"option replicate *html:2,*txt:1" 匹配方式已经从AFR里取消。由Unify的switch.case调度器替代。
    volume afr-example
      type cluster/afr
      subvolumes brick1 brick2 brick3
      # option debug on         # turns on detailed debug messages in log by default is debugging off
      # option self-heal off    # turn off self healing default is on
      # option read-subvolume brick2   # by default reads are scheduled from all subvolumes      
    end-volume
    这个配置例子描述:将所有的文件和目录在brick1、brick2、brick3上同时存放。subvolume可以是其他类型(storage/posix or protocol/client).
    注意: AFR需要在底层文件系统支持extended attribute
    参考 "GlusterFS文档翻译 - Understanding AFR Translator 中文化" 了解更多volume的配置文件和设计样例。
    Stripe Translator
    striping translator根据你的设计,将文件进行条带化处理,并存放到给定的块大小(默认是128K)的subvolumes(或者他的子节点)上。
    注意: Stripe需要在底层文件系统支持extended attribute
    volume stripe
       type cluster/stripe
       option block-size *:1MB
       subvolumes brick1 brick2 brick3 brick4
    end-volume
    Unify Translator
    Unify translator合并了多个存储bricks形成一个大的快速的存储空间。你可以绑定你首选的I/O调度器到unify volume。你可以有多种I/O调度器选择,这个要看你的应用环境。
    参见 (
    http://www.gluster.org/docs/index.php/Understanding_Unify_Translator
    ) 了解更多有关于unify translator的信息。
    volume unify
       type cluster/unify
       subvolumes brick1 brick2 brick3 brick4 brick5 brick6 brick7 brick8
       option namespace brick-ns # should be a node which is not present in 'subvolumes'
       option scheduler rr    # simple round-robin scheduler
    end-volume
    注意:
    '1.3.0-pre5'之前的版本,unify translator有一个选项叫'option namespace'。它可以被当作一个empty export,它可以被重建出必要的数据,就像unify也有自我恢复功能一样。
    GlusterFS Schedulers
    Scheduler依靠负载、有效性和其他因素,决定了如何在聚合的文件系统中去分布一个新的create操作。下面是一个可供你选择的I/O schedulers列表...
    ALU Scheduler
    ALU即"Adaptive Least Usage"。它是GlusterFS里最高级的调度器。他通过多个纬度的计算来负载均衡访问。通过配置,他会调整自己的I/O模式。当配置适当时,它能够在现有文件系统上发挥很好的负载均衡效果。
    ALU scheduler由多种算法子调度器组成。每一个子掉调度器反映出每个subvolume的某一方面的负载情况:* disk-usage - volume的disk空间占用情况
    • read-usage - volume的读操作数量
    • write-usage - volume的写操作数量
    • open-files-usage - volume当前打开的文件数量
    • disk-speed-usage - disk的工作速度,这个值是固定的,非常有用。

    ALU scheduler需要知道以上哪些子调度器要使用,以什么样的顺序来使用。这个依赖"option alu.order"的配置。
    每一个子调度器都需要知道两件事:什么时候启动(the entry-threshold)?多长时间去等待(the exit-threshold)?
    举个例子:当unify了3个100GB的磁盘,通过disk-usage来保持精确的平衡是没有必要的。替代的,如果有1GB的空闲空间,要决策哪一个
    来提供时,就可以用到read-usage调度器。disk-usage调度器处理告诉处理在只有当某一阈值的差异是多少时通过,比如1GB。假设当这个
    条件满足时,他会将后续的数据都写入到最少使用的volume里。他这样处理,当低于entry-threshold阀值是不明智的,因为这将非常快地再
    次发生同样情况。这样的情形会引起ALU过渡的消耗在disk-usage的调度上,这对其他的子调度器是不公平的。exit-threshold的原因
    定义了将要被写入到最闲磁盘的数据总量。
    除sub-schedulers之外,ALU还含有"limits"选项。当小于一定的阀值时,它能够停止在volume上建立新文件的动作。举个例子:设置"option alu.limits.min-free-disk 5GB"将会在空间不足5GB的情况下停止对这个volume的调度。
    实际的值要参照你的实际使用环境来定义。比如是否你有些文件增长很迅速,你想要在快速增长的文件在建立之前提早停止该文件在磁盘上的创建动
    作。相对于read-usage的负载均衡,如果你不是很关注disk-usage的均衡,你可以定一个大一些的disk-usage调度阀值和一个小一
    些的read-usage阀值。
    至于阀值的设定大小,允许设置空间大小的百分比。举个例子:"option alu.limits.min-free-disk 5%".
    • ALU 调度器的例子

    volume bricks
      type cluster/unify
      subvolumes brick1 brick2 brick3 brick4 brick5
      option alu.read-only-subvolumes brick5 # 这里把brick5设置成了只读,新的文件将不会存进去。
      option scheduler alu   # 使用ALU调度器
      option alu.limits.min-free-disk  5% # 当空间小于5%的时候不要再放新的文件。
      option alu.limits.max-open-files 10000 # 当超过10000个文件被打开始,不要再放新的文件。
      
      # 当要决定把文件放到哪里时,首先评估磁盘的disk-usage情况,然后是read-usage、write-usage、open files,以及最后一项disk-speed-usage.
      option alu.order disk-usage:read-usage:write-usage:open-files-usage:disk-speed-usage
      option alu.disk-usage.entry-threshold 2GB   # 如果volume之间的差异超过2GB时启动。
      option alu.disk-usage.exit-threshold  60MB   # 当差异不足1988MB时不要停止写入到最闲磁盘
      option alu.open-files-usage.entry-threshold 1024 # 如果打开文件的差异达到1024时启动
      option alu.open-files-usage.exit-threshold 32   # 当差异不足992时不要停止写入到最闲磁盘
      # option alu.read-usage.entry-threshold 20%   # 当read-usage差异达到20%时启动
      # option alu.read-usage.exit-threshold 4%   # 当差异增长到16%(20% - 4%)不要停止
      # option alu.write-usage.entry-threshold 20%   # 当write-usage差异到20%时启动
      # option alu.write-usage.exit-threshold 4%   # 当差异增长到16%时不要停止
      # option alu.disk-speed-usage.entry-threshold # 不要设定这个,磁盘速度是固定的!!!
      # option alu.disk-speed-usage.exit-threshold  # 不要设定这个,磁盘速度是固定的!!!
        option alu.stat-refresh.interval 10sec   # 每10秒钟刷新一次决策数据
      # option alu.stat-refresh.num-file-create 10   # 每创建10个文件时刷新一次决策数据
    end-volume
    NUFA Scheduler
    与非对称文件系统调度类似的NUMA (
    http://en.wikipedia.org/wiki/Non-Uniform_Memory_Access
    ) 内存设计。它主要应用在需要运行文件系统server和client的集群的HPC高性能计算环境中。在大多数环境里,NUFA调度器使得本地文件系统优先于其他节点执行文件新建操作。
    volume posix1
      type storage/posix               # POSIX FS translator
      option directory /home/export    # Export this directory
    end-volume
    volume bricks
      type cluster/unify
      subvolumes posix1 brick2 brick3 brick4
      option scheduler nufa
      option nufa.local-volume-name posix1
      option nufa.limits.min-free-disk 5%
    end-volume
    注意: NUFA目前已经可以支持更多的本地volume选项。
    Random Scheduler
    随机调度器使用随机数发生器选择brick来创建文件。
    volume bricks
      type cluster/unify
      subvolumes brick1 brick2 brick3 brick4
      option scheduler random
      option random.limits.min-free-disk 5%
    end-volume
    Round-Robin Scheduler
    Round-Robin (RR)
    调度器轮转的创建文件。每一个client都将有它自己的RR循环。当你的大部分文件的大小和I/O访问方法相近的时候,这个调度器是一个非常好的选择。
    RR调度器在调度前会检查server的硬盘空间,所以你能够知道什么时候应该添加更多的brick了。默认的,当create操作发生时,min-
    free-disk的值是5%,每10秒钟检查一次。
    volume bricks
      type cluster/unify
      subvolumes brick1 brick2 brick3 brick4
      option scheduler rr
      option rr.read-only-subvolumes brick4  # brick4只读
      option rr.limits.min-free-disk 5%          # Unit in %
      option rr.refresh-interval 10               # 10秒钟检查一次brick10s
    end-volume
    Switch Scheduler
    Switch调度器在GlusterFS里是最后一个被加上的,他按照文件名字符串来匹配并调度。
    volume bricks
      type cluster/unify
      subvolumes brick1 brick2 brick3 brick4 brick5 brick6 brick7
      option scheduler switch
      option switch.case *jpg:brick1,brick2;*mpg:brick3;*:brick4,brick5,brick6
      option switch.read-only-subvolumes brick7
    end-volume
    上面是一个在unify环境里启用的例子。在这里,如果文件名含有jpg的话,就会被存放到brick1和brick2,如果含有mpg的话,就会
    存放到brick3,其他文件将会存放到brick4、brick5、brick6。brick7被设置为只读的subvolume,它里面的数据只能用
    来读取。
    Debug translators
    用来调试文件系统的translators。
    trace
    Trace
    translator是为了处理更广泛细致的跟踪调试信息。调试信息被写道GlusterFS的log文件里,该文件默认存放在/var/log
    /gluster/glusterfs.log。跟踪调试一个volume可以被插入或置顶在任何一个你想要调试的volume里。所有的请求和访问都会
    被记录下来。
    ### Export volume "brick" with the contents of "/home/export" directory.
    volume brick
      type storage/posix                   # POSIX FS translator
      option directory /home/export        # Export this directory
    end-volume
    ### Trace storage/posix translator.
    volume trace
      type debug/trace
      subvolumes brick
    #  option include open,close,create,readdir,opendir,closedir
    #  option exclude lookup,read,write
    end-volume
    注意: 如果想要通过这个translator来跟踪少量的几个访问,要使用"option include ",如果想跟踪大多数的访问,但也想排出一小部分,要使用"option exclude ".
    扩展功能的Translators
    filter
    高级过滤translator机遇文件名或者文件属性。通常情况下它只支持只读的export选项。
    volume brick-readonly
      type features/filter
      subvolumes brick
    end-volume
    posix-locks
    这个translator提供了storage不依赖的POSIX record locking support (fcntl
    locking)。代表性的,你想要在server端加载这个translator,只需要在POSIX storage
    translator之上。使用这个translator你可以获得提示性locking和强制性locking的支持。
    volume locks
      type features/posix-locks
      subvolumes brick
    end-volume
    注意:考虑没有打开强制性locking bits的文件(+setgid, -group
    execution)。假设那个文件现在被具有write-behind
    xlator特点的client端的一个操作打开。为了避免不一致,当一个文件激活强制性locking,write-behind
    xlator不会缓存关于他的任何信息。假设另一个client现在激活了这个文件的强制性locking。之前的client不会知道这个更
    新,write-behind可能错误的报告写入成功,而实际上写的操作因为被lock而失败了。
    这看起来不太容易解决。围绕这个问题,有个建议是你在一个文件打开的时候不要激活强制位。
    trash
    这个translator提供了一个'libtrash'类似的功能(或者有些人称之为recyclebin)。这个translator用在server端是最好的。
    volume trash
      type features/trash
      option trash-dir /.trashcan
      subvolumes brick
    end-volume
    fixed-id
    这个translator提供了一个功能,在所有的调用通过这一层时将修改UID和GID。
    volume fixed
      type features/fixed-id
      option fixed-uid 1000
      option fixed-gid 100
      subvolumes brick
    end-volume
    Storage translators
    posix
    GlusterFS依靠基于磁盘文件系统(比如ext2, ext3, xfs, reiserfs, etc)来执行块设备的管理。这个POSIX的translator将GlusterFS服务器绑定到底层的文件系统上。
    volume posix1
      type storage/posix               # POSIX FS translator
      option directory /home/export    # Export this directory
    end-volume
    Berkeley DB
    针对解决在一个目录里的数百万或者数十亿的小文件问题,或者,这些文件没有被存放于每一个目录中,他们会被保存在一个内部的数据库文件(glusterfs-storage.db)里。这里会有一个目录树,每个目录有一个数据库。这个数据库的恢复和处理都交给BDB完成。
    volume bdb
      type storage/bdb
      option directory /tmp/bdb-export # Export Point, also HOME for DB_ENV
      #option transaction off   # default is on
      #option cache on          # default is off
      #option access-mode btree # default will be hash
      option checkpoint-timeout 10 # default is 30seconds
      #option file-mode 0644  # default is 0644
      #option dir-mode 0755   # default is 0755
      option lru-limit 200    # default is 100
      #option errfile /tmp/bdberrlog # default is /dev/null?
      #option logdir /tmp/dbd-logdir # default is  in 'option directory '
    end-volume
    External Links

    需要条件
    • GlusterFS需要至少版本在4.7.25以上的BerkeleyDB(也可以用旧的版本,但是oracle自己建议用最新的版本,同样GlusterFS团队也遇到了一些被证实不可用的老版本的问题)

    协议Translators
    server
    Server translator允许你在网络上export一个volumes。这个translator实现了不同种类的内部连接的传输模块。
    ### Add network serving capability to above brick.
    volume server
      type protocol/server
      option transport-type tcp/server       # 使用TCP/IP传输
    # option transport-type ib-sdp/server    # 使用Infiniband传输
    # option transport-type ib-verbs/server # 使用Infiniband Verbs传输
    # option ib-verbs-work-request-recv-size   1048576  # 如果read-ahead的大小高等于这个值,则性能将更高
    # option ib-verbs-work-request-recv-count  16
    # option ib-verbs-work-request-send-size   1048576  # 如果write-behind的大小高等于这个值,则性能将更高
    # option ib-verbs-work-request-send-count  16
    # option bind-address 192.168.1.10       # 默认监听所有interfaces
    # option listen-port 6996                # 默认为6996
    # option client-volume-filename /etc/glusterfs/glusterfs-client.vol
      subvolumes brick1 brick2
      option auth.ip.brick1.allow 192.168.* # 这些IP地址允许访问"brick1"
      option auth.ip.brick2.allow 192.168.* # 这些IP地址允许访问"brick2"
    end-volume
    对应于server protocol可以使用这些传输模块:
    • tcp/server: 基于TCP/IP的互联
    • ib-sdp/server: 基于Infiniband Sockets Direct协议的传输接口
    • ib-verbs/server: Infiniband Verbs传输接口

    验证模块
    为了允许多个IP地址、子网的访问,可以使用逗号来隔离,向下面一样:
    option auth.ip.brick1.allow 192.168.1.10,192.168.1.20,192.168.2.*
    注意: 1.3.7以上的版本有效
    为了更高一些的存储数据安全考虑,而且,GlusterFS作为一个网络文件系统,很有必要在连接前验证client的身份。目前,GlusterFS支持验证模块,他有以下两种方式验证方式:
    • ip
    • login

    auth.ip
    这个模块基于IP地址来验证连接的client身份。提供的选项有:
    option auth.ip..allow  # 用逗号来分隔
    这个选项只在protocol/server类型的volume需要。
    auth.login
    这个模块基于用户名和密码来验证
    在protocol/server里的选项有:
    option auth.login..allow  # seperated by comma
    option auth.login..password  
    在protocol/client里的选项有:
    option username
    option password
    client
    Client translator允许你从GlusterFS的server附加一些远程的volume。
    ### 增加client的功能,并附加挂载一个远程server1的subvolume
    volume client1
      type protocol/client
      option transport-type tcp/client       # 使用TCP/IP传输
    # option transport-type ib-sdp/client    # 使用Infiniband传输
    # option transport-type ib-verbs/client  # 使用Infiniband Verbs传输
    # option ib-verbs-work-request-recv-size   1048576  
    # option ib-verbs-work-request-recv-count  16
    # option ib-verbs-work-request-send-size   1048576  
    # option ib-verbs-work-request-send-count  16
      option remote-host 192.168.1.10        # 远程brick的IP地址
    # option remote-port 6996                # server端口默认为6996
    # option transport-timeout 30            # 每个请求等待server的响应时间
      option remote-subvolume brick          # 远程volume的名字
    end-volume
    对应于client protocol可以使用这些传输模块:
    • tcp/client: 基于TCP/IP的互联
    • ib-sdp/client: 基于Infiniband Sockets Direct协议的传输接口
    • ib-verbs/client: Infiniband Verbs传输接口

    加密Translators
    rot-13
    ROT-13是一个玩具translator,它用ROT-13算法来加密和解密文件内容。ROT-13是一个非常简单的算法,他用13个位置来轮流使用字母表。例如:把A变成N,把B变成O,把Z变成M。
    如果你需要一个真正的加密(新版本的GlusterFS将还有真正的加密translators),那么这种translator就不推荐了。
    `encrypt-write [on|off] (on)'
    是否在写时加密
    `decrypt-read [on|off] (on)'
    是否在读时加密
    例子:
    volume rot-13
      type encryption/rot-13
      encrypt-write [on|off] (on)
      decrypt-read [on|off] (on)
      subvolumes brick
    end-volume
    Client端 Volume的配置文件样例
    这里是一个非常简单的配置文件,它使用了所有的clustering translators。你可以删掉你不需要的,更新'subvolumes'选项。
    volume client1
    type protocol/client
    option transport-type tcp/client     
    option remote-host 192.168.10.1
    option remote-subvolume ra
    end-volume
    volume client2
    type protocol/client
    option transport-type tcp/client     
    option remote-host 192.168.10.2
    option remote-subvolume ra
    end-volume
    volume client3
    type protocol/client
    option transport-type tcp/client     
    option remote-host 192.168.10.3
    option remote-subvolume ra
    end-volume
    volume client4
    type protocol/client
    option transport-type tcp/client     
    option remote-host 192.168.10.4
    option remote-subvolume ra
    end-volume
    volume client5
    type protocol/client
    option transport-type tcp/client     
    option remote-host 192.168.10.5
    option remote-subvolume ra
    end-volume
    volume client6
    type protocol/client
    option transport-type tcp/client     
    option remote-host 192.168.10.6
    option remote-subvolume ra
    end-volume
    volume client7
    type protocol/client
    option transport-type tcp/client     
    option remote-host 192.168.10.7
    option remote-subvolume ra
    end-volume
    volume client8
    type protocol/client
    option transport-type tcp/client     
    option remote-host 192.168.10.8
    option remote-subvolume ra
    end-volume
    volume client-ns
    type protocol/client
    option transport-type tcp/client     
    option remote-host 192.168.10.1
    option remote-subvolume brick-ns
    end-volume
    volume stripe1
    type cluster/stripe
    subvolumes client1 client2
    option block-size *:10KB  
    end-volume
    volume stripe2
    type cluster/stripe
    subvolumes client3 client4
    option block-size *:10KB  
    end-volume
    volume stripe3
    type cluster/stripe
    subvolumes client5 client6
    option block-size *:10KB  
    end-volume
    volume stripe4
    type cluster/stripe
    subvolumes client7 client8
    option block-size *:10KB,  
    end-volume
    volume afr1
    type cluster/afr
    subvolumes stripe1 stripe2
    option replicate *:2
    end-volume
    volume afr2
    type cluster/afr
    subvolumes stripe3 stripe4
    option replicate *:2
    end-volume
    volume unify0
    type cluster/unify
    subvolumes afr1 afr2
    option namespace client-ns
    option scheduler rr
    option rr.limits.min-disk-free 5
    end-volume
    volume iot
    type performance/io-threads
    subvolumes unify0
    option thread-count 8
    end-volume
    volume wb
    type performance/write-behind
    subvolumes iot
    end-volume
    volume ra
    type performance/read-ahead
    subvolumes wb
    end-volume
    volume ioc
    type performance/io-cache
    subvolumes ra
    end-volume
    Server端 Volume的配置文件样例  
    # Namespace posix
    volume brick-ns
      type storage/posix
      option directory /tmp/export-ns
    end-volume
    volume brick
      type storage/posix
      option directory /tmp/export
    end-volume
    volume posix-locks
      type features/posix-locks
      option mandatory on
      subvolumes brick
    # subvolumes trash # 如果你需要支持trash,请激活这个(注意: 不建议1.3.0-pre5+版本)
    end-volume
    volume io-thr
    type performance/io-threads
    subvolumes posix-locks
    end-volume
    volume wb
    type performance/write-behind
    subvolumes io-thr
    end-volume
    volume ra
    type performance/read-ahead
    subvolumes wb
    end-volume
    volume server
    type protocol/server
    subvolumes ra brick-ns
    option transport-type tcp/server
    option client-volume-filename /etc/glusterfs/glusterfs-client.vol
    option auth.ip.ra.allow *
    option auth.ip.brick-ns.allow *
    end-volume
                   
                   
                   
                   
                   

    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/88421/showart_1721411.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

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

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP