《Openstack Swift》第三部分,第9章,Installing Openstack Swift from Source 读书笔记

需要标记哪些磁盘是给Swift使用的,但不建议使用 /etc/fstab . 此处与社区文档不一致。
It’s important to keep track of which devices need to be mounted to which system location.
This can be done with mounting by labels in a separate upstart script created for
Swift.
We suggest NOT using the fstab file for this purpose.
Do not use “nobarrier.”

不需要硬盘分区,直接使用整块硬盘
Notice that we didn’t create device partitions.

Storage Policy: 在cluster上创建,应用在container
Storage Policies.
To implement storage polices, you must create them in the cluster and then apply them to containers

Partition power
大的partition power可能导致潜在的问题:
Replication的时间会变长,每个replication里面有更少的文件 ????? 因果关系???
查找的时间会变长,因为ring file变大了
构建ring file的时间会变长
Replication might take longer because fewer files
will be grouped together in each partition for replication checks. Also, lookups take a
fraction longer because the ring gets that much bigger. Lastly, a larger number of partitions
means it takes longer to build the ring when making future changes.

partition power只能设置一次
Don’t change the partition power after the cluster is created

Replicas
**可以在运行时改动吗??????此处是我的一个问题。**书上没有明确说明。我个人的理解是不建议。需要再找找其他的文档。

Minimum part hours

在移动某个partition的时候,它的副本将本锁定一段时间,避免partition和副本同时移动。
While a partition is being moved, Swift will lock that partition’s replicas for a period of
time to prevent several from being moved simultaneously.
推荐的默认值是 24 小时
A good default setting is 24 hours.
如何找到最合适的值
查看replicator的日志,找到replication一轮所需的时间,设置该值为最长的replication时长。具体该看哪段???? 此处是我的一个问题
The log will say how long the replication cycle took. Set the minimum part hours to be comfortably
out of reach of the longest replication time.
这个值可以在运行时进行调整
This setting can be dynamically tuned at cluster runtime.

Adding Devices to the Builder Files
如果某个device有特殊的用途,则不一定要加入所有的ring file当中
If a drive is
meant to be dedicated storage for a certain data type, it does not have to be added to the
other ring builder files.

Region:通常根据地理位置划分。不同Region之间通常网络延时较大
可以使用 write affinity 来限定副本的分布
Zones: 基于物理硬件划分

Setting the Hash Path Prefix and Suffix

32 位(以上)的随机字符且不相同
selecting random strings of at least 32 characters for the prefix and
suffix, which should be different

[swift-hash]
swift_hash_path_suffix = RzUfDdu32L7J2ZBDYgsD6YI3Xie7hTVO8/oaQbpTbI8=
swift_hash_path_prefix = OZ1uQJNjJzTuFaM8X3v%fsJ1iR#F8wJjf9uhRiABevQ4
head -c 32 /dev/random | base64

Setting up TempAuth Authentication and Authorization
with Swift
TempAuth: 在配置文件中指定Swift 用户
setting up TempAuth and creating an account on the Swift cluster
with it. TempAuth lets you specify accounts in configuration files.

Starting memcached
/etc/swift/proxy-server.conf

user_test_tester3 = testing3
user_myaccount_me = secretpassword .admin .reseller_admin
allow_account_management = true
account_autocreate = true

Starting the Consistency Processes
Configuring rsync
使用 rsync 进行文件同步. Rsync, linux 下的远程文件同步工具
https://blog.csdn.net/daniel_ustc/article/details/18005925

快速:第一次同步时 rsync 会复制全部内容,但在下一次只传输修改过的文件。rsync 在传输数据的过程中可以实行压缩及解压缩操作,因此可以使用更少的带宽。
安全:可以使用scp、ssh等方式来传输文件,当然也可以通过直接的socket连接。
[account]
max connections = 25
path = /srv/node/
read only = false
lock file = /var/lock/account.lock

下一章:第四部分 Planning a Swift Deployment 的读书笔记

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值