PageSourceSearch

https://me2in.github.io/2023/06/26/2020-11-23-%E6%9A%B4%E9%A3%8E%E…7%AC%94%E8%AE%B0-unraid+%E9%BB%91%E8%A3%99/

html me2in.github.io collected 2026-10-03 09:35:36 UTC 23,053 bytes, 573 lines download raw bytes

1<!DOCTYPE html>
2<html lang="en">
3
4<head>
5    <meta charset="utf-8">
6    <meta http-equiv="X-UA-Compatible" content="IE=edge">
7    <meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
8    <meta name="viewport" content="width=device-width, initial-scale=1">
9    <meta name="description" content="Every failure is leading towards success.">
10    <meta name="keywords"  content="me2in, me2in的博客,Meying Blog">
11    <meta name="theme-color" content="#000000">
12    
13    <title>me2in的博客 | Meying Blog</title>
14
15    <!-- Web App Manifest -->
16    <link rel="manifest" href="/pwa/manifest.json">
17
18    <!-- Favicon -->
19    <link rel="shortcut icon" href="/img/favicon.ico">
20
21    <!-- Safari Webpage Icon    by-BY -->
22    <link rel="apple-touch-icon" href="/img/apple-touch-icon.png">
23    
24    <!-- Canonical URL -->
25    <link rel="canonical" href="https://me2in.github.io/2023/06/26/2020-11-23-%E6%9A%B4%E9%A3%8E%E4%BA%8C%E6%9C%9F%E6%8A%98%E8%85%BE%E7%AC%94%E8%AE%B0-unraid+%E9%BB%91%E8%A3%99/">
26
27    <!-- Bootstrap Core CSS -->
28    <link rel="stylesheet" href="/css/bootstrap.min.css">
29
30    <!-- Custom CSS -->
31    <link rel="stylesheet" href="/css/hux-blog.min.css">
32
33    <!-- Pygments Github CSS -->
34    <link rel="stylesheet" href="/css/syntax.css">
35
36    <!-- Custom Fonts -->
37    <!-- <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
38    <!-- Hux change font-awesome CDN to qiniu -->
39    <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css">
40
41
42    <!-- Hux Delete, sad but pending in China
43    <link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
44    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/
45    css'>
46    -->
47
48
49    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
50    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
51    <!--[if lt IE 9]>
52        
52<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
52
53        
53<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
53
54    <![endif]-->
55
56    <!-- ga & ba script hoook -->
57    
57<script></script>
57
58</head>
59
60
61<!-- hack iOS CSS :active style -->
62<body ontouchstart="">
63
64    <!-- Navigation -->
65<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
66    <div class="container-fluid">
67        <!-- Brand and toggle get grouped for better mobile display -->
68        <div class="navbar-header page-scroll">
69            <button type="button" class="navbar-toggle">
70                <span class="sr-only">Toggle navigation</span>
71                <span class="icon-bar"></span>
72                <span class="icon-bar"></span>
73                <span class="icon-bar"></span>
74            </button>
75            <a class="navbar-brand" href="/">me2in Blog</a>
76        </div>
77
78        <!-- Collect the nav links, forms, and other content for toggling -->
79        <div id="huxblog_navbar">
80            <div class="navbar-collapse">
81                <ul class="nav navbar-nav navbar-right">
82                    <li>
83                        <a href="/">Home</a>
84                    </li>
85                    
86                    <li>
87                        <a href="/about/">About</a>
88                    </li>
89                    
90                    <li>
91                        <a href="/tags/">Tags</a>
92                    </li>
93                    
94                </ul>
95            </div>
96        </div>
97        <!-- /.navbar-collapse -->
98    </div>
99    <!-- /.container -->
100</nav>
101<script>
102    // Drop Bootstarp low-performance Navbar
103    // Use customize navbar with high-quality material design animation
104    // in high-perf jank-free CSS3 implementation
105    var $body   = document.body;
106    var $toggle = document.querySelector('.navbar-toggle');
107    var $navbar = document.querySelector('#huxblog_navbar');
108    var $collapse = document.querySelector('.navbar-collapse');
109
110    var __HuxNav__ = {
111        close: function(){
112            $navbar.className = " ";
113            // wait until animation end.
114            setTimeout(function(){
115                // prevent frequently toggle
116                if($navbar.className.indexOf('in') < 0) {
117                    $collapse.style.height = "0px"
118                }
119            },400)
120        },
121        open: function(){
122            $collapse.style.height = "auto"
123            $navbar.className += " in";
124        }
125    }
126
127    // Bind Event
128    $toggle.addEventListener('click', function(e){
129        if ($navbar.className.indexOf('in') > 0) {
130            __HuxNav__.close()
131        }else{
132            __HuxNav__.open()
133        }
134    })
135
136    /**
137     * Since Fastclick is used to delegate 'touchstart' globally
138     * to hack 300ms delay in iOS by performing a fake 'click',
139     * Using 'e.stopPropagation' to stop 'touchstart' event from 
140     * $toggle/$collapse will break global delegation.
141     * 
142     * Instead, we use a 'e.target' filter to prevent handler
143     * added to document close HuxNav.  
144     *
145     * Also, we use 'click' instead of 'touchstart' as compromise
146     */
147    document.addEventListener('click', function(e){
148        if(e.target == $toggle) return;
149        if(e.target.className == 'icon-bar') return;
150        __HuxNav__.close();
151    })
152</script>
152
153
154
155    <!-- Image to hack wechat -->
156<!-- <img src="/img/icon_wechat.png" width="0" height="0"> -->
157<!-- <img src="/img/post-bg-desk.jpg" width="0" height="0"> -->
158
159<!-- Post Header -->
160<style type="text/css">
161    header.intro-header{
162        position: relative;
163        background-image: url('/img/post-bg-desk.jpg')
164    }
165
166    
167</style>
168<header class="intro-header" >
169    <div class="header-mask"></div>
170    <div class="container">
171        <div class="row">
172            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
173                <div class="post-heading">
174                    <div class="tags">
175                        
176                    </div>
177                    <h1></h1>
178                    
179                    
180                    <h2 class="subheading"></h2>
181                    
182                    <span class="meta">Posted by me2in Blog on June 26, 2023</span>
183                </div>
184            </div>
185        </div>
186    </div>
187</header>
188
189<!-- Post Content -->
190<article>
191    <div class="container">
192        <div class="row">
193
194    <!-- Post Container -->
195            <div class="
196                col-lg-8 col-lg-offset-2
197                col-md-10 col-md-offset-1
198                post-container">
199
200				<h1 id="前言">前言</h1>
201
202<p>​	鉴于近日钱包日渐消瘦,本年度双十一就没有购物的打算。然而在自己的N1小钢炮固件上折腾了jellyfin之后,发现n1羸弱的性能完全几乎无法完成转码的,又有了升级一台x86 nas的打算。其实原本家中是有一台猫盘刷了群晖系统用来备份nas和当作存储盘。不过性能非常滴差,使用DSM管理界面的时候都感觉到非常的卡顿,而且很多好玩的东西都得上x86才行。在网络上搜刮了一番,发现暴风二期最近的价格竟然降到700了,虽然跟当年的500块好价是比不了的,但硬件价值和万由的做工个人还是值这个价格的,于是火速联系了一个闲鱼卖家,715包邮入了一台,原先的猫盘200块钱出了,京东上又趁低价买了一块4t的希捷监控盘,本次双十一总共花费¥1231,捡垃圾的成本还是挺高的😂</p>
203
204<h1 id="系统选择">系统选择</h1>
205
206<p>​	下完单之后就开始漫长的等待,双十一的快递真的让人等的焦急,同城愣是花了两天才给我送到。</p>
207
208<p>​	在等快递的这段时间我研究了下各种nas系统,unraid,freenas,omv、黑裙等等,最后选定了unraid+虚拟黑裙的方案。</p>
209
210<p>​	说下这样选择的原因:</p>
211
212<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1. 首先系统必须能够硬解,不就升级j3455的意义就没了,这点就排除了群辉系统。目前状况是ds3617足够稳定,但不支持硬解;ds918固件支持硬解,但实现上很麻烦,而且系统也有很多问题。
213
2142. 有好用的照片同步工具,这是我购入猫盘的原因。而我看了一圈似乎群辉的moment无出其右,这下似乎1跟2矛盾了。
215
2163. 系统要足够的简单,可以很方便的安装虚拟机跟docker(毕竟这才是x86的乐趣所在)。omv与freenas用的都是VirtualBox方案,unraid使用KVM方案,而kvm是比virtualbox的性能更高的;
217
218    所以综合下来,在加上看了阿文菌和司波图的各种安利之后,选择了unraid+虚拟黑裙的方案。
219</code></pre></div></div>
220
221<p>接下来就是开干,具体的unraid安装步骤网上有一堆教程,我参考的是阿文菌的两个教程</p>
222
223<ol>
224  <li>
225    <p><a href="https://post.smzdm.com/p/a5kl335x/">NAS换上了UNRAID系统,J3455绝配!解决了Jellyfin硬件加速解码,虚拟群晖DSM</a></p>
226  </li>
227  <li>
228    <p><a href="https://post.smzdm.com/p/az50d36r/">UNRAID教程:3分钟 用unraid自带的虚拟机 安装 黑群晖NAS DSM系统 很强大!</a></p>
229
230    <p>​	unraid系统的安装很简单,没什么坑,刷写u盘,设置u盘启动,开机,系统安装完成。</p>
231
232    <p>​	有坑的地方在于黑裙的安装,我按照阿文菌的教程新建了N个虚拟机,等了M久,群辉始终无法获取到ip。可能老鸟早就已经发现问题在于引导方式了,我是用的是<a href="https://nas2x.com/">nas2x</a>论坛下载的1.03b引导文件,需要使用SeaBios(传统bios)引导方式,而不是教程中的QVMF(UEFI)引导方式,否则就会一直获取不到ip。大家在安装黑裙获取不到ip时可以改下引导方式试试,可能会有效。</p>
233
234    <p>​	还有一点是我没有选择让黑裙直通硬盘,这样群辉必须占用一个硬盘,一旦坏了数据还无法读取,而且很多功能跟unraid重复了,况且我只是用群辉备份照片,读写速度对我来说影响不大。注意新增的硬盘type最好选择“row”,这样性能更好,没必要节省这点容量。😊</p>
235
236    <p>另外jellyfin开启硬解也可以参考阿文菌的教程UNRAID教程:<a href="https://post.smzdm.com/p/a25gpmpn/">3分钟 用安装Jellyfin 开启硬件加速转码 解码4K 打造最强家庭影院</a>,按教程的步骤来就行了,没什么坑。</p>
237
238    <p>晚上了上述安装步骤之后,就得到了一台nas + 影音服务 + 群辉,下边就是迁移数据了。</p>
239  </li>
240</ol>
241
242<p>​</p>
243
244<h1 id="数据迁移">数据迁移</h1>
245
246<p>​	由于我所有的数据都在旧的猫盘上(刷的190j的群辉),就想到了在unraid上新建黑裙虚拟机,直通原来硬盘给虚拟机,如果可以的话可以数据都不用迁移,虽然有上诉所说的脱裤放屁问题,但这样是成本最低的方案。然而现实是残酷的,当我建好虚拟机之后,直通了硬盘后,在web assistant中显示的不是恢复,而是设置,还提示我要不要格式化硬盘,看来一块硬盘一个nas服务的计划是行不通的(难道arm的群辉硬盘不能放到x86上?)。</p>
247
248<p>​	由于上述计划不通,那还是得人肉拷贝,好在群辉本身还是有很多方便的组件可以用来同步备份数据的,同步数据也没有想象中的麻烦。</p>
249
250<p>​	说下我的操作:</p>
251
252<ol>
253  <li>电影和电视剧:在原来的猫盘中挂载unraid的目录,然后选择“复制到…”,选择刚刚挂载的unraid目录,剩下的就是让群辉自己同步了</li>
254  <li>照片和设置:使用群辉的Hyper Backup和Hyper Backup Vault组件。参考教程<a href="https://post.smzdm.com/p/769429/">群晖(黑) 篇五:群晖系统迁移:旧群晖数据和系统转移到新机å
254™¨</a>。唯一需要注意的是选择了备份moment是会默认选中备份整个home文件下所有的文件,如果home文件夹下有不需要的文件要提前删除,这样可以减少备份的量,我就因为备份的文件过大,导致给群晖虚拟机分配的500g容量不够,不得以又来了一遍😞</li>
255</ol>
256
257<h1 id="挂载unraid目录">挂载unraid目录</h1>
258
259<p>首先将开放目录的nfs和smb都设为public。</p>
260
261<ul>
262  <li>
263    <p>windows挂载</p>
264
265    <p>windows下挂载目录相对简单。在文件管理器中输入\\192.168.1.xxx(unraid服务器ip),如果弹窗提示输入密码,输入unraid的用户名和密码就可以进入unraid share的根目录,右键选择需要挂载的目录,选择“应设网络驱动器”,给目录分配一个盘符,则可以像本地磁盘一样使用unraid。</p>
266  </li>
267  <li>
268    <p>linux挂载,以我的配置为例</p>
269
270    <table>
271      <thead>
272        <tr>
273          <th>参数</th>
274          <th>值</th>
275        </tr>
276      </thead>
277      <tbody>
278        <tr>
279          <td>unraid ip</td>
280          <td>192.168.123.100</td>
281        </tr>
282        <tr>
283          <td>unraid 目录</td>
284          <td>video</td>
285        </tr>
286        <tr>
287          <td>linux挂载点</td>
288          <td>/media/unraid</td>
289        </tr>
290      </tbody>
291    </table>
292
293    <p>新建一个shell脚本,填入以下内容</p>
294
295    <div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">#!/bin/bash</span>
296<span class="nb">mkdir</span> <span class="nt">-p</span> /media/unraid <span class="c">#这就是在linux中的挂载目录</span>
297mount <span class="nt">-t</span> nfs 192.168.123.110:/mnt/user/video /media/unraid <span class="c">#unraid所有的目录都在/mnt/user下</span>
298</code></pre></div>    </div>
299
300    <p>保存为automount.sh,执行这个脚本就实现挂载了。也可以把脚本加到开机脚本中,这样可以开机自动挂载了。</p>
301  </li>
302</ul>
303
304<h1 id="后记">后记</h1>
305
306<p>​	经过了几天的使用,系统目前还有些问题:</p>
307
308<ol>
309  <li>cpu在高负载下,读写速度非常的不稳定,0-60m之间徘徊</li>
310  <li>系统在两次重启之后都遇到一些莫名其妙的问题:第一次重启是丢失了bri0网络,由于对linux网络知识了解甚少,只能重装系统解决;第二次是docker容器无法启动,在docker setting中勾选删除docker.image后成功启动。由于是使用的unraid开心版,不知道正式版系统是否也有这样的问题,稳定性存疑。</li>
311  <li>缓存问题,我至今未弄明白unraid的缓存工作机制。目前缓存使用的是暴风自带的万由16g ssd,在cache设置中使用prefer之后,写入只能维持在14m左右,非常低下。关闭缓存之后反倒可以达到60-80m(测试都是在5g wifi网络下)。</li>
312  <li>虽然unraid可以新增多用户,但我没有找到如何对单个用户设置目录权限,不明白这个多用户的存在意义</li>
313</ol>
314
315<h1 id="2020-12-24更新">2020-12-24更新:</h1>
316
317<ol>
318  <li>拷贝速度问题的原因可能是因为我使用wifi连接(未验证),不过我电脑跟设备离的远,也没办法用有线。</li>
319  <li>root用户可以访问所有文件夹的,但root只能用于管理系统,访问share文件夹必须使用其他用户。如果需要控制单独的访问权限,需要将Security设置为private保存后,既可看到对每个用户权限的设置选项</li>
320</ol>
321
322
323                <hr style="visibility: hidden;">
324
325                <ul class="pager">
326                    
327                    <li class="previous">
328                        <a href="/2021/11/15/Spring-%E4%BA%8B%E5%8A%A1%E7%AE%A1%E7%90%86%E7%AC%94%E8%AE%B0/" data-toggle="tooltip" data-placement="top" title="Spring事务管理的实现方式">
329                        Previous<br>
330                        <span>Spring事务管理的实现方式</span>
331                        </a>
332                    </li>
333                    
334                    
335                </ul>
336
337
338                <!--Gitalk评论start  -->
339                
340                <!-- Gitalk end -->
341
342                
343
344            </div>  
345
346    <!-- Side Catalog Container -->
347        
348
349    <!-- Sidebar Container -->
350            <div class="
351                col-lg-8 col-lg-offset-2
352                col-md-10 col-md-offset-1
353                sidebar-container">
354
355                <!-- Featured Tags -->
356                
357                <section>
358                    <hr class="hidden-sm hidden-xs">
359                    <h5><a href="/tags/">FEATURED TAGS</a></h5>
360                    <div class="tags">
361        				
362                            
363        				
364                            
365        				
366                            
367        				
368        			</div>
369                </section>
370                
371
372                <!-- Friends Blog -->
373                
374                <hr>
375                <h5>FRIENDS</h5>
376                <ul class="list-inline">
377                    
378                        <li><a href="https://apple.com">Apple</a></li>
379                    
380                        <li><a href="https://developer.apple.com/">Apple Developer</a></li>
381                    
382                </ul>
383                
384            </div>
385        </div>
386    </div>
387</article>
388
389
390
391
392
393
394<!-- async load function -->
395<script>
396    function async(u, c) {
397      var d = document, t = 'script',
398          o = d.createElement(t),
399          s = d.getElementsByTagName(t)[0];
400      o.src = u;
401      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
402      s.parentNode.insertBefore(o, s);
403    }
404</script>
404
405<!-- anchor-js, Doc:http://bryanbraun.github.io/anchorjs/ -->
406<script>
407    async("//cdnjs.cloudflare.com/ajax/libs/anchor-js/1.1.1/anchor.min.js",function(){
408        // BY Fix:去除标题前的‘#’ issues:<https://github.com/qiubaiying/qiubaiying.github.io/issues/137>
409        // anchors.options = {
410        //   visible: 'always',
411        //   placement: 'right',
412        //   icon: '#'
413        // };
414        anchors.add().remove('.intro-header h1').remove('.subheading').remove('.sidebar-container h5');
415    })
416</script>
416
417<style>
418    /* place left on bigger screen */
419    @media all and (min-width: 800px) {
420        .anchorjs-link{
421            position: absolute;
422            left: -0.75em;
423            font-size: 1.1em;
424            margin-top : -0.1em;
425        }
426    }
427</style>
428
429
430    <!-- Footer -->
431<footer>
432    <div class="container">
433        <div class="row">
434            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
435                <ul class="list-inline text-center">
436                    
437                    <!-- add jianshu add target = "_blank" to <a> by BY -->
438                    
439                    
440
441                    <!-- add Weibo, Zhihu by Hux, add target = "_blank" to <a> by Hux -->
442                    
443                    
444
445
446                    
447                    
448                    <li>
449                        <a target="_blank" href="https://github.com/me2in">
450                            <span class="fa-stack fa-lg">
451                                <i class="fa fa-circle fa-stack-2x"></i>
452                                <i class="fa fa-github fa-stack-1x fa-inverse"></i>
453                            </span>
454                        </a>
455                    </li>
456                    
457                    
458                </ul>
459                <p class="copyright text-muted">
460                    Copyright &copy; me2in Blog 2023
461                    <br>
462                    Theme on <a href="https://github.com/me2in/me2in.github.io.git">GitHub</a> |
463                    <iframe
464                        style="margin-left: 2px; margin-bottom:-5px;"
465                        frameborder="0" scrolling="0" width="100px" height="20px"
466                        src="https://ghbtns.com/github-btn.html?user=me2in&repo=me2in.github.io&type=star&count=true" >
467                    </iframe>
468                </p>
469            </div>
470        </div>
471    </div>
472</footer>
473
474<!-- jQuery -->
475<script src="/js/jquery.min.js "></script>
475
476
477<!-- Bootstrap Core JavaScript -->
478<script src="/js/bootstrap.min.js "></script>
478
479
480<!-- Custom Theme JavaScript -->
481<script src="/js/hux-blog.min.js "></script>
481
482
483<!-- Service Worker -->
484
485<script type="text/javascript">
486    if(navigator.serviceWorker){
487        // For security reasons, a service worker can only control the pages that are in the same directory level or below it. That's why we put sw.js at ROOT level.
488        navigator.serviceWorker
489            .register('/sw.js')
490            .then((registration) => {console.log('Service Worker Registered. ', registration)})
491            .catch((error) => {console.log('ServiceWorker registration failed: ', error)})
492    }
493</script>
493
494
495
496
497<!-- async load function -->
498<script>
499    function async(u, c) {
500      var d = document, t = 'script',
501          o = d.createElement(t),
502          s = d.getElementsByTagName(t)[0];
503      o.src = u;
504      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
505      s.parentNode.insertBefore(o, s);
506    }
507</script>
507
508
509<!-- 
510     Because of the native support for backtick-style fenced code blocks 
511     right within the Markdown is landed in Github Pages, 
512     From V1.6, There is no need for Highlight.js, 
513     so Huxblog drops it officially.
514
515     - https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0  
516     - https://help.github.com/articles/creating-and-highlighting-code-blocks/ 
517     - https://github.com/jneen/rouge/wiki/list-of-supported-languages-and-lexers   
518-->
519<!--
520    
520<script>
521        async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){
522            hljs.initHighlightingOnLoad();
523        })
524    </script>
524
525    <link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet">
526-->
527
528
529<!-- jquery.tagcloud.js -->
530<script>
531    // only load tagcloud.js in tag.html
532    if($('#tag_cloud').length !== 0){
533        async('/js/jquery.tagcloud.js',function(){
534            $.fn.tagcloud.defaults = {
535                //size: {start: 1, end: 1, unit: 'em'},
536                color: {start: '#bbbbee', end: '#0085a1'},
537            };
538            $('#tag_cloud a').tagcloud();
539        })
540    }
541</script>
541
542
543<!--fastClick.js -->
544<script>
545    async("//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js", function(){
546        var $nav = document.querySelector("nav");
547        if($nav) FastClick.attach($nav);
548    })
549</script>
549
550
551
552<!-- Google Analytics -->
553
554
555
556<!-- Baidu Tongji -->
557
558
559
560
561<!-- Side Catalog -->
562
563
564
565
566
567<!-- Image to hack wechat -->
568<img src="/img/apple-touch-icon.png" width="0" height="0" />
569<!-- Migrate from head to bottom, no longer block render and still work -->
570
571</body>
572
573</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.