You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1203 lines
29 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Eric Chang">
<meta name="description" content="Bilberry Premium Theme for Hugo.">
<meta name="keywords" content="blog,personal,responsive,search,font awesome,pages,posts,multilingual,highlight.js,syntax highlighting,premium,shortcuts">
<meta name="generator" content="Hugo 0.50" />
<title> 這是MC的HUGO部落格採用bilberry theme | MC部落</title>
<meta name="description" content="Bilberry Premium Theme for Hugo.">
<meta itemprop="name" content="這是MC的HUGO部落格採用bilberry theme">
<meta itemprop="description" content="Bilberry Premium Theme for Hugo.">
<meta property="og:title" content="這是MC的HUGO部落格採用bilberry theme">
<meta property="og:description" content="Bilberry Premium Theme for Hugo.">
<meta property="og:image" content="https://www.gravatar.com/avatar/e4eb1f8e016ffb73e9889f87d16e15f0?size=200">
<meta property="og:url" content="https://h.cowbay.org/">
<meta property="og:site_name" content="MC部落"><meta property="og:type" content="website">
<link rel="icon" type="image/png" href="https://h.cowbay.org/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://h.cowbay.org/favicon-16x16.png" sizes="16x16">
<link href="https://h.cowbay.org/index.xml" rel="alternate" type="application/rss+xml" title="MC部落" />
<link href="https://h.cowbay.org/index.xml" rel="feed" type="application/rss+xml" title="MC部落" />
<link rel="stylesheet" href="https://h.cowbay.org/sass/combined.min.717098cb5503581e75f12e486a847ca410bf8367d4d8713f4c37affc868c5a1d.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body class="bilberry-hugo-theme">
<nav class="permanentTopNav">
<div class="container">
<ul class="topnav">
</ul>
<div id="search-box" class="search">
<i class="fa fa-search"></i>
<input id="search" type="text" placeholder="Search ...">
</div>
</div>
</nav>
<header>
<div class="container">
<div class="logo">
<a href="/" class="logo">
<img src="https://www.gravatar.com/avatar/e4eb1f8e016ffb73e9889f87d16e15f0?d=mm&size=200" alt="">
<span class="overlay"><i class="fa fa-home"></i></span>
</a>
</div>
<div class="titles">
<h3 class="title"><a href="/">MC部落</a></h3>
<span class="subtitle">這是MC的HUGO部落格採用bilberry theme</span>
</div>
<div class="toggler permanentTopNav">
<i class="fa fa-bars" aria-hidden="true"></i>
</div>
</div>
</header>
<div class="main container">
<div class="article-wrapper u-cf">
<a class="bubble" href="/post/smartd-failed-to-start-in-freenas/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="featured-image">
<a href="/post/smartd-failed-to-start-in-freenas/">
<img src="/images/post-default-2.jpg" alt="">
</a>
</div>
<div class="content">
<h3><a href="/post/smartd-failed-to-start-in-freenas/">[筆記] Freenas Smartd 啟動失敗 Smartd Failed to Start in Freenas</a></h3>
<div class="meta">
<span class="date moment">2018-12-13</span>
<span class="categories">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
<span class="author"><a href="/author/eric-chang">Eric Chang</a></span>
</div>
<p>這兩天在弄兩台Freenas 準備當作Proxmox 的Storage &amp; Server Backup</p>
<p>因為伺服器的限制只能接六個SATA我接了六個2T的硬碟做raid10</p>
<p>然後把Freenas 安裝在隨身碟上</p>
<p>不過會一直出現Smartd failed to start 的錯誤訊息</p>
<p></p>
<a href="/post/smartd-failed-to-start-in-freenas/" class="more">Continue reading</a>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/freenas">freenas</a>
</div>
</div>
</div>
</article>
</div>
<div class="article-wrapper u-cf">
<a class="bubble" href="/post/incredibly-slow-mdadm-rebuild/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="featured-image">
<a href="/post/incredibly-slow-mdadm-rebuild/">
<img src="/images/post-default-1.jpg" alt="">
</a>
</div>
<div class="content">
<h3><a href="/post/incredibly-slow-mdadm-rebuild/">[碎念] mdadm 超級慢的rebuild 速度 Incredibly Slow mdadm Rebuild</a></h3>
<div class="meta">
<span class="date moment">2018-12-12</span>
<span class="categories">
<a href="/categories/%E7%A2%8E%E5%BF%B5">碎念</a>
</span>
<span class="author"><a href="/author/eric-chang">Eric Chang</a></span>
</div>
<p>最近在做一台老機器的P2V</p>
<p>偏偏user說不能關機所以我用dd + ssh 做線上移轉</p>
<p>這部份有空再來寫</p>
<p>只是因為原來的設定有用mdadm 做raid1</p>
<p>這部份導致移轉過去proxmox 後會出現raid degrade 導致無法正常開機</p>
<p></p>
<a href="/post/incredibly-slow-mdadm-rebuild/" class="more">Continue reading</a>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/mdadm">mdadm</a>
</div>
</div>
</div>
</article>
</div>
<div class="article-wrapper u-cf">
<a class="bubble" href="/post/create-portable-vim-environment/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="featured-image">
<a href="/post/create-portable-vim-environment/">
<img src="/images/post-default-8.jpg" alt="">
</a>
</div>
<div class="content">
<h3><a href="/post/create-portable-vim-environment/">[筆記] 建立一個帶著走的 VIM 環境 Creating portable Vim environment</a></h3>
<div class="meta">
<span class="date moment">2018-12-07</span>
<span class="categories">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
<span class="author"><a href="/author/eric-chang">Eric Chang</a></span>
</div>
<p>因為工作的關係現在很多時間都花在VIM的操作上</p>
<p>所以之前花了滿多時間調整出一個適合自己的VIM環境</p>
<p>原本的作法是把這個設定好的環境丟到自己建立的gitea 上面</p>
<p>然後每到一台新的機器就要去clone 下來</p>
<p></p>
<a href="/post/create-portable-vim-environment/" class="more">Continue reading</a>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/vim">vim</a>
</div>
</div>
</div>
</article>
</div>
<div class="article-wrapper u-cf">
<a class="bubble" href="/post/synology-ds415-repair-cost/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="featured-image">
<a href="/post/synology-ds415-repair-cost/">
<img src="/images/post-default-11.jpg" alt="">
</a>
</div>
<div class="content">
<h3><a href="/post/synology-ds415-repair-cost/">[雜念] 群暉 Synology NAS DS 415&#43; 誇張的維修費用</a></h3>
<div class="meta">
<span class="date moment">2018-12-04</span>
<span class="categories">
<a href="/categories/%E7%BE%A4%E6%9A%89">群暉</a>
</span>
<span class="author"><a href="/author/eric-chang">Eric Chang</a></span>
</div>
<p>前幾天公司的一台 Synology DS 415+ 發生異常</p>
<p>注意到的時候,四顆硬碟燈號都不斷的在閃爍</p>
<p>但是已經無法登入系統</p>
<p>重開機之後更慘,四顆硬碟燈號全部橘燈恆亮</p>
<p>底下的電源藍燈不斷的在閃爍</p>
<p>雖然我一再表示不希望送修了</p>
<p>一來是已經過保二來是DS415+ 本身就有intel bug三來是因為對synology的NAS 實在沒有愛&hellip;</p>
<p>不過主管還是希望能夠先問群暉維修的費用多少</p>
<p></p>
<a href="/post/synology-ds415-repair-cost/" class="more">Continue reading</a>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/nas">NAS</a>
<a href="/tags/%E7%BE%A4%E6%9A%89">群暉</a>
<a href="/tags/synology">synology</a>
</div>
</div>
</div>
</article>
</div>
<div class="article-wrapper u-cf">
<a class="bubble" href="/post/10g-lab-using-proxmox-and-mellanox/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="featured-image">
<a href="/post/10g-lab-using-proxmox-and-mellanox/">
<img src="/images/post-default-03.jpg" alt="">
</a>
</div>
<div class="content">
<h3><a href="/post/10g-lab-using-proxmox-and-mellanox/">[筆記] 用 proxmox &amp; Mellanox SFP 網卡土炮 10G LAB </a></h3>
<div class="meta">
<span class="date moment">2018-11-30</span>
<span class="categories">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
<span class="author"><a href="/author/eric-chang">Eric Chang</a></span>
</div>
<p>想做一個 10G 的 LAB 環境出來已經很久了。</p>
<p>只是礙於10G RJ45的卡太貴了然後光纖的種類又太複雜</p>
<p>如果直接在淘寶購買,很怕會買錯(什麼LC/FC LC/LC 多模單模 單芯雙芯 SFP/SFP+ 又是什麼光模塊的一大堆規格)</p>
<p>所以一直沒有付諸行動。</p>
<p>硬體的工作很久沒碰了,剛好在蝦皮看到有個賣家在賣 mellanox 的X2網卡以在台灣的價格來說算很便宜的 (550)</p>
<p>聊了一下,跟他請教了關於線材、光纖模塊的問題,回答也都很快很到位</p>
<p>就直接下訂了兩張網卡、兩個光纖模塊、一條LC/LC 光纖線</p>
<p>就是到貨有點久,等了兩個禮拜左右,一直到昨天東西才寄到</p>
<p>今天就花了點時間測試一下</p>
<p></p>
<a href="/post/10g-lab-using-proxmox-and-mellanox/" class="more">Continue reading</a>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/10g">10G</a>
<a href="/tags/%E7%AD%86%E8%A8%98">筆記</a>
<a href="/tags/mellanox">mellanox</a>
</div>
</div>
</div>
</article>
</div>
<div class="article-wrapper u-cf">
<a class="bubble" href="/post/ansible-selectattr-filter/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="featured-image">
<a href="/post/ansible-selectattr-filter/">
<img src="/images/post-default-11.jpg" alt="">
</a>
</div>
<div class="content">
<h3><a href="/post/ansible-selectattr-filter/">[筆記] 還是 Ansible Selectattr </a></h3>
<div class="meta">
<span class="date moment">2018-11-29</span>
<span class="categories">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
<span class="author"><a href="/author/eric-chang">Eric Chang</a></span>
</div>
<p>在上一篇 <a href="https://h.cowbay.org/post/ansible-selectattr/">Ansible how to use &lsquo;list&rsquo; in yaml file </a></p>
<p>有提到怎麼用 with_items / set_fact 來取得在yaml 檔案中的清單</p>
<p>不過就是有點醜</p>
<p></p>
<a href="/post/ansible-selectattr-filter/" class="more">Continue reading</a>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/ansible">ansible</a>
</div>
</div>
</div>
</article>
</div>
<div class="article-wrapper u-cf">
<a class="bubble" href="/post/ansible-selectattr/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="featured-image">
<a href="/post/ansible-selectattr/">
<img src="/images/post-default-1.jpg" alt="">
</a>
</div>
<div class="content">
<h3><a href="/post/ansible-selectattr/">[筆記] Ansible how to use &#39;list&#39; in yaml file </a></h3>
<div class="meta">
<span class="date moment">2018-11-27</span>
<span class="categories">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
<span class="author"><a href="/author/eric-chang">Eric Chang</a></span>
</div>
<p>這幾天在玩ansible 時,碰到一個問題</p>
<p>假如我有個yaml檔作為資料來源檔名是 abc.yml</p>
<p>大概長這樣</p>
<pre><code> &quot;teams&quot;: [
{
&quot;chinese_name&quot;: &quot;TEAM1&quot;,
&quot;description&quot;: &quot;TEAM1&quot;,
&quot;gid&quot;: 10125,
&quot;location&quot;: [
&quot;hq&quot;
],
&quot;name&quot;: &quot;aa&quot;,
&quot;users&quot;: [
&quot;chen&quot;,
&quot;chou&quot;,
&quot;huani&quot;,
&quot;yey&quot;,
&quot;wa&quot;
]
},
{
&quot;chinese_name&quot;: &quot;TEAM2&quot;,
&quot;description&quot;: &quot;TEAM2&quot;,
&quot;gid&quot;: 10126,
&quot;location&quot;: [
&quot;hq&quot;
],
&quot;name&quot;: &quot;bb&quot;,
&quot;users&quot;: [
&quot;chhiao&quot;,
&quot;chgc&quot;,
&quot;chy&quot;,
&quot;hsi&quot;,
&quot;li&quot;,
&quot;li&quot;,
&quot;chgchi&quot;
]
}
]
</code></pre>
<p></p>
<a href="/post/ansible-selectattr/" class="more">Continue reading</a>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/ansible">ansible</a>
<a href="/tags/linux">linux</a>
</div>
</div>
</div>
</article>
</div>
<div class="article-wrapper u-cf">
<a class="bubble" href="/post/change-preferred-language-in-firefox/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="featured-image">
<a href="/post/change-preferred-language-in-firefox/">
<img src="/images/post-default-9.jpg" alt="">
</a>
</div>
<div class="content">
<h3><a href="/post/change-preferred-language-in-firefox/">[筆記] 為了metabase 修改 firefox 開啟網頁時使用的預設語言 change the preferred language in firefox for metabase</a></h3>
<div class="meta">
<span class="date moment">2018-11-15</span>
<span class="categories">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
<span class="author"><a href="/author/eric-chang">Eric Chang</a></span>
</div>
<p>最近在測試metabase記得幾個月前就有測試過</p>
<p>但是當時的界面和現在的樣子差很多,看樣子改版還滿勤勞的</p>
<p>所以這次改用docker來建立根本五分鐘不到就建好了(挖鼻孔)</p>
<p>不過呢,很討厭的是,一進去就發現語系採用的是簡體中文</p>
<p></p>
<a href="/post/change-preferred-language-in-firefox/" class="more">Continue reading</a>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/%E7%AD%86%E8%A8%98">筆記</a>
<a href="/tags/firefox">firefox</a>
<a href="/tags/metabase">metabase</a>
</div>
</div>
</div>
</article>
</div>
<div class="article-wrapper u-cf">
<a class="bubble" href="/post/copy_role_in_pgsql/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="featured-image">
<a href="/post/copy_role_in_pgsql/">
<img src="/images/post-default-7.jpg" alt="">
</a>
</div>
<div class="content">
<h3><a href="/post/copy_role_in_pgsql/">PostgreSQL 直接從已經存在的使用者複製權限到另一個使用者</a></h3>
<div class="meta">
<span class="date moment">2018-11-12</span>
<span class="categories">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
<span class="author"><a href="/author/eric-chang">Eric Chang</a></span>
</div>
<p>因為工作上的需求有個資料庫需要開放給不同team的人去存取</p>
<p>雖然都是在同一台機器上的同一個資料庫</p>
<p>但是希望能夠不同team的人用不同的資料庫使用者</p>
<p>這樣萬一出事,會比較好抓兇手??</p>
<p></p>
<a href="/post/copy_role_in_pgsql/" class="more">Continue reading</a>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/psql">psql</a>
<a href="/tags/%E7%AD%86%E8%A8%98">筆記</a>
</div>
</div>
</div>
</article>
</div>
<div class="article-wrapper u-cf">
<a class="bubble" href="/post/weird-client-server-connection/">
<i class="fa fa-fw fa-pencil"></i>
</a>
<article class="default article">
<div class="featured-image">
<a href="/post/weird-client-server-connection/">
<img src="/images/post-default-4.jpg" alt="">
</a>
</div>
<div class="content">
<h3><a href="/post/weird-client-server-connection/">[筆記] 詭異的client&amp;server間連線的問題或許跟KVM有關係</a></h3>
<div class="meta">
<span class="date moment">2018-11-08</span>
<span class="categories">
<a href="/categories/%E7%AD%86%E8%A8%98">筆記</a>
</span>
<span class="author"><a href="/author/eric-chang">Eric Chang</a></span>
</div>
<p>這是發生在一個夜黑風高的寂寥深夜&hellip;.. ( What The FXXX &hellip; )</p>
<p>來到這個環境之後,有一個很詭異的狀況一直困擾著我</p>
<p>在每個分公司都會有一台伺服器作為KVM Host</p>
<p>上面跑兩台VM一台作為ansible controller (目前沒作用)</p>
<p>另一台作為這邊所謂的 &ldquo;Build Server&rdquo;</p>
<p>用途包含了DHCP Server / Proxy Server (squid3) / APT Proxy (squid-deb-proxy)</p>
<p>問題就發生在這台 Build Server 上&hellip;</p>
<p></p>
<a href="/post/weird-client-server-connection/" class="more">Continue reading</a>
</div>
<div class="footer">
<div class="tags">
<i class="fa fa-tags"></i>
<div class="links">
<a href="/tags/ubuntu">ubuntu</a>
<a href="/tags/%E7%AD%86%E8%A8%98">筆記</a>
</div>
</div>
</div>
</article>
</div>
<div class="paginator">
<a href="/page/2/" class="older"><i class="fa fa-angle-double-left"></i> Older posts</a>
</div>
</div>
<footer>
<div class="container">
<div class="recent-posts">
<strong>Latest posts</strong>
<ul>
<li>
<a href="/post/smartd-failed-to-start-in-freenas/">[筆記] Freenas Smartd 啟動失敗 Smartd Failed to Start in Freenas</a>
</li>
<li>
<a href="/post/incredibly-slow-mdadm-rebuild/">[碎念] mdadm 超級慢的rebuild 速度 Incredibly Slow mdadm Rebuild</a>
</li>
<li>
<a href="/post/create-portable-vim-environment/">[筆記] 建立一個帶著走的 VIM 環境 Creating portable Vim environment</a>
</li>
<li>
<a href="/post/synology-ds415-repair-cost/">[雜念] 群暉 Synology NAS DS 415&#43; 誇張的維修費用</a>
</li>
<li>
<a href="/post/10g-lab-using-proxmox-and-mellanox/">[筆記] 用 proxmox &amp; Mellanox SFP 網卡土炮 10G LAB </a>
</li>
<li>
<a href="/post/ansible-selectattr-filter/">[筆記] 還是 Ansible Selectattr </a>
</li>
<li>
<a href="/post/ansible-selectattr/">[筆記] Ansible how to use &#39;list&#39; in yaml file </a>
</li>
</ul>
</div>
<div class="categories">
<a href="/categories/"><strong>Categories</strong></a>
<ul>
<li>
<a href="/categories/%E7%AD%86%E8%A8%98">筆記 (11)</a>
</li>
<li>
<a href="/categories/ps">Ps (1)</a>
</li>
<li>
<a href="/categories/%E7%A2%8E%E5%BF%B5">碎念 (1)</a>
</li>
<li>
<a href="/categories/%E7%BE%A4%E6%9A%89">群暉 (1)</a>
</li>
</ul>
</div>
<div class="right">
<div class="external-profiles">
<strong>Social media</strong>
<a href="https://www.facebook.com/mariahchang" target="_blank"><i class="fa fa-facebook-adblock-proof"></i></a>
<a href="https://twitter.com/changchichung" target="_blank"><i class="fa fa-twitter-adblock-proof"></i></a>
<a href="https://github.com/changchichung" target="_blank"><i class="fa fa-github"></i></a>
</div>
</div>
</div>
</footer>
<div class="credits">
<div class="container">
<div class="copyright">
<a href="https://github.com/Lednerb" target="_blank">
&copy;
2017
by Lednerb
</a>
-
<a href="https://h.cowbay.org/index.xml">RSS</a>
</div>
<div class="author">
<a href="https://github.com/Lednerb/bilberry-hugo-theme" target="_blank">Bilberry Hugo Theme</a>
</div>
</div>
</div>
<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-128770427-1', 'auto');
ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>
<script type="text/javascript" src="https://h.cowbay.org/js/externalDependencies.39c47e10e241eae2947b3fe21809c572.js" integrity="md5-OcR&#43;EOJB6uKUez/iGAnFcg=="></script>
<script type="text/javascript" src="https://h.cowbay.org/js/theme.ff50ae6dc1bfc220b23bf69dbb41b54e.js" integrity="md5-/1CubcG/wiCyO/adu0G1Tg=="></script>
<script>
$(".moment").each(function() {
$(this).text(
moment( $(this).text() )
.locale( "en" )
.format('LL')
);
});
$(".footnote-return sup").html("");
</script>
<script>
var client = algoliasearch("2XL0P8XDCY", "4ef65b37b627bb886b46c34a10e63aa6");
var index = client.initIndex("h_cowbay_org");
$('#search').autocomplete({ hint: false, autoselect: true, debug: false },
[
{
source: $.fn.autocomplete.sources.hits(index, { hitsPerPage: 10 }),
displayKey: function(suggestion) {
return suggestion.title || suggestion.author
},
templates: {
suggestion: function(suggestion) {
return "<span class='entry " + suggestion.type + "'>"
+ "<span class='title'>" + suggestion.title + "</span>"
+ "<span class='fa fa-fw " + suggestion.iconClass + "'></span>"
+ "</span>"
;
},
empty: function() {
return "<span class='empty'>Nothing found.</span>"
},
footer: function() {
return '<div class="branding">Powered by <img src="https:\/\/h.cowbay.org\/dist\/algolia-logo-light.svg" /></div>'
}
},
}
])
.on('autocomplete:selected', function(event, suggestion, dataset) {
window.location = (suggestion.url);
})
.keypress(function (event, suggestion) {
if (event.which == 13) {
window.location = (suggestion.url);
}
});
</script>
</body>
</html>