Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

性能与安全兼顾的一种磁盘方案

Featured Replies

PS: 前提使用的是BTRFS文件系统

 

首先抛出问题:

  1. 添加校验盘,性能下降严重
  2. 不用校验盘,数据安全无法保证
  3. 无法选择哪些数据需要保护,一些不重要数据做冗余浪费空间

 

解决方案:

  • 停止阵列
  • 制作一个重要数据磁盘(原始磁盘为sda1,校验磁盘为sdb1)
mkdir  /raid
mount /dev/sda1 /raid
btrfs device add /dev/sdb1 /raid
btrfs balance start -dconvert=raid1 -mconvert=raid1 /raid
  • 工具——新配置,创建没有校验盘的新阵列配置。除了不添加校验盘,其它与原来一样(原来校验盘那块磁盘不要添加进去)。
  • 启动阵列,在共享页将需要重要数据添加到sda,不重要数据排除sda。

 

至此方案完成且无数据损失。性能恢复正常,且使用最安全的raid1冗余保护重要数据空间也基本足够。不需要额外修改,也不影响添加固态cache进一步提高性能。

image.thumb.png.4b2417736a76df7b3a845f665e924801.png

image.thumb.png.f760fe996c7826aef6df96613fed3756.png

Edited by sunzhigang

  • 1 month later...

我原来也想过这种混合的方案 重要数据搞两个盘raid1 非重要数据加入无校验盘的阵列 可惜官方没有这种操作

  • 1 month later...

学习了,Mark下,感谢大神。

如果硬盘跪了,这种方案如何恢复?

4 hours ago, wkbenpao said:

如果硬盘跪了,这种方案如何恢复?

 

raid12块硬盘一起跪才叫跪,否则另一块的数据是完好的

服务器带raid卡的,重新插入盘就可以自动重建,这种形式的不知道。

现在固态便宜,买3个ssd做个raidz的zfs,什么都解决了,要速度有速度要安全有安全!

怎麼不乾脆在主機板bios把ahci改成用intel raid做呢?


從我的iPhone使用Tapatalk 發送

  • 2 months later...

Good idea.

 

But why not try "btrfs device add /dev/sdb1 /mnt/disk1", is there anything not compatible with default Array running?

 

Or just add sdb1 to Array as disk2, Try "btrfs device add /dev/md2 /mnt/disk1".

 

i have no free disk here, can someone do me a try?

Sorry, i forgot "/mnt/disk1" created after Array starts.

 

You are absolutely right. i tried according to your steps and it worked well. Thanks.

 

PS:

    "-f" is needed when typing "btrfs device add /dev/sdb1 /raid" in my case.

我觉得还是添加nvme缓存盘解决拷贝速度慢,然后利用空闲时间将数据从缓存盘转移到数据盘的方式好些。

我也希望官方能支持这种方式 好几个国产nas系统已经这么玩了 

是个好主意,但是搞这么复杂的话是不是跟truenas比就没优势了。。。为什么不用truenas了呢。。

UnRAID在陣列上用Parity,緩存用btrfs,這種備份資料方案,官方肯定是有經過心思熟慮的。最後還是用這種方案,一定有固中大原因,我們還是跟從吧。

另外,可以在網上找到btrfs資料,只推薦raid0及raid1,其他raid都疑似存著隱患...,所以不適合用於2盤以上的陣列?

  • 3 months later...

btrfs是否支持两个硬盘的分区做raid1?这样大的硬盘另外一个分区还可以存放其它不同的内容?

On 1/7/2023 at 11:07 PM, baogege said:

是个好主意,但是搞这么复杂的话是不是跟truenas比就没优势了。。。为什么不用truenas了呢。。

truenas需要ecc内存

On 1/1/2023 at 9:51 AM, atim520 said:

我觉得还是添加nvme缓存盘解决拷贝速度慢,然后利用空闲时间将数据从缓存盘转移到数据盘的方式好些。

空闲时间备份数据达不到实时冗余可以立马恢复系统的效果。

  • 2 months later...

大佬,换新机子了。是直接把原来raid1的俩硬盘直接怼上去,按步骤加一遍吗。

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.