Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

what is handoff node/device, can I set one to be handoff ?

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 got

[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. Can someone explain a bit?

thanks

what is handoff node/device, where can I set one to be handoff ?learn more about it?

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 gotdemo, I get:

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

demo Account demo
demo Container None
None Object None

None Partition 29025
Hash 7161d90040459c80ef0fbb050bfe2c27

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

[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/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]
[Handoff] curl -I -XHEAD "http://192.168.119.135:6000/sdc1/29025/demo" # [Handoff]
[Handoff] curl -I -XHEAD "http://192.168.119.147:6000/sde1/29025/demo" # [Handoff]

[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]
[Handoff] ssh 129.128.119.135 "ls -lah ${DEVICE:-/srv/node}/sdc1/accounts/29025/c27/7161d90040459c80ef0fbb050bfe2c27/" # [Handoff]
[Handoff] ssh 192.168.119.147 "ls -lah ${DEVICE:-/srv/node}/sde1/accounts/29025/c27/7161d90040459c80ef0fbb050bfe2c27/" # [Handoff]

[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. Can someone explain a bit?Where can I find more details about it?

thanks