前言:
由於TureNAS空間的告急及硬碟一直在報錯,
所以組裝新NAS的任務刻不容緩!!(其實就是手癢想折騰XD)
這篇文章算是記錄我折騰OMV時的過程及遇到BUG的除錯,
以及後面共享資料夾的設定與些許的心得。
一樣流水式的記錄。
圖多、文長、拍照技術也不算好。
更別提相關知識非專業,完全是爬文學習解決的辦法。
如果有更好的建議或想法,歡迎版友們提出討論~
(以下圖多,自動開圖還請注意流量)
先說整套零件:
CPU:E3-1220L v3
主機板:supermicro C7Z97-OCE
記憶體:創建 DDR3 1333 4G 四根共16G
顯示卡:AMD HD8570 1G (亮機用)
網路卡:82576-T2 2Port 1G網卡
HBA卡:技嘉 GC-MSLZ2(IT omde)
硬碟:WD HC550 16TB 12顆(礦盤)
機殼:X-PRO SMART 9大機殼
硬碟抽取盒:ICY DOCK 黑旋風MB074SP-B 三轉四 3組
電源供應器:微星 MPG A650GF
系統碟:創見及三星 64G msata 轉2.5吋SSD
預定:Mellanox ConnectX-3 2Port 10G網卡
關於這張主機板,原先是想拿來組UNRAID搭OPNSense用途的。
不過因為急迫性(手癢),只好先拿來組OMV了...
但是拿到手後發現的第一個狀況...
https://imgur.com/GbBT97U

這張板子的背板強化支架整個黏死了!!
最後用吹風機以及在大力出奇蹟之下,好不容易才將其給撥下來...
https://imgur.com/5AEtbVw

之後上U
https://imgur.com/m02bRaC

顯示卡
https://imgur.com/1jGThYj

網路卡
https://imgur.com/GiAhCz0

驗明正身
https://imgur.com/2klvTN7

裸機先組裝起來測試
https://imgur.com/8QXlqjM

順利進入BIOS
https://imgur.com/N5Lppfk

兩塊系統碟
https://imgur.com/uUxpk5w

裝入機殼
https://imgur.com/kU84VdX

確認HBA卡可以抓到驅動
https://imgur.com/7Zgyj1g

確認兩塊系統碟都可以抓到
https://imgur.com/6ZYoPk4

到官方網站下載ISO並製作安裝碟
https://www.openmediavault.org/
再次進到BIOS
https://imgur.com/nefHjSj

調整開機順序
https://imgur.com/TMoPFwV

開始安裝
https://imgur.com/vNWYHiG

主機板雙網口及加裝的網路卡可以順利加載驅動
https://imgur.com/qRDu7dk

主機名稱簡單取
https://imgur.com/UEc2Q1l

硬碟分割
https://imgur.com/2iB6mfj

使用三星那塊
沒想到只能擇一使用...。後面將另外想法子解決!!
https://imgur.com/0uGxAQ2

鏡像來源選擇交大的伺服器
https://imgur.com/54f5Try

安裝完成後重新啟動,移除安裝碟並將系統碟設為Boot
https://imgur.com/xQHVtxM

當看到這個畫面時,代表順利進入系統。可以拔掉螢幕線換另一台電腦操作~
https://imgur.com/9jToKwp

一開始我以為是哪裡沒設定好,後來爬文才看到有人有類似的狀況。
討論1:
https://forum.openmediavault.org/index.php?thread/33850-disable-gpu-completely/
討論2:
https://www.reddit.com/r/homelab/comments/6pkvwh/why_does_freenas_work_perfectly_fine_headlessno/
討論3:
https://unix.stackexchange.com/questions/595486/grub-not-booting-debian-without-gpu-attached
先到DHCP伺服器查看OMV主機被配發的IP
https://imgur.com/8Et8gV1

接著開啟瀏覽器並輸入網址就可以連上OMV了~
要注意的是,在這裡的帳號及密碼分別是admin/openmediavault,
而非在安裝過程中設定的root密碼。
https://imgur.com/Tmia7cE

解決辦法:https://forum.openmediavault.org/index.php?thread/5934-omv-firstaid-usage/
一開始的主畫面,比起OMV5好看多了~(我也是因為看到改變才手癢的XD)
https://imgur.com/lwgYPUO

第一件事情就是點選右上角齒輪更改登入密碼
https://imgur.com/VbfV1hK

接下來要更換內核,好讓OMV可以使用ZFS Plugin
https://imgur.com/YIi4rQQ

使用putty連上OMV
https://imgur.com/LkVGafM

此時的帳號是root,密碼就是在安裝系統中設定的那組
https://imgur.com/oXiGGym

接下來安裝 OMV-Extras Plugin,算是個增強版的Plugin。
輸入「wget -O -
https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install
| bash」
來源網址:
https://forum.openmediavault.org/index.php?thread/5549-omv-extras-org-plugin/
待跑完安裝,底下游標回到root時。返回瀏覽器並且重新整理
https://imgur.com/jsaSKT2

此時可以看到左邊欄位出現OMV-Extras Plugin了
https://imgur.com/cWgTatq

接著點進裡面的設定,將向後移植給取消並保存設定。
https://imgur.com/Gc8HZ12

向後移植之所以要取消的討論:
https://forum.openmediavault.org/index.php?thread/41600-zfs-plugin-install-fails-on-fresh-omv6-and-how-to-fix-it/
由於OMV所使用的是Debian內核,無法使用ZFS Plugin。必須替換成proxmox的才行。
所以點選左邊的插件,並且在右邊的搜索欄中搜尋「kernel」
選擇第一個選項後,點擊上面的下載箭頭。
https://imgur.com/278CwAy

出現END OF LINE後即可關閉畫面
https://imgur.com/NHZeWN6

重新整理瀏覽器後,就可以在左邊看到系統核心。
不過此時還是使用Debian內核。
https://imgur.com/Yhjy1v7

點選下載按鈕,我是選擇5.15版本
https://imgur.com/Bf7KL6R

不過系統似乎會升級到最新5.19版本?
https://imgur.com/NYOH686

完成後重新開機,就可以看到內核已經替換成proxmox的了
https://imgur.com/F64yBMm

為了以防萬一,刪除Debian內核。只留下proxmox的。
https://imgur.com/3dVnzyb

https://forum.openmediavault.org/index.php?thread/41983-omv-6-error-when-installing-openmediavault-zfs-6-0-5/
接下來回到插件,搜尋「ZFS」並安裝
https://imgur.com/EwNgY0i

一樣出現END OF LINE後關閉畫面並重新整理瀏覽器
https://imgur.com/d3jvZVF

就可以在左邊的儲存裝置中看到ZFS了
https://imgur.com/9BIjiqk

此時該安裝的都裝好了,把所有插件都更新一下
https://imgur.com/1NGq0Ak

更新後,右上角的齒輪中多了Dark mode
https://imgur.com/6usf1sF

接下來到儲存裝置->磁碟中,記錄硬碟的位置及序號
例如:sda/序號1、sdb/序號2、sdc/序號3...以此類推。
https://imgur.com/bPlzaRz

後面要使用指令來操作,所以先記錄起來備用。
此時如果要建立pool,會看不到硬碟
https://imgur.com/McD15wz

所以要回到儲存裝置-磁碟,
點選硬碟後,在點擊上面橡皮擦圖案清除硬碟的分區。
https://imgur.com/mQaXj8d

選擇快速抹除
https://imgur.com/bZBmnmM

老樣子,關閉
https://imgur.com/x5R21Yc

此時操作中就可以看到硬碟了
https://imgur.com/tVWc3fe

如果只是想單純建立pool,現在就可以操作
https://imgur.com/9m3Ndgd

選擇要的類型
https://imgur.com/SyfVJ4m

但是只能新增pool,還是沒有vdev
https://imgur.com/9JKbqmM

由於12顆硬碟位於3個抽取盒中,
所以我打算每4顆建立raidz,之後在組成stripe。
用序號確認好各抽取盒中硬碟的路徑(sda、sdb、sdc...),用putty輸入指令。
https://imgur.com/LrKUVm0

https://imgur.com/DfQZBqv

pool建立完成
https://imgur.com/S7c7OFZ

==========================================================================
首先先查看上面建立的pool的訊息並且刪除它
https://imgur.com/Gw1fnt4

現在ZFS-pool為空
https://imgur.com/zB6lyjT

一樣抹除硬碟
https://imgur.com/wZRKWCl

接著建立pool
https://imgur.com/IUSQSek

按照我的規劃,使用四顆硬碟建立一組RAID-Z1
https://imgur.com/V0L21r9

https://imgur.com/Kbf7iO2

pool建立完成,並點選右上角更新
https://imgur.com/lVugNty

此時透過命令,可以確認這四顆建立完成
https://imgur.com/nerNUxz

這時候選擇Expand pool
https://imgur.com/MgcLTFe

再選擇四顆硬碟
https://imgur.com/R8JtY5f

就會發現只有一顆硬碟
https://imgur.com/0lmxNRq

若是選擇SAVE
https://imgur.com/JO5NwXM

就會出現錯誤警告
https://imgur.com/m8FLOm2

此時用命令查看,會發現還是只有原先建立的pool
https://imgur.com/g6ehjs1

在論壇中也有人遇到此問題,而其他人的回應也是改用CLI建立pool。
相關討論:https://forum.openmediavault.org/index.php?thread/43721-problem-creating-zfs-striped-mirror-4-hdd-omv-6/
當然如果硬碟數較少,只使用一組vdev的話。
透過ZFS Plugin建立就已足夠了~
==========================================================================
接下來建立共享資料夾,名稱就設定為Data。
檔案系統選擇剛才建立的pool。
https://imgur.com/8AfYmuA

儲存後記得右上角的更新
https://imgur.com/YFptsgk

由於OMV沒辦法直接以admin或root直接訪問共享資料夾,所以要新增一個用戶。
https://imgur.com/BghjYyk

名稱、密碼自訂,中間有個群組選擇「users」。
https://imgur.com/yzS5Lfz

儲存、更新。
https://imgur.com/c1NVw1h

在左邊的服務-SMB/CIFS-共享中,新建SMB共享資料夾
https://imgur.com/Jja0CiB

啟用並選擇剛才建立的資料夾(Data)
https://imgur.com/7MPQ6mQ

https://imgur.com/H0HZaX5

最後在設定中記得開啟SMB
https://imgur.com/fBbW4a0

回到我的電腦中,用IP連線。
帳號及密碼就是剛才新建的用戶。
https://imgur.com/30k7xVk

成功!!
https://imgur.com/LokfUUl

掛載成網路磁碟機
https://imgur.com/xCO2cVg

同樣以IP連線並輸入帳號密碼
https://imgur.com/9ChU2b7

成功!!
https://imgur.com/gvLBMxY

測試從桌面丟個檔案進去,速度穩定在1G。
https://imgur.com/0woPLMr

此時的系統佔用率
https://imgur.com/AFcClDa

反過來複製到桌面
https://imgur.com/aavTStr

此時的系統佔用率
https://imgur.com/mZEnUCS

心得:
如同文章開頭所說,若非有急需,不然這OMV也不會這麼快組出來。
尤其組裝中所遇到的各種問題,更是邊爬文邊尋找解決的辦法。
10G網卡沒到,也無法測試這樣組pool是否能達到我的理想速度?
之所以用ZFS,除了對諸多功能感到興趣(例如:快照、去重、壓縮...等),
還有就是為了後面重組TureNAS先來練手~
總之這台OMV就在這種情況中誕生了。
至於ZFS中,pool、vdev、ACL等部分。還有如何提升pool的性能等調教方式。
由於尚未理解通透,就不講出來誤導人了!!
就算不用ZFS,OMV也可使用一般的RAID。 相信也夠一般大眾的使用了~
感謝各位看到這裡。
參考資料:
官方文檔:https://docs.openmediavault.org/en/6.x/index.html
官方討論區:https://forum.openmediavault.org/wsc/
Oracle Solaris ZFS 管理指南:https://docs.oracle.com/cd/E19253-01/819-7065/gaztn/index.html
Debian ZFS官方文檔:https://wiki.debian.org/ZFS
ZFS指令:https://groupe-sii.github.io/cheat-sheets/openzfs/index.html
pool的性能分析1:https://www.truenas.com/blog/zfs-pool-performance-1/
pool的性能分析2:https://www.truenas.com/blog/zfs-pool-performance-2/
pool的性能分析3:https://calomel.org/zfs_raid_speed_capacity.html
pool的性能分析4:
https://arstechnica.com/gadgets/2020/05/zfs-versus-raid-eight-ironwolf-disks-two-filesystems-one-winner/
--