hugo daily push 2018-12-03 22:00:01
This commit is contained in:
@@ -40,7 +40,7 @@ Mellanox 這張 X2 的卡, proxmox 5.1 / 5.2 可以直接抓到,所以不必
|
||||
|
||||
硬體安裝很順利,不過軟體的設定就碰到點麻煩了,所以才想說作個筆記..
|
||||
|
||||
### <strong>必須作 vmbridge 才能指定這個網卡給VM用 </strong>
|
||||
### <strong><font color="red">必須作 vmbridge 才能指定這個網卡給VM用 </font></strong>
|
||||
|
||||
|
||||
安裝好網卡,開機,透過proxmox的WEB界面設定好網卡的資料後,原本以為可以直接使用了
|
||||
@@ -61,7 +61,7 @@ Mellanox 這張 X2 的卡, proxmox 5.1 / 5.2 可以直接抓到,所以不必
|
||||
要先設定好 bridge ,然後才能起新的VM、指定新設定的 vmbridge 給這個新起的機器使用
|
||||
|
||||
|
||||
### <strong>Disk Cache type 要改</strong>
|
||||
### <strong><font color="red">Disk Cache type 要改</font></strong>
|
||||
|
||||
|
||||
設定了新的 vmbridge 之後,就可以在新VM的設定畫面中,指定網卡走這個界面出去
|
||||
@@ -84,7 +84,14 @@ TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -name 123123 -chardev 's
|
||||
|
||||
總之呢,改完之後就可以了 ...
|
||||
|
||||
### 必須手動設定路由
|
||||
### <strong><font color="red">必須手動設定路由</font></strong>
|
||||
|
||||
#### Update
|
||||
|
||||
```
|
||||
這邊可能是我有誤解,應該不需要先在pve 本機設定 10G網卡的 IP
|
||||
直接進web console 去設定 vmbr1 就好了
|
||||
```
|
||||
|
||||
設定好新的VM,開機、設定IP、重開機之後,會發現還是ping 不到另一台機器..(翻桌!)
|
||||
|
||||
@@ -178,5 +185,68 @@ TCP window size: 85.0 KByte (default)
|
||||
速度果然是提高了十倍呀,果然就是一個爽啊!!
|
||||
|
||||
|
||||

|
||||
### <strong>實際開VM來測試看看</strong>
|
||||
|
||||
~~上面的測試,是兩台PVE HOST之間的連線測試~~
|
||||
|
||||
接下來,要實際測試在PVE中,建立新的VM,一台安裝FreeNAS 作為storage,另一台則是一般的client
|
||||
|
||||
步驟簡單來說,就是在ssd 這台PVE 建立一個新的VM,然後安裝FREENAS,並且提供NFS/iscsi 給另一台PVE Host作為storage來源
|
||||
|
||||
新增storage選NFS,填入必要資訊後,在這台主機上,建立一個新的VM,磁碟選擇剛剛連接的NFS
|
||||
|
||||
##### <strong>要特別注意,freenas的NFS Share的參數要改</strong>#####
|
||||
|
||||
在 mapuser/mapgroup這邊要改成 root/wheel 不然會有無法寫入的問題
|
||||
|
||||

|
||||
|
||||
安裝完之後,實際跑一下 dd 看看速度多少
|
||||
|
||||
```
|
||||
Last login: Mon Dec 3 03:10:54 2018
|
||||
2018-12-03 03:15:03 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=10240 count=1000000
|
||||
1000000+0 records in
|
||||
1000000+0 records out
|
||||
10240000000 bytes (10 GB, 9.5 GiB) copied, 9.63458 s, 1.1 GB/s
|
||||
```
|
||||
|
||||
```
|
||||
2018-12-03 03:17:28 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=20480 count=1000000
|
||||
1000000+0 records in
|
||||
1000000+0 records out
|
||||
20480000000 bytes (20 GB, 19 GiB) copied, 16.0786 s, 1.3 GB/s
|
||||
```
|
||||
|
||||
```
|
||||
2018-12-03 03:17:50 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=4096 count=1000000
|
||||
1000000+0 records in
|
||||
1000000+0 records out
|
||||
4096000000 bytes (4.1 GB, 3.8 GiB) copied, 4.80629 s, 852 MB/s
|
||||
2018-12-03 03:25:23 [administrator@ubuntu ~]$
|
||||
```
|
||||
可以看到不但大檔案速度都很快,就連小檔案(4096)居然也有852MB
|
||||
|
||||
我底層也不過就是四顆 SATA3 sandisk 240G SSD 而已啊
|
||||
|
||||
如果都換成PCI-E SSD ,嘿嘿...(流口水
|
||||
|
||||
- - -
|
||||
|
||||
不過呢,這個也只是自己建的LAB玩玩看而已
|
||||
|
||||
真的要放到 production 環境去,我也還沒啥把握 (畢竟都是中古、二手、退役的產品拼湊起來的)
|
||||
|
||||
而且沒有10G Switch ,所以只能點對點連接
|
||||
|
||||
說不定等到對岸的 10G Switch 開始大降價 (我覺得 8 port SFP+ / NTD $2000 左右我應該就會出手了)
|
||||
|
||||
再來把10G 的環境弄完整一點!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
<p>硬體安裝很順利,不過軟體的設定就碰到點麻煩了,所以才想說作個筆記..</p>
|
||||
|
||||
<h3 id="strong-必須作-vmbridge-才能指定這個網卡給vm用-strong"><strong>必須作 vmbridge 才能指定這個網卡給VM用 </strong></h3>
|
||||
<h3 id="strong-font-color-red-必須作-vmbridge-才能指定這個網卡給vm用-font-strong"><strong><font color="red">必須作 vmbridge 才能指定這個網卡給VM用 </font></strong></h3>
|
||||
|
||||
<p>安裝好網卡,開機,透過proxmox的WEB界面設定好網卡的資料後,原本以為可以直接使用了</p>
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
<p>要先設定好 bridge ,然後才能起新的VM、指定新設定的 vmbridge 給這個新起的機器使用</p>
|
||||
|
||||
<h3 id="strong-disk-cache-type-要改-strong"><strong>Disk Cache type 要改</strong></h3>
|
||||
<h3 id="strong-font-color-red-disk-cache-type-要改-font-strong"><strong><font color="red">Disk Cache type 要改</font></strong></h3>
|
||||
|
||||
<p>設定了新的 vmbridge 之後,就可以在新VM的設定畫面中,指定網卡走這個界面出去</p>
|
||||
|
||||
@@ -196,7 +196,13 @@ TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -name 123123 -chardev 's
|
||||
|
||||
<p>總之呢,改完之後就可以了 …</p>
|
||||
|
||||
<h3 id="必須手動設定路由">必須手動設定路由</h3>
|
||||
<h3 id="strong-font-color-red-必須手動設定路由-font-strong"><strong><font color="red">必須手動設定路由</font></strong></h3>
|
||||
|
||||
<h4 id="update">Update</h4>
|
||||
|
||||
<pre><code>這邊可能是我有誤解,應該不需要先在pve 本機設定 10G網卡的 IP
|
||||
直接進web console 去設定 vmbr1 就好了
|
||||
</code></pre>
|
||||
|
||||
<p>設定好新的VM,開機、設定IP、重開機之後,會發現還是ping 不到另一台機器..(翻桌!)</p>
|
||||
|
||||
@@ -288,7 +294,61 @@ TCP window size: 85.0 KByte (default)
|
||||
|
||||
<p>速度果然是提高了十倍呀,果然就是一個爽啊!!</p>
|
||||
|
||||
<p><img src="https://www.clipartmax.com/png/small/217-2175589_oh-yeah.png" alt="" /></p>
|
||||
<h3 id="實際開vm來測試看看">實際開VM來測試看看</h3>
|
||||
|
||||
<p><del>上面的測試,是兩台PVE HOST之間的連線測試</del></p>
|
||||
|
||||
<p>接下來,要實際測試在PVE中,建立新的VM,一台安裝FreeNAS 作為storage,另一台則是一般的client</p>
|
||||
|
||||
<p>步驟簡單來說,就是在ssd 這台PVE 建立一個新的VM,然後安裝FREENAS,並且提供NFS/iscsi 給另一台PVE Host作為storage來源</p>
|
||||
|
||||
<p>新增storage選NFS,填入必要資訊後,在這台主機上,建立一個新的VM,磁碟選擇剛剛連接的NFS</p>
|
||||
|
||||
<h4 id="strong-要特別注意-freenas的nfs-share的參數要改-strong"><strong>要特別注意,freenas的NFS Share的參數要改</strong></h4>
|
||||
|
||||
<p>在 mapuser/mapgroup這邊要改成 root/wheel 不然會有無法寫入的問題</p>
|
||||
|
||||
<p><img src="https://i.imgur.com/Yn7qYdK.png" alt="FREENAS NFS Sharing" /></p>
|
||||
|
||||
<p>安裝完之後,實際跑一下 dd 看看速度多少</p>
|
||||
|
||||
<pre><code>Last login: Mon Dec 3 03:10:54 2018
|
||||
2018-12-03 03:15:03 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=10240 count=1000000
|
||||
1000000+0 records in
|
||||
1000000+0 records out
|
||||
10240000000 bytes (10 GB, 9.5 GiB) copied, 9.63458 s, 1.1 GB/s
|
||||
</code></pre>
|
||||
|
||||
<pre><code>2018-12-03 03:17:28 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=20480 count=1000000
|
||||
1000000+0 records in
|
||||
1000000+0 records out
|
||||
20480000000 bytes (20 GB, 19 GiB) copied, 16.0786 s, 1.3 GB/s
|
||||
</code></pre>
|
||||
|
||||
<pre><code>2018-12-03 03:17:50 [administrator@ubuntu ~]$ dd if=/dev/zero of=testfile bs=4096 count=1000000
|
||||
1000000+0 records in
|
||||
1000000+0 records out
|
||||
4096000000 bytes (4.1 GB, 3.8 GiB) copied, 4.80629 s, 852 MB/s
|
||||
2018-12-03 03:25:23 [administrator@ubuntu ~]$
|
||||
</code></pre>
|
||||
|
||||
<p>可以看到不但大檔案速度都很快,就連小檔案(4096)居然也有852MB</p>
|
||||
|
||||
<p>我底層也不過就是四顆 SATA3 sandisk 240G SSD 而已啊</p>
|
||||
|
||||
<p>如果都換成PCI-E SSD ,嘿嘿…(流口水</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p>不過呢,這個也只是自己建的LAB玩玩看而已</p>
|
||||
|
||||
<p>真的要放到 production 環境去,我也還沒啥把握 (畢竟都是中古、二手、退役的產品拼湊起來的)</p>
|
||||
|
||||
<p>而且沒有10G Switch ,所以只能點對點連接</p>
|
||||
|
||||
<p>說不定等到對岸的 10G Switch 開始大降價 (我覺得 8 port SFP+ / NTD $2000 左右我應該就會出手了)</p>
|
||||
|
||||
<p>再來把10G 的環境弄完整一點!</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user