2012年12月14日金曜日

Openstack swift objectの情報調べる太郎

Swiftでobjectの情報、どのサーバにレプリカがあるかを確認する方法(*´ω`*)
#実データに対して、swift-object-infoコマンドを実行。
#Ring locationのところにどのサーバにレプリカがあるかが表示される
root@swift-obj03:# swift-object-info /srv/node/sdb1/objects/222228/7a4/d90536ed78c14cf9335ebff89e21f7a4/1355209796.68366.data 
Path: /AUTH_yattarou/test/20121202/22/22/22/33/test8957.jpg
  Account: AUTH_yattarou
  Container: test
  Object: 20121202/22/22/22/33/test8957.jpg
  Object hash: d90536ed78c14cf9335ebff89e21f7a4
Ring locations:
  xxx.xxx.xxx.xx1:6000 - /srv/node/sdb1/objects/222228/7a4/d90536ed78c14cf9335ebff89e21f7a4/1355209796.68366.data
  xxx.xxx.xxx.xx2:6000 - /srv/node/sdb1/objects/222228/7a4/d90536ed78c14cf9335ebff89e21f7a4/1355209796.68366.data
  xxx.xxx.xxx.xx3:6000 - /srv/node/sdb1/objects/222228/7a4/d90536ed78c14cf9335ebff89e21f7a4/1355209796.68366.data
Content-Type: image/jpeg
Timestamp: 2012-12-11 16:09:56.683660 (1355209796.68366)
ETag: 3a650f6dd89d775ef02f48963e821706 (valid)
Content-Length: 211481 (valid)
User Metadata: {}

swift-get-nodesコマンドでも同じような情報がとれるんだけど、表示されたパスをみにいくとファイルがない・・・ 使い方まちがってるんだろうか。

0 件のコメント: