Ask Your Question
1

what is handoff node/device, where can I learn more about it?

asked 2013-10-23 11:23:28 -0500

henry1987 gravatar image

updated 2013-10-25 16:33:56 -0500

smaffulli gravatar image

From my reading, a handoff node/device is used for writing when a primary node/device is not available due to power failure, network issues etc. After the primary node/device becomes available, the object written to the handoff node/device will be moved to the primary node and device.

However, in my swift cluster with three primary nodes (192.168.119.135,192.168.119.139,192.168.119.147) in three different zones. Each primary node has 8 hard disks (sdc, sdd, sde, sdf, sdg, sdh, sdi, sdj) with 3TB/disk. when I run the command swift-get-nodes /etc/swift/object.ring.gz demo, I get:

[root@x ~]# swift-get-nodes /etc/swift/object.ring.gz demo

Account     demo
Container   None
Object      None

Partition   29025  
Hash        7161d90040459c80ef0fbb050bfe2c27 

Server:Port Device  192.168.119.135:6000 sdj1 
Server:Port Device  192.168.119.139:6000 sdg1 
Server:Port Device  192.168.119.147:6000 sdc1 
Server:Port Device  192.1688.119.139:6000 sdi1   [Handoff]  
Server:Port Device  192.168.119.135:6000 sdc1    [Handoff] 
Server:Port Device  192.168.119.147:6000 sde1    [Handoff]


curl -I -XHEAD "http://192.168.119.135:6000/sdj1/29025/demo" 
curl -I -XHEAD "http://192.168.119.139:6000/sdg1/29025/demo"
curl -I -XHEAD "http://192.168.119.147:6000/sdc1/29025/demo"
curl -I -XHEAD "http://192.168.119.139:6000/sdi1/29025/demo" # [Handoff]
curl -I -XHEAD "http://192.168.119.135:6000/sdc1/29025/demo" # [Handoff]
curl -I -XHEAD "http://192.168.119.147:6000/sde1/29025/demo" # [Handoff]

Use your own device location of servers: 
such as "export DEVICE=/srv/node" 
ssh 192.168.119.135 "ls -lah ${DEVICE:-/srv/node}/sdj1/accounts/29025/c27/7161d90040459c80ef0fbb050bfe2c27/" 
ssh 192.168.119.139 "ls -lah ${DEVICE:-/srv/node}/sdg1/accounts/29025/c27/7161d90040459c80ef0fbb050bfe2c27/" 
ssh 192.168.119.147 "ls -lah ${DEVICE:-/srv/node}/sdc1/accounts/29025/c27/7161d90040459c80ef0fbb050bfe2c27/" 
ssh 192.168.119.139 "ls -lah ${DEVICE:-/srv/node}/sdi1/accounts/29025/c27/7161d90040459c80ef0fbb050bfe2c27/" # [Handoff]
ssh 129.128.119.135 "ls -lah ${DEVICE:-/srv/node}/sdc1/accounts/29025/c27/7161d90040459c80ef0fbb050bfe2c27/" # [Handoff]
ssh 192.168.119.147 "ls -lah ${DEVICE:-/srv/node}/sde1/accounts/29025/c27/7161d90040459c80ef0fbb050bfe2c27/" # [Handoff]

For those devices shown to be [Handoff] i.e., 129.128.119.135:sdc1, it has a lot of object files stored in it. I thought it should have no files there if the Swift cluster is operating normally because it is handoff device.

I am confused with the [handoff] concept. Where can I find more details about it?

edit retag flag offensive close delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-25 18:29:05 -0500

torgomatic gravatar image

There's no such thing as a handoff device. It only makes sense to talk about handoff devices in the context of a partition.

For your partition 29025, there are 3 primary nodes and a bunch of handoff nodes. In fact, every other disk in the whole cluster is a handoff node; swift-get-nodes limits itself to displaying 3 handoffs out of courtesy for your scroll buffer. swift-get-nodes -a will show you all the handoffs. (Note that they're ordered; they will be tried in that order, not picked at random.)

Other partitions will have different primary nodes and handoff nodes; each device will be a primary and handoff node for its fair share of partitions, where "fair share" is determined by the device weights.

edit flag offensive delete publish link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

Asked: 2013-10-23 11:23:28 -0500

Seen: 241 times

Last updated: Oct 25 '13