Thanks to visit codestin.com
Credit goes to github.com

Skip to content

leepupu/ezio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ezio

WARNING: It will erase your data.

WARNING: Netboot is experimental.

Description

BT-based Disk Cloner (?

Installation & Use

Ubuntu 16.04

NOTE: depends libtorrent-rasterbar 1.1.1

Build

git clone https://github.com/tjjh89017/ezio.git
cd ezio && make
sudo ./ezio '$MAGNET_URI' /dev/sdb
sudo partprobe

Build Netboot image in Linux

make netboot
ls utils/{linux,initrd.img}

Note: Torrent can only contain 1 file.

Design

Client

  • Using Custom Storage for writing to disk directly
  • Seeding until uploaded 150% or idle for 15 mins
  • PXE Boot with Linux kernel and initramfs

Server

  • Using qBittorrent instead temporarily for seeding and tracker

Future

  • Be the one of CloneZilla options!

TODO

Indent

2 space to 1 tab (4-space width)

done!

Hard-Code

前期先把一些少量改動都寫死,後期在重構

Choosing Disk to clone

要可以選硬碟去複寫

storage_interface

目前不知道怎麼實作 readv / writev ,文件太爛看不懂

Sloved! 直接用 preadv pwritev

R/W Function

目前傾向用 syscall wrapper openreadwrite ,而非使用 C library 提供的檔案操作,不使用 buffering 相關的操作,而是未來直接跟 BT 一起處理 buffer 問題。

Sloved! 直接用 preadv pwritev

static linking

這樣可以讓包裝成 PXE bootable 時候簡單一些

Disk or Partition write

目標支援整個硬碟的複寫,以及分割區複寫

Config based

從 server 下載 config 跟 torrent ,然後依照 config 來執行。 config 可以選擇寫入哪個分割區以及硬碟。

Rename?

可能之後把名稱改成 BT 龍( Torrent Dragon )之類的

Private Torrent

我不能讓資料外流,所以預設先關閉 DHT ,也必須使用私人種子

Partclone

未來目標支援類似 Partclone 的方式,只複製檔案而非整個分割區或是硬碟,想法大概是把所有檔案都給 torrent 管理,直接寫入檔案系統,可能要注意檔案權限以及屬性的問題。

PXE Bootable

可能用 debian-installer 修改後包裝

Info

數據

某地使用 CloneZilla ,使用 4 台 server ,複製總共 60 台電腦,映像檔大小約為 80 GiB ,使用時間約為 1 小時。

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 56.5%
  • C++ 31.6%
  • Makefile 11.9%