Synology SHR 小試

Synology 在 RAID 規劃上提供一 SHR & SHR2 mode, 原廠官網提到此為自動化 RAID 管理系統, 能夠在混用不同大小容量硬碟組 RAID 時, 更有效的利用空間.

以下是官網的說明:
https://www.synology.com/zh-tw/knowledgebase/DSM/tutorial/Storage/What_is_Synology_Hybrid_RAID_SHR

文章中提到諸多 SHR 的優點及可擴充性, 但到底加入硬碟後, SHR/SHR2 原本的 raid 組態是如何變化的? 這裡做了一些小實驗.

利用手上的 ds916+ 4 bay NAS, 測試了一下.
一開始的組態為 240GB, 240GB, 120GB 共三顆 SSD 組 SHR.


以下為 dump raid 組態, 可以看出實際上空間配置為
120GB*3 (raid5) + 120GB*2(raid1) (這是大略粗估空間)


root@ds916plus:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md3 : active raid1 sdb6[1] sda6[0]
117201152 blocks super 1.2 [2/2] [UU]

md2 : active raid5 sdc5[2] sdb5[1] sda5[0]
224779392 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]

md1 : active raid1 sda2[0] sdb2[1] sdc2[2]
2097088 blocks [4/3] [UUU_]

md0 : active raid1 sda1[0] sdb1[1] sdc1[2]
2490176 blocks [4/3] [UUU_]

unused devices: <none>
root@ds916plus:~# mdadm -D /dev/md2
/dev/md2:
Version : 1.2
Creation Time : Tue Jan 21 10:46:51 2020
Raid Level : raid5
Array Size : 224779392 (214.37 GiB 230.17 GB)
Used Dev Size : 112389696 (107.18 GiB 115.09 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent

Update Time : Tue Jan 21 11:05:31 2020
State : active
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

Name : ds916plus:2 (local to host ds916plus)
UUID : 8d455bda:6e7e6392:e1ffdea6:661d37d8
Events : 19

Number Major Minor RaidDevice State
0 8 5 0 active sync /dev/sda5
1 8 21 1 active sync /dev/sdb5
2 8 37 2 active sync /dev/sdc5
root@ds916plus:~# mdadm -D /dev/md3
/dev/md3:
Version : 1.2
Creation Time : Tue Jan 21 10:46:51 2020
Raid Level : raid1
Array Size : 117201152 (111.77 GiB 120.01 GB)
Used Dev Size : 117201152 (111.77 GiB 120.01 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent

Update Time : Tue Jan 21 10:52:33 2020
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Name : ds916plus:3 (local to host ds916plus)
UUID : 62974382:a3869ec1:b0a3abe7:37942531
Events : 1

Number Major Minor RaidDevice State
0 8 6 0 active sync /dev/sda6
1 8 22 1 active sync /dev/sdb6



將第三顆 120gb ssd 更換為較大容量的 480GB 時. 空間配置發生了變化.
120GB*3 (raid5) 這部份維持. 但原本的 120GB*2(raid1) 因為新加入的 480GB 有更大的空間可利用, DSM 自動擴充為 120GB*3(raid5).




root@ds916plus:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md3 : active raid5 sdc6[2] sda6[0] sdb6[1]
117201152 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]
[=====>...............] reshape = 26.3% (30876612/117201152) finish=21.4min speed=67139K/sec

md2 : active raid5 sdc5[3] sda5[0] sdb5[1]
224779392 blocks super 1.2 level 5, 64k chunk, algorithm 2 [3/3] [UUU]

md1 : active raid1 sdc2[2] sda2[0] sdb2[1]
2097088 blocks [4/3] [UUU_]

md0 : active raid1 sdc1[2] sda1[0] sdb1[1]
2490176 blocks [4/3] [UUU_]

unused devices: <none>
root@ds916plus:~# mdadm -D /dev/md2
/dev/md2:
Version : 1.2
Creation Time : Tue Jan 21 10:46:51 2020
Raid Level : raid5
Array Size : 224779392 (214.37 GiB 230.17 GB)
Used Dev Size : 112389696 (107.18 GiB 115.09 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent

Update Time : Tue Jan 21 11:28:51 2020
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

Name : ds916plus:2 (local to host ds916plus)
UUID : 8d455bda:6e7e6392:e1ffdea6:661d37d8
Events : 71

Number Major Minor RaidDevice State
0 8 5 0 active sync /dev/sda5
1 8 21 1 active sync /dev/sdb5
3 8 37 2 active sync /dev/sdc5
root@ds916plus:~# mdadm -D /dev/md3
/dev/md3:
Version : 1.2
Creation Time : Tue Jan 21 10:46:51 2020
Raid Level : raid5
Array Size : 117201152 (111.77 GiB 120.01 GB)
Used Dev Size : 117201152 (111.77 GiB 120.01 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent

Update Time : Tue Jan 21 11:37:01 2020
State : clean, reshaping
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

Reshape Status : 26% complete
Delta Devices : 1, (2->3)

Name : ds916plus:3 (local to host ds916plus)
UUID : 62974382:a3869ec1:b0a3abe7:37942531
Events : 74

Number Major Minor RaidDevice State
0 8 6 0 active sync /dev/sda6
1 8 22 1 active sync /dev/sdb6
2 8 38 2 active sync /dev/sdc6


由上述可以看出, 透過 SHR/SHR2 在使用不同容量硬碟組 raid 時, 確實能夠依據不同容量去試著組合出較多可利用空間.

但如同原廠所言, 並不是一定要採用 SHR, USER 同樣可以依據自身的偏好去選擇傳統的 raid mode. 另外 SHR/SHR2 也並非 Synology 獨家特殊模式, 你可以把它視為 DSM 付予了它自動化管理的能力, 但它仍然是 Linux 系統既已支援的 raid 模式. 不少人誤以為 SHR 只有 Synology NAS 自家才能讀取的說法也並不正確.
FB:VoIP電話技術交流
2020-01-24 22:21 發佈
評分
複製連結