저는 일주일 전에 새로 설치된 Debian 10을 사용하고 있습니다. 이전 서버에서 어레이를 옮겼고 모든 것이 순조롭게 진행되었습니다.
그런 다음 어레이에 새 드라이브를 추가하고 확장했습니다.
mdadm --add /dev/md1 /dev/sda2
mdadm --grow /dev/md1 --raid-devices=5
그런데 아쉽게도 리모델링이 진행 중이라는 사실을 잊어버리고 서버를 완전히 종료하게 되었습니다.
재부팅 시 공격대에 "상태: 정리"가 표시되었지만 재구성이 재개되지 않았습니다. 재구성이 완료되면 배열 크기는 6000GB가 아닌 8000GB(2TB x4)여야 합니다. "Delta Devices" 줄도 계속 표시됩니다. 그러니까 뭔가 이상해요.
# mdadm --detail /dev/md1
/dev/md1:
Version : 1.2
Creation Time : Wed Feb 1 20:36:04 2017
Raid Level : raid5
Array Size : 5860113408 (5588.64 GiB 6000.76 GB)
Used Dev Size : 1953371136 (1862.88 GiB 2000.25 GB)
Raid Devices : 5
Total Devices : 5
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Sat Jan 9 02:28:28 2021
State : clean
Active Devices : 5
Working Devices : 5
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 512K
Consistency Policy : bitmap
Delta Devices : 1, (4->5)
Name : Debbie-NAS:1 (local to host Debbie-NAS)
UUID : d1915c3c:c727e641:060346f9:a4f590ac
Events : 18828
Number Major Minor RaidDevice State
0 8 130 0 active sync /dev/sdi2
1 8 146 1 active sync /dev/sdj2
3 8 98 2 active sync /dev/sdg2
4 8 114 3 active sync /dev/sdh2
5 8 2 4 active sync /dev/sda2
모양 변경을 수동으로 되돌리려고 했지만 아무 작업도 수행되지 않았습니다.
# mdadm --grow --continue /dev/md1 --raid-devices=5
mdadm의 출력 --검사:
# mdadm --examine /dev/sd[ijgha]2
/dev/sda2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x45
Array UUID : d1915c3c:c727e641:060346f9:a4f590ac
Name : Debbie-NAS:1 (local to host Debbie-NAS)
Creation Time : Wed Feb 1 20:36:04 2017
Raid Level : raid5
Raid Devices : 5
Avail Dev Size : 3906745344 (1862.88 GiB 2000.25 GB)
Array Size : 7813484544 (7451.52 GiB 8001.01 GB)
Used Dev Size : 3906742272 (1862.88 GiB 2000.25 GB)
Data Offset : 259072 sectors
New Offset : 254976 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 43eed232:f3d1d806:02e8bb5c:e1c90318
Internal Bitmap : 8 sectors from superblock
Reshape pos'n : 2651604992 (2528.77 GiB 2715.24 GB)
Delta Devices : 1 (4->5)
Update Time : Sat Jan 9 02:28:28 2021
Bad Block Log : 512 entries available at offset 16 sectors
Checksum : 23eaf33b - correct
Events : 18828
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 4
Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdg2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x45
Array UUID : d1915c3c:c727e641:060346f9:a4f590ac
Name : Debbie-NAS:1 (local to host Debbie-NAS)
Creation Time : Wed Feb 1 20:36:04 2017
Raid Level : raid5
Raid Devices : 5
Avail Dev Size : 3906745344 (1862.88 GiB 2000.25 GB)
Array Size : 7813484544 (7451.52 GiB 8001.01 GB)
Used Dev Size : 3906742272 (1862.88 GiB 2000.25 GB)
Data Offset : 259072 sectors
New Offset : 254976 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 2d31b7f3:57b1d12f:ba0d9e73:3cb36b33
Internal Bitmap : 8 sectors from superblock
Reshape pos'n : 2651604992 (2528.77 GiB 2715.24 GB)
Delta Devices : 1 (4->5)
Update Time : Sat Jan 9 02:28:28 2021
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 401224d3 - correct
Events : 18828
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 2
Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdh2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x45
Array UUID : d1915c3c:c727e641:060346f9:a4f590ac
Name : Debbie-NAS:1 (local to host Debbie-NAS)
Creation Time : Wed Feb 1 20:36:04 2017
Raid Level : raid5
Raid Devices : 5
Avail Dev Size : 3906745344 (1862.88 GiB 2000.25 GB)
Array Size : 7813484544 (7451.52 GiB 8001.01 GB)
Used Dev Size : 3906742272 (1862.88 GiB 2000.25 GB)
Data Offset : 259072 sectors
New Offset : 254976 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 017bea40:0a6ce8e3:f4a5639e:97a33826
Internal Bitmap : 8 sectors from superblock
Reshape pos'n : 2651604992 (2528.77 GiB 2715.24 GB)
Delta Devices : 1 (4->5)
Update Time : Sat Jan 9 02:28:28 2021
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : 5eeeb1f0 - correct
Events : 18828
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 3
Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdi2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x45
Array UUID : d1915c3c:c727e641:060346f9:a4f590ac
Name : Debbie-NAS:1 (local to host Debbie-NAS)
Creation Time : Wed Feb 1 20:36:04 2017
Raid Level : raid5
Raid Devices : 5
Avail Dev Size : 3906745344 (1862.88 GiB 2000.25 GB)
Array Size : 7813484544 (7451.52 GiB 8001.01 GB)
Used Dev Size : 3906742272 (1862.88 GiB 2000.25 GB)
Data Offset : 259072 sectors
New Offset : 254976 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 31b13e8c:ede4a229:8da4c45c:d7c1814d
Internal Bitmap : 8 sectors from superblock
Reshape pos'n : 2651604992 (2528.77 GiB 2715.24 GB)
Delta Devices : 1 (4->5)
Update Time : Sat Jan 9 02:28:28 2021
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : d5a77dd7 - correct
Events : 18828
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 0
Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdj2:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x45
Array UUID : d1915c3c:c727e641:060346f9:a4f590ac
Name : Debbie-NAS:1 (local to host Debbie-NAS)
Creation Time : Wed Feb 1 20:36:04 2017
Raid Level : raid5
Raid Devices : 5
Avail Dev Size : 3906745344 (1862.88 GiB 2000.25 GB)
Array Size : 7813484544 (7451.52 GiB 8001.01 GB)
Used Dev Size : 3906742272 (1862.88 GiB 2000.25 GB)
Data Offset : 259072 sectors
New Offset : 254976 sectors
Super Offset : 8 sectors
State : clean
Device UUID : 3d5bc161:4f1b1a23:e16f3630:57fcee88
Internal Bitmap : 8 sectors from superblock
Reshape pos'n : 2651604992 (2528.77 GiB 2715.24 GB)
Delta Devices : 1 (4->5)
Update Time : Sat Jan 9 02:28:28 2021
Bad Block Log : 512 entries available at offset 72 sectors
Checksum : b380641a - correct
Events : 18828
Layout : left-symmetric
Chunk Size : 512K
Device Role : Active device 1
Array State : AAAAA ('A' == active, '.' == missing, 'R' == replacing)
하지만 어떤 이유에서인지 배열이 읽기 전용인 것 같습니다. 어쩌면 재구성을 방해하는 것일 수도 있습니다.
# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
md1 : active (auto-read-only) raid5 sdi2[0] sdh2[4] sdj2[1] sdg2[3] sda2[5]
5860113408 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/5] [UUUUU]
bitmap: 0/15 pages [0KB], 65536KB chunk
기본 파일 시스템이 올바르게 마운트되었으며 내 데이터에 액세스할 수 있습니다.
그러나 배열이 예상보다 크지 않고 재구성이 수행되지 않았기 때문에 어딘가에 문제가 있는 것 같습니다. 하지만 어떻게 해결해야 할지 모르겠습니다.
어쩌면 "검사"를 시작해 볼 수도 있을까요?
echo 'check' > /sys/block/md1/md/sync_action
하지만 리쉐이프가 완전하지 않으면 뭔가 망가질까 봐 걱정됩니다.
어떤 아이디어가 있나요?
답변1
마지막으로 다음 명령을 실행하여 재구성을 시작했습니다.
mdadm --readwrite /dev/md1
cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
md1 : active raid5 sdi2[0] sdh2[4] sdj2[1] sdg2[3] sda2[5]
5860113408 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/5] [UUUUU]
[======>..............] reshape = 33.9% (662920160/1953371136) finish=6817.6min speed=3152K/sec
bitmap: 0/15 pages [0KB], 65536KB chunk
그래서 모든 것이 괜찮은 것 같습니다. 이번에는 서버를 종료하기 전에 재구성을 완료하겠습니다.