← Back to team overview

openstack team mailing list archive

Re: Question about "List of Device" of Ring data structure

 

Good question.

I think wiki doc is wrong.
In swift-ring-builder phase, It said:

> For example, if you were setting up a storage node with a partition of
> /dev/sdb1 in Zone 1 on IP 10.0.0.1, the DEVICE would be sdb1 and the
> commands would look like:
>
> swift-ring-builder account.builder add z1-10.0.0.1:6002/sdb1 100
> swift-ring-builder container.builder add z1-10.0.0.1:6001/sdb1 100
> swift-ring-builder object.builder add z1-10.0.0.1:6000/sdb1 100
>
> The sdb1 in "z1-10.0.0.1:6002/sdb1"  has nothing to do with the
"/dev/sdb1", the raw device name is arbitrary.
In SAIO deployment wiki:
http://swift.openstack.org/development_saio.html
the device path is /dev/loop0, but you use sdb1, sdb2, sdb3, sdb4.

But who has relationship with sdb1 ?
The following lines are cut from /etc/rsyncd.conf in each storage node:

[object]
max connections = 2*path = /srv/node/*read only = false
lock file = /var/lock/object.lock

this line:
path = /srv/node is critical,
the sdb1 must reside in /srv/node

So, you do not need to worry about device changing, just make sure that
 mount point and path in rsyncd.conf is consistent.

2012/1/16 dr-dr xp <drdr.xp@xxxxxxxxx>

> Seems like the wiki docs misled me. "sdb1" is actually mount point but not
> "/dev/sdb1".
>
>  Thus there won't be any problem in source code.
>
> But risk is still there: disk should be mounted by uuid or label but not
> "/dev/sdb1", during the storage installation phase:
>
>
> http://docs.openstack.org/diablo/openstack-object-storage/admin/content/installing-and-configuring-storage-nodes.html
>
>
>
> 2012/1/16 dr-dr xp <drdr.xp@xxxxxxxxx>
>
>> According to the docs of Swift, devices in a ring are identified by disk
>> name like "/dev/sdb1" :
>>
>>  device string The on disk name of the device on the server. For
>> example: sdb1
>>
>> http://swift.openstack.org/overview_ring.html
>>
>>
>> But such disk name would change: When one of the disks fails, all names
>> of disk after failed disk changes.
>> If sdb fails, sdc becomes sdb, and sdd becomes sdc....
>>
>> The same when new device is added.
>>
>>
>> Isn't this a problem? Or is there some internal mechanism to prevent this
>> to happen or something like a workaround?
>>
>>
>> --
>> 要了几天饱饭就不记得西北风啥味了
>>
>
>
>
> --
> 要了几天饱饭就不记得西北风啥味了
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Mr.Cheng Hui - 程辉
chenghui@xxxxxxxxxxxxxxxxx<conglei@xxxxxxxxxxxxxxxxx>
R&D center. - SAE
Phone:(8610)62676056
Address: 17F, BEIJING IDEAL PLAZA 20F, No. 58 Northwest 4th Ring Road,
Haidian, Beijing 100080, China
___________________________________________
http://www.sina.com.cn                           You're the One
新浪.北京 一切由你开始

References