# 天宝AMD 300U 安装群晖DSM

## 1、安装群晖系统

{% hint style="danger" %}
&#x20;注意！这里有新的安装方法，建议各位用新的方式来安装，教学视频：

<https://www.bilibili.com/video/BV17X4y1S7jV/>

[<mark style="color:red;">**油管同步**</mark>](https://youtu.be/OgcmlkSNEh4)
{% endhint %}

1. **引导文件** 来自b站up主 [BlackWilliam](https://www.bilibili.com/video/BV1Kg411q7Uc)
2. U盘 （这里我用的是sandisk 酷豆16GB）
3. 芯片无忧工具。（用于识别u盘的vid和pid）

<mark style="color:red;">**打包下载地址**</mark> <https://pan.baidu.com/s/1XIC_nMLq-58E6wCl1w1N-w?pwd=6666> 提取码: 6666&#x20;

#### <mark style="color:red;">备用地址</mark>：<https://drive.google.com/file/d/1yMGmYwUbdxnWlRDuviSYIbBkmDmfkXQP/view?usp=sharing>

#### <mark style="color:red;">balenaEtcher写盘软件</mark>：<https://www.balena.io/etcher>

### 引导文件使用方法

1. 写盘
2. 修改boot文件夹里的grub文件。填写自己u盘的vid 和 pid 值 ，注意是0x开头的。
3. 将制作好的u盘插入 天宝AMD 300u的usb接口，通电开机
4. 按键盘 DEL 进入bios，设置U盘为 第一启动区，等待跑码
5. 用 <https://finds.synology.com/#>. 搜寻群晖，或者进入路由器里找到群晖ip地址，进行安装。

## 2、识别NVME 固态硬盘

<pre class="language-css"><code class="lang-css">// 开启ssh，打开终端，连接到群晖
ssh wukong@192.168.6.157
//切换到管理员模式
sudo -i

//添加PCi设备id 用于识别NVME固态硬盘

<strong>//首先查看nvme硬盘信息
</strong>udevadm info /dev/nvme0n1

//可看到，nvme的pci的id是 0000:00:01.1
pci1="0000:00:01.1"

//用vi编辑如下文件
vi /etc.defaults/extensionPorts
//输入i，进入编辑模式。修改pci1的值
//修改后，按ESC，退出编辑状态，然后输入 :wq 保存并退出
</code></pre>

#### 通过上述⬆️代码，天宝的群晖系统就<mark style="color:orange;">可以识别NVME硬盘了</mark>。不过这样之后，它只能用于缓存加速，如果想用NVME做存储空间，请继续看下面的第3步！

## 3、设置NVME 固态硬盘为存储池

#### 由于天宝tbao只有一个nvme硬盘位，因此下面⬇️只讲一个nvme的情况，如果想看2个nvme的情况，可以[<mark style="color:red;">参考这篇</mark>](/wukongdaily/new-shou-ye/nas-qun-hui-wei-lian-tong-etc-shi-yong-ji-qiao/synology-ru-he-shi-yong-nvme-gu-tai-zuo-cun-chu-kong-jian.md#2-kuai-nvme-ying-pan-de-qing-kuang-ru-he-zu-raid-bi-ru-raid0)

```cpp
// 列出所有nvme硬盘
ls /dev/nvme*n1 

**********以下开始是重点***************

//第一步：分区，适合1个nvme的情况，注意0代表第一块nvme
synopartition --part /dev/nvme0n1 12

//第二步：查看当前存储池的序号,记下来，这一步不是必须的，因为序号可以填写很大的
cat /proc/mdstat

//第三步：创建NVME 存储池，其中md6中的6代表要创建的存储池的序号。
mdadm --create /dev/md6 --level=1 --raid-devices=1 --force /dev/nvme0n1p3

//第四步：格式化存储空间
mkfs.ext4 -F /dev/md6

//第五步：重启群晖NAS
reboot
*******************代码部分结束了***************************

后续操作：在dsm后台中 找到

存储空间——可用池1——在线重组

```

## 4、设置多网口SMB 3.0多通道 实现内网速度翻倍效果

### 实现的前提条件

* [x] 必须有交换机
* [x] 电脑也需要2个网口

### 方法和步骤：⬇️

```clike
// 开启ssh，打开终端，连接到群晖
ssh wukong@192.168.6.157
//切换到管理员模式
sudo -i
//编辑smb.conf配置文件
vi /etc/samba/smb.conf
```

<figure><img src="/files/9HbV86nC3OB1WuHAcnQ6" alt=""><figcaption></figcaption></figure>

```clike
// 三行代码如下
server multi channel support=yes
aio read size=1
aio write size=1
//整理后，按下ESC，退出编辑模式，然后输入:wq 完成文件的修改。
```

### 测试和验证smb 3.0 内网传输速度

* [x] 将交换机上<mark style="color:green;">**2根网线**</mark>插入天宝NAS
* [x] 将交换机上<mark style="color:red;">**另外2根网线插入电脑**</mark>
* [x] 运行里输入天宝ip地址，测试大文件读写

<figure><img src="/files/HLW4I6ept8BkauKJmK5R" alt=""><figcaption></figcaption></figure>

### 测试结果如下图所示：

<figure><img src="/files/Hr7ERBEX4BCkCLLLY7Dp" alt=""><figcaption></figcaption></figure>

顺便说一句，**如果在机器顶部再加一个usb散热风扇，硬盘的温度就有保证了**。装啥系统都压得住了。哎，就差这么个风扇，就完美了。

<figure><img src="/files/Di4e8PJ7d3zRQWvUS7s8" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/i8ASM1F6L8j32MEwbDyJ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://didiboy0702.gitbook.io/wukongdaily/new-shou-ye/nas-qun-hui-wei-lian-tong-etc-shi-yong-ji-qiao/tian-bao-amd-300u-an-zhuang-qun-hui-dsm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
