# EZIO 2.0.0-RC2 usage ## source code https://github.com/tjjh89017/ezio/releases/tag/v2.0.0-RC2 ## build Depend Debian sid `sudo apt install build-essential cmake libboost-all-dev libtorrent-rasterbar-dev libgrpc-dev libgrpc++-dev libprotobuf-dev protobuf-compiler-grpc libspdlog-dev` `partclone_create_torrent.py` depend `sudo apt install python3-libtorrent` `ui.py` / `add_torrent.py` depend `sudo apt install python3-grpc-tools python3-grpcio python3-urwid` ## Build mkdir build cd build cmake .. make ./ezio -h ## 使用方式 ### EZIO 直接執行 `./ezio` 然後會開啟foreground daemon mode,然後就可以用 ui.py or add_torrent.py 去連線 foreground顯示log ui.py 會自動幫忙關閉 ezio daemon `./ezio -F` 會啟動一般檔案模式,就不是啟動 raw disk 模式 (例如說Clonezilla lite server的server端,會從image file直接做種,就使用這模式) gRPC預設聽在 127.0.0.1:50051 ### ui.py 使用之前,要先 ./create_proto_py.sh 建立必要檔案 ezio_pb2_grpc.py ezio_pb2.py 有這兩個檔案之後就能使用 預設連接127.0.0.1:50051 顯示速度 分享率超過三倍,或是做種時間超過 1 min就會自動關閉,並且關閉 ezio (自動化) 有些時候要等比較久才會自動關閉 Server side不要開 ui.py 不然會把seed暫停 ### add_torrent.py 使用之前,要先 ./create_proto_py.sh 建立必要檔案 ezio_pb2_grpc.py ezio_pb2.py 有這兩個檔案之後就能使用 預設連接127.0.0.1:50051 新增種子 `./add_torrent.py a.torrent /dev/sda1` `./add_torrent.py a.torrent /home/partimg/XXXXX` ### add_torrent_seed.py 使用之前,要先 ./create_proto_py.sh 建立必要檔案 ezio_pb2_grpc.py ezio_pb2.py 有這兩個檔案之後就能使用 預設連接127.0.0.1:50051 新增種子,並直接設定為做種模式 `./add_torrent.py a.torrent /dev/sda1` `./add_torrent.py a.torrent /home/partimg/XXXXX` ## Cloneazilla - https://gitlab.com/stevenshiau/clonezilla/-/blob/master/conf/drbl-ocs.conf#L75-81 - 已經沒有這些option了 - seed ratio跟等待時間,目前都改到ui.py,目前ui.py這幾個參數寫死 - https://gitlab.com/stevenshiau/clonezilla/-/blob/master/bin/gen-torrent-from-ptcl - 需要同步新版本 - https://gitlab.com/stevenshiau/clonezilla/-/blob/master/sbin/ocs-btsrv#L337-338 - 需要改成新的format - 這兩行會變成以下這樣,請在幫忙修改其他相關部分 before ``` # img: ezio -U -t -T sda1.torrent -L /dev/sda1 -T sda2.torrent -L /dev/sda2 # raw-dev: ezio -U -T sda1.torrent -L /dev/sda1 -T sda2.torrent -L /dev/sda2 ``` after ``` # img: ezio -F; ./add_torrent.py sda1.torrent /some/sda1_image_path # raw-dev: ezio; ./add_torrent.py sda1.torrent /dev/sda1 ``` - https://gitlab.com/stevenshiau/clonezilla/-/blob/master/sbin/ocs-btsrv#L175-190 - 設計可以改成,seeder開啟ezio,之後再來gen add_torrent.py的參數 - add_torrent.py目前只能吃一個torrent,所以需要多執行幾次 - https://gitlab.com/stevenshiau/clonezilla/-/blob/master/sbin/ocs-btsrv#L226-231 - client side的ezio需改成新的形式 - ./ezio (for daemon and always on) - ./add_torrent.py sda1.torrent /dev/sda1; ./add_torrent.py sda2.torrent /dev/sda2 ... (add torrent) - ./ui.py (for stop ezio automatically) - https://gitlab.com/stevenshiau/clonezilla/-/blob/master/sbin/ocs-btsrv#L307 - 強制seed mode已經改在 ./add_torrent_seed.py 中了,直接使用 ./add_torrent_seed.py 就可以新增種子並且設定為seed mode - https://gitlab.com/stevenshiau/clonezilla/-/blob/master/sbin/ocs-btsrv#L323-329 - 已經沒cache機制,目前用mmap直接讓kernel自行處理 - ezio額外的read buffer直接寫死256MB