To migrate or to not migrate

Steve “Stefan” Fan
Jun 5 · 5 min read

(Note: this is part the salvation of my old blog, that a catastrophic event has recently happened me, I’m very sad now, and I will make an postmortem later)

雖然一直用緊嗰隻rock64係小巧玲瓏,一直根植係我嘅router附近日日俾我嘅Seafile強暴,但都唔代表無問題存在。

而且佢隻Gigabit速度遠遠達不上預期,加上個USB3係開頭速度快慢慢火葬場,慢到係USB2上嘅速度都頂唔住。

結果我個samba可以最快60MiB/s,跌到低至10MiB/s不等。我已經頂唔順。

所以講得冇錯,平嘢無好嘢,所以ARM都唔多見係好嘢嚟😂

有見及此,我決定用我三個月前剩低嘅士啤,外加$700港紙(Money money money, must be funny…),整咗隻Ghetto 4-Bay NAS。(當然全部用嘅都係山寨貨同洋垃圾😒又話平嘢無好嘢)

舊server spec: arm64 4C4T Cortex-A53 (RK3328), 4GB LPDDR3

新server spec: amd64 8C16T Xeon E5–2660, 8GB DDR3 ECC

驟眼睇落好似無咩嘢喎,普通server upgrade姐?開post做咩呢?係咪諗住炫富?

問題就嚟啦,我原本rock64嘅software同toolchain全部都係arm64喎…

我唔單止要處理OMV,仲有Seafile,Transmission,Plex,MariaDB + MongoDB,NodeBB,Nginx…

最大問題係,Seafile嘅cluster全部都係small files嚟,就算我做咗一次GC犧牲舊嘅revision縮細,都唔一定可以確保一日內transfer走曬啲cluster…50G咁多嘅small files喎大佬

所以今次負責data migration真係有啲頭痛。果然已經establish好咗嘅嘢無人想掂,姐係同香港IT一樣。

我諗咗三隻方案,可能會有更好,希望可以集思廣益下。

  1. 直抄/etc同/usr,然後clone一隻一模一樣但唔同arch嘅OMV
  2. Won’t work,個mount topology已經俾OMV整亂咗,我唔確保最後可以有revoke餘步嘅空間
  3. i.e worst case scenario is the drive is unbootable but data intact
  4. 不過,係origin rootfs嘅dpkg試下加i386/amd64或者可行
  5. 既然有source code,就肯定有ABIAPI compatibility,缺點係有額外空間侵佔
  6. 而且咁都暗示住必須boot from same drive as the old Rock64 origin,無得堂堂正正搬返落RAIDZ
  7. 最後先會考慮
  8. 分開兩個cluster,Rock64就Read-only + Immutable,淨係用新server,兩者互不相干
  9. 咁同開兩個唔同嘅node有咩分別?
  10. 而且咁代表住所有嘢會從頭嚟過
  11. 所以唔可能考慮呢個方案,除非真係最最後走投無路先會咁樣焦土
  12. Rock64嘅Seafile依舊留,其他真係從係重頭嚟過
  13. 目前嘅feasible route
  14. 我真係唔想rsync兩三日去transfer 50–100G嘅clusterf__k
  15. 咁做嘅缺點係煩,係人都知兩頭望會好_煩
  16. 而且依舊保留最上面一開始post提出啲問題
  17. 點樣鋪返nginx嘅vhost又係一個問題,我本身nginx backend services係pure localhost…
  18. 唔可以roundtrip兩次(LAN tunnel + Rock64 reverse proxy)
  19. 咁姐係又要搞一輪
  20. 當然,LAN + Reverse proxy應該唔會好慢嘅…咁啲Distributed Filesystem咪仲慢…睇睇先講啦
  21. 咁姐係代表著可以唔用OMV
  22. 都有啲頂唔順呢個垃圾,竟然用PHP
  23. FreeNAS? Rockstor? Synology? Linux From Scratch?
  24. 但係包括呢個NodeBB在內應唔應該搬走呢
  25. 如果留,咁舊Rock64所有DB都可以留做master
  26. (Anyway,啲consequences真係好_麻煩)

當然,既然我隻舊U起死回生,又有咁上下resourcefulness,我會好好用docker同k8s main住,順便當24/7 game server俾大家玩Minecraft/CSGO/Insurgency/etc(咦,home network喎😮咁好似有啲危險喎ching…)

係,所以睇睇有冇辦法係其他hosting裝kube-proxy然後tunnel做IP mask

但係個target host用嘅係OpenVZ,所以唔可以貿貿然用GRE。

本身諗住用zerotier,但因為有個encryption layer都係太慢,又係想睇下有無啲集思廣益嘅地方。就係點都幫我度掂佢🤣

(Originally Published Date: 2018–12–15T12:04:13.006Z)

    Steve “Stefan” Fan

    Written by

    A mad lad