Upgrade to Pro — share decks privately, control downloads, hide ads and more …

EZIO, Torrent-based Recovery

EZIO, Torrent-based Recovery

Cee80559471f68b7a5134ac8f3e60187?s=128

Date Huang

May 01, 2017
Tweet

Transcript

  1. EZIO BT-based Data Transfer Yu-Chiang Huang

  2. Outline • CloneZilla • EZIO

  3. CloneZilla • 猋犩牏螭ܻ敟誢 • Server Edition • Multicast-based • UDPcast

  4. Multicast • ᗭ砮 • 盄蕦褾牧ℂ㬵䷱睞螂 • 墋ᘒ᥺ԏ牧觊犲 Broadcast ጱ狶ဩ

  5. UDPcast • Multicast • ݶྍ秚ګ

  6. CloneZilla • 猻玊 • ݢ瓟婘 • ە玊 • ஠殾ಅ磪ፓ秂伛猋ਠ౮಍胼樄ত •

    ஠殾ݶྍ蒂ቘ牧ݢ胼䨝ݑک絑ह磧眸ጱࢩᔰ୽段
  7. EZIO • BT-based • 䲆礯羬翄螭ܻ • ᪡螂绚玟璸

  8. BT

  9. BT • BitTorrent • P2P • ֑๐瑊犵毱疝揗斉

  10. BT 礍䯤 • 獮๗ BT • Torrent • Tracker •

    盅๗ BT • Magnet • DHT
  11. Tracker • 戢㲘㪔ᔱ玲ٌ犢 Peer ጱ蝫娄虻懱 • Peer 戢㲘 Tracker ᛔ૩ጱ虻懱

  12. Piece • 裾ଶ傶 2^N ጱ蝫媲玟ྦྷ • 疥ಅ磪䲆礯蝫矑牧ྯ 2^N 㴟獤傶Ӟ㮆 Piece

    • 虻碘涢挨ጱ磧ੜ㻌֖ • Piece 碍ᰁ蝢ଉ䨝୽段蝧ଶ • 蝢ଉ Piece 碍ᰁࣁ 1000 ~ 2000 ԏ樌䨝磧֯
  13. Torrent • 蝢圸物圵ৼ • Tracker 虻懱 • 䲆礯虻懱

  14. Torrent Info { 'announce': 'http://tracker.site1.com/announce', 'info': { 'name': 'directoryName', 'piece

    length': 262144, 'files': [ {'path': ['111.txt'], 'length': 111}, {'path': ['222.txt'], 'length': 222} ], 'pieces': '6a8af7eda90ba9f851831073c48ea6b7b7e9feeb... 8a43d9d965a47f75488d3fb47d2c586337a20b9f' } }
  15. Tracker { 'announce': 'http://tracker.site1.com/announce', 'info': { 'name': 'directoryName', 'piece length':

    262144, 'files': [ {'path': ['111.txt'], 'length': 111}, {'path': ['222.txt'], 'length': 222} ], 'pieces': '6a8af7eda90ba9f851831073c48ea6b7b7e9feeb... 8a43d9d965a47f75488d3fb47d2c586337a20b9f' } }
  16. Files { 'announce': 'http://tracker.site1.com/announce', 'info': { 'name': 'directoryName', 'piece length':

    262144, 'files': [ {'path': ['111.txt'], 'length': 111}, {'path': ['222.txt'], 'length': 222} ], 'pieces': '6a8af7eda90ba9f851831073c48ea6b7b7e9feeb... 8a43d9d965a47f75488d3fb47d2c586337a20b9f' } }
  17. Piece Info { 'announce': 'http://tracker.site1.com/announce', 'info': { 'name': 'directoryName', 'piece

    length': 262144, 'files': [ {'path': ['111.txt'], 'length': 111}, {'path': ['222.txt'], 'length': 222} ], 'pieces': '6a8af7eda90ba9f851831073c48ea6b7b7e9feeb... 8a43d9d965a47f75488d3fb47d2c586337a20b9f' } }
  18. Filename { 'announce': 'http://tracker.site1.com/announce', 'info': { 'name': 'directoryName', 'piece length':

    262144, 'files': [ {'path': ['111.txt'], 'length': 111}, {'path': ['222.txt'], 'length': 222} ], 'pieces': '6a8af7eda90ba9f851831073c48ea6b7b7e9feeb... 8a43d9d965a47f75488d3fb47d2c586337a20b9f' } }
  19. File Hash { 'announce': 'http://tracker.site1.com/announce', 'info': { 'name': 'directoryName', 'piece

    length': 262144, 'files': [ {'path': ['111.txt'], 'length': 111}, {'path': ['222.txt'], 'length': 222} ], 'pieces': '6a8af7eda90ba9f851831073c48ea6b7b7e9feeb... 8a43d9d965a47f75488d3fb47d2c586337a20b9f' } }
  20. BT • 猻玊 • 覍ݶྍ蒂ቘ • 虻碘涢挨 • ە玊 •

    犋ݢ瓟婘
  21. Implement

  22. Implement • ल䲆礯羬翄蝱 Torrent • ፗ矑䌃蝱Ꮭ繕

  23. Filesystem • Idea • Filesystem = Metadata + Data

  24. Filesystem • Implement • Filesystem = Blocks • inode ∈

    Block • data ∈ Block
  25. None
  26. None
  27. Filesystem • Block 傶च器牧Block size ࢴਧ • 磪 Superblock 牧獵ӥ磪ֵአکጱ

    Block ᮷ݢ犥஑Ꭳ • Block offset • Block size
  28. Filename { 'announce': 'http://tracker.site1.com/announce', 'info': { 'name': 'directoryName', 'piece length':

    262144, 'files': [ {'path': ['111.txt'], 'length': 111}, {'path': ['222.txt'], 'length': 222} ], 'pieces': '6a8af7eda90ba9f851831073c48ea6b7b7e9feeb... 8a43d9d965a47f75488d3fb47d2c586337a20b9f' } }
  29. Filesystem Block • ल䲆礯羬翄蝱 Torrent • Offset —> Filename •

    Length —> File Length
  30. Write Disk Directly • 眤蘛 libtorrent.org • 䋿֢ custom_storage •

    ፗ矑಩ Block 䌃کᏝ繕ྋ嘦ጱ֖ᗝӤ
  31. Benchmark

  32. Benchmark • ፓ獮ጱ䋿涢᮷氥纈䨝穉 Multicast ጱ狶ဩ盠 • To be continue

  33. Optimization

  34. Connection • 蝫娄碍哴ݢ胼੝牧Ӭ犋胼犵ෝ 2 牧犥ع蝐玕 • 姘瞱犵蝫娄碍牏ṛߝ搡蝫娄

  35. Cache • 盠玲哴ݢ胼य़ • 碉誢蝧ଶ疰犋䨝ݑ褖ෝᏝ繕蝧ଶ • 翕᪠蝧ଶ > Ꮭ繕褰秚ਂ玲蝧ଶ

  36. Origin Server • ܻত秚ጱ蝧ଶ୽段碉誢蝧ଶ • ܻত秚哴ݢ胼盠

  37. WARNING!

  38. Warning • ݢ胼蝧ଶ盠ک䨝虏֦ጱ Switch 稴吚 • ইຎ Switch 胙礂毱疝磪猂碘 •

    ੗森 P2P ጱ翕᪠ݢ胼䨝犋胼ֵአ
  39. How to

  40. How to • Standalone EZIO • EZIO integrated CloneZilla