ZiiyunChan的博客
关于
归档
友链
后台
切换模式
返回顶部
首页
默认分类
硬件杂谈
说说
ZiiyunChan的博客
首页
默认分类
硬件杂谈
说说
关于
归档
友链
后台
小白折腾NAS记录
硬件杂谈
·
2023-09-29
·
261 人浏览
Colico
> **注意:本篇文章涉及到的内容可能及其不专业不严谨,欢迎理性讨论。** > --///**文章未完成,施工中……**///-- # 目录 [1.起因](#1) [2.功能需求](#2) [3.处理器选择](#3) [4.系统安装](#4) [5.Docker容器](#5) [6.杂七杂八](#6) ---
## 起因 自己的笔记本电脑已经插满了硬盘,两根M.2 SSD以及一块2.5英寸HDD。虽然毕业的时候格式化并重装了系统,但是随着和朋友游玩各类游戏,以及下载许多OVA动画之后对于NAS搭建的欲望就愈发强烈了。正好手头上有台闲置的旧电脑,包含一块技嘉主板[H81M-S1](https://www.gigabyte.cn/Motherboard/GA-H81M-S1-rev-21/sp#sp)、两块3.5英寸HDD以及一根内存条。本着不浪费的原则,我将围绕着已有的内容进行选择。 ---
## 功能需求 - 存储功能:搭建NAS最基础的需求便是存储,虽然存储的大多是影视作品,并且下载速度奇慢无比~~(主要是冷门OVA比较多,而且愿意上传的人也不多)~~,但是考虑到资金以及功耗问题,就不弄什么阵列了。 - 观影功能:既然上面提到了存储的大多是影视作品,所以对应的观影功能也需要考虑进去,毕竟之后可能会购置投影仪实现在床上观影。 - 下载功能:还是上文提到的下载速度慢的问题,我不希望我的笔记本常年处于开机的状态,所以下载的重任就交到了NAS身上。 > 大致的需求就是如此,之后如果真的有需要再添加诸如相册备份之类的内容,毕竟我还没入坑相机。 ---
## 处理器选择 在网上也看了一些内容,很多人都选择10W的J1900。不过既然我已经有了主板,那就只好从LGA1150插槽的处理器中做出选择。 这里我考虑的是[奔腾G3260](https://ark.intel.com/content/www/cn/zh/ark/products/87356/intel-pentium-processor-g3260-3m-cache-3-30-ghz.html),这是一颗22nm双核双线程主频率3.3GHz的CPU,TDP为53W,虽然有点高,但是感觉问题不大。如果比较在意的话可以尝试[I3-4360T](https://ark.intel.com/content/www/cn/zh/ark/products/77494/intel-core-i34360t-processor-4m-cache-3-20-ghz.html)这款低功耗的,TDP为35W。 > 该CPU不支持H.265、VP9、AV1解码。 > 后续:问了一下朋友,给了我点意见,给甩出一个[链接](https://zhuanlan.zhihu.com/p/574406469?utm_id=0)。如果像我一样只是在内网使用,那么直接串流到设备解码就行,不需要在NAS上面解码。 **更新**:由于主板闲置时间比较长,导致无法点亮。手上没有太多工具,无法排除是否为CPU还是主板的问题。故该方案只好作罢,现方案修改为: - CPU:[Intel Pentium Gold G5500T](https://ark.intel.com/content/www/cn/zh/ark/products/129947/intel-pentium-gold-g5500t-processor-4m-cache-3-20-ghz.html) > 2核4线程,TPD为35W,核显为UHD630 > [解码/编码情况](https://www.cpu-panda.com/zh-tw/cpu-intel_pentium_gold_g5500t) - 主板:微星H310M PRO-VDH PLUS > 支持双通道DDR4-2666MHz内存,最大容量32GB > PCIE 3.0,1xPCIE x16显卡插槽,2xPCIE X1插槽,4xSATA接口 > 板载RTL8111H Gigabit 网口 > **由于是在闲鱼上面淘来的,卖家发货的时候没有对针脚处做好保护,导致主板到手的时候阵脚歪曲甚至缺失,不得不找维修。~~广东发来的货,到手上还没捂热就又发回广东维修,难绷。~~** 后续再考虑机箱(~~鞋盒又不是不能用~~),目前考虑的方案是紧凑型机箱横放,外置硬盘笼。 ---
## 系统安装 这里我选用的群晖,项目来源为[巴西大佬](https://github.com/fbelavenuto/arpl/tree/v1.1-beta2a)。 首先需要一个8GB以上的U盘作为引导,使用[Rufus](https://rufus.ie/)制作引导盘。 - 引导类型为镜像文件,并选择`Github Release`页面下载的zip压缩包,点击开始制作,准备就绪后关闭并弹出U盘 - 在NAS主机上插入制作好的引导盘,进入BIOS选择U盘启动 - 退出BIOS后,选择`Configure loader`回车,等待代码完成并提示`http://
:7681`,届时通过处于同一路由下的浏览器访问该地址 - 选择`Choose a model`进行型号的选择,常用型号有:`DS3615xs、DS916+、DS3617xs、DS918+`,此处我选择DS918+ - 选择`Choose a Build number`并选择第一个选项,我这里为`42962` - 选择`Choose a serial number`,由于我使用的为黑群晖,所以选择第一项生成随机序列号 - 由于CPU为八代处理器,直接选择`Build the loader`编译引导,等待下载编译完成,回到选择界面`Boot the loader`等待完成 - 根据之前的`http://
:5000`进入安装页面,点击下方的下载中心,下载对应版本的`pat`文件。例如我这里选择`All Downloads`->`7.1.1-42962 (with Update 1)`->`synology_apollolake_918+.pat`。需要注意文件大小在`300MB`左右 - 选择下一步后进行硬盘的初始化,将会格式化硬盘,如有重要文件切记另存 - 等待安装完成,并在`DiskStation更新选项`中选择`手动安装`,并跳过账户登录,毕竟使用的是黑群晖 ---
## Docker容器 ### BT下载相关 使用 NAS 大部分时间是为了挂着 BT 进行上传及下载,我选择 qbittorrentEE 反吸血,同时为了应对近段时间猖狂的`anacrolix`以及`dt/torrent`无限制下载,而搭配 [Simple-Tracker](https://github.com/Simple-Tracker) 的 [qbittorrent-clientblock](https://github.com/Simple-Tracker/qBittorrent-ClientBlocker) 项目使用。 在 Docker 中选择从 URL 导入镜像,同时在 docker 文件夹中创建文件夹名称自定义`/dir_name`,将项目中的 config.json 文件下载到该目录下,并在 Docker 容器配置中将`/dir_name/config.json`映射至`/app/config.json`。 qbittorrentEE 可以直接在 Docker 中拉取镜像,这里选择的镜像为`superng6/qbittorrentee`,在 docker 文件夹下创建配置文件夹`/qbittorrent/config`,同时在存储位置创建一个专门的 qbittorrent 下载文件夹,例如:![qbittorrent下载目录](https://oss-ali-colico.oss-cn-hangzhou.aliyuncs.com/img/202403220619343.png) 将以上文件夹分别映射到:`/config/qbittorrent`、`/downloads`。 为了容器能有正常的读写权限,在环境变量中添加 PUID 以及 PGID,可以通过 SSH 连接后输入`id`获取这两个变量,例如: ```bash Ziiyun@ziiyun_DS918:/$ id uid=1026(Ziiyun) gid=100(users) groups=100(users),101(administrators) ``` ![](https://oss-ali-colico.oss-cn-hangzhou.aliyuncs.com/img/202403220619619.png) ### 影音相关 NAS 上面可供选择的流媒体软件有 Emby 、Jellyfin、PLEX 等,这里我选择免费的 Jellyfin 进行影音管理。 拉取`nyanmisaka/jellyfin`镜像,该镜像由 Jellyfin 开发组成员构建。在 docker 文件夹中创建`/jellyfin/config`以及`/jellyfin/cache`,同时映射媒体文件夹,例如:![jellyfin映射](https://oss-ali-colico.oss-cn-hangzhou.aliyuncs.com/img/202403220619137.png) 推荐再搭配 TinyMediaManager 刮削器刮削资源,拉取`tinymediamanager/tinymediamanager`镜像,将资源文件夹映射到容器中,例如:`/Media/Movie -> /movie`、`/Media/Show -> /show`更方便刮削器分类刮削。 在 Jellyfin 媒体库中取消勾选所有元数据加载器,仅使用 TinyMediaManager 刮削下的 Nfo 元数据。 ![](https://oss-ali-colico.oss-cn-hangzhou.aliyuncs.com/img/202403220619384.png) **如果需要硬解,则需要在高级选项中,开启高权限执行容器(ROOT)** 在管理页面下的播放中,选择 QSV 硬解加速。 ![](https://oss-ali-colico.oss-cn-hangzhou.aliyuncs.com/img/202403220619141.png) ---
## 杂七杂八 在 NAS 中,资源下载的目录与 Jellyfin 不是同一个目录,或者下载的文件中有其它 Jellyfin 不需要的文件,我目前的处理方式就是使用`cp`命令。 > 语法:`cp (选项) (参数)` > 选项: - -a:此参数的效果和同时指定"-dpR"参数相同; - -d:当复制符号连接时,把目标文件或目录也建立为符号连接,并指向与源文件或目录连接的原始文件或目录; - -f:强行复制文件或目录,不论目标文件或目录是否已存在; - -i:覆盖既有文件之前先询问用户; - -l:对源文件建立硬连接,而非复制文件; - -p:保留源文件或目录的属性; - -R/r:递归处理,将指定目录下的所有文件与子目录一并处理; - -s:对源文件建立符号连接,而非复制文件; - -u:使用这项参数后只会在源文件的更改时间较目标文件更新时或是名称相互对应的目标文件并不存在时,才复制文件; - -S:在备份文件时,用指定的后缀“SUFFIX”代替文件的默认后缀; - -b:覆盖已存在的文件目标前将目标文件备份; - -v:详细显示命令执行的操作。 > 参数: - 源文件:制定源文件列表。默认情况下,cp命令不能复制目录,如果要复制目录,则必须使用-R选项; - 目标文件:指定目标文件。当“源文件”为多个文件时,要求“目标文件”为指定的目录。 这里我通过`cp -l 源文件 目标文件`来硬链接至 Jellyfin 的媒体库中。例如: ``` cp -l /volume1/Media/BT_downloads/.../movie.mkv /volume1/Media/Movie # 将 qbittorrent 下载文件夹下的某一个mkv链接至 Jellyfin 的 Movie 媒体库中 ```
NAS
取消回复
提交评论
Colico
『流水很清楚,惜花這個責任,真的身份不過送運。這趟旅行若算開心 亦是無負這一生』
摸鱼
拖延症
游戏玩家
热门文章
欢迎使用 Typecho
小白折腾NAS记录
【随笔】Docker升级PHP
Musicfox食用
最新评论
Typecho: 欢迎加入 Typecho 大家族
热门标签
NAS
Typecho
Docker
Php
关于站长
钦州
联系邮箱
自由从业
Steam主页
Theme
Jasmine
by
Kent Liao