昨天把aria2 最新1.8版丟到我的BCM4780 NAS開始編譯, configure 的方式如下 (抄debian 裡的設定 :P)
./configure --prefix=/usr --mandir=/usr/share/man --with-gnutls --without-openssl --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
編譯的過程很順利的就完成了, 今天連回去家裡準備試驗的時候發現一些奇怪的問題....
主要是出現幾個問題...
1. --event-poll 的錯誤
bcm4780:/nethdd# aria2c http://debian-bcm47xx.googlecode.com/files/mipsel_debian_minimal.etch.gz
2010-01-12 20:45:51.936926 ERROR - Exception caught
Exception: [DownloadEngineFactory.cc:90] Initializing EpollEventPoll failed. Try --event-poll=select
bcm4780:/nethdd#
解決方法:
法1. 在下載的指令內再加個 --event-poll=select , poll 功能好像要核心有支援才行, 預設 --event-poll=epoll(打開) 我的kernel 並沒有支援, 所以只能選擇select
法2. 直接建立一個 $HOME/.aria2/aria2.conf (root 使用者在 /root/.aria2/aria2.conf) 然後加入下面這行
event-poll=select
2. ERROR - CUID#7 - Exception caught while allocating file space. 錯誤
bcm4780:~/.aria2# aria2c http://cdimage.debian.org/debian-cd/5.0.3/mips/iso-cd/debian-503-mips-ne... --event-poll=select
[#1 SIZE:0B/0B CN:1 SPD:0Bs]
2010-01-12 21:00:27.922407 ERROR - CUID#7 - Exception caught while allocating file space.
Exception: [AbstractDiskWriter.cc:159] Failed to write into the file /root/.aria2/debian-503-mips-netinst.iso, cause: Invalid argument
2010-01-12 21:00:27.926564 ERROR - CUID#7 - Download not complete: /root/.aria2/debian-503-mips-netinst.iso
Download Results:
gid|stat|avg speed |path/URI
===+====+===========+===========================================================
1| ERR| n/a|/root/.aria2/debian-503-mips-netinst.iso
Status Legend:
(ERR):error occurred.
aria2 will resume download if the transfer is restarted.
If there are any errors, then see the log file. See '-l' option in help/man page for details.
問題分析:
Exception caught while allocating file space. 應該是表示在分配檔案時出現錯誤, 在aria2 裡有個參數 --file-allocation , 用來控制檔案產生的方法, 預設是prealloc, 其它的方法還有none, falloc. falloc 好像適合用在ext4 (with extents support), btrfs or xfs 等比較新的檔案系統, 不過我的BCM4780 NAS使用的檔案系統是reiserfs, 用預設的 prealloc file-allocaion就會出現以上的錯誤....orz
解決方法:
使用falloc 和none的方法, 簡單的設定方式也是直接改/root/.aria2/aria2.conf, 然後加入
file-allocation=falloc
或是 file-allocation=none
設定好了之前再次下載debian-503-mips-netinst.iso做測試, 可以跑到400K以上~~不過跟10m/2m 的極速還差滿多的距離呢....接下來就是試試用aria2達成Linux的迅雷的下載囉~
參考資料:
Recent comments
5 hours 53 min ago
1 week 13 hours ago
7 weeks 19 hours ago
7 weeks 2 days ago
9 weeks 6 days ago
10 weeks 3 days ago
10 weeks 5 days ago
11 weeks 18 min ago
17 weeks 19 hours ago
17 weeks 3 days ago