!["매우 유사한 슈퍼블록이 있는 것으로 보입니다"라는 오류가 발생합니다. 해결 방법이 있나요?](https://linux55.com/image/12495/%22%EB%A7%A4%EC%9A%B0%20%EC%9C%A0%EC%82%AC%ED%95%9C%20%EC%8A%88%ED%8D%BC%EB%B8%94%EB%A1%9D%EC%9D%B4%20%EC%9E%88%EB%8A%94%20%EA%B2%83%EC%9C%BC%EB%A1%9C%20%EB%B3%B4%EC%9E%85%EB%8B%88%EB%8B%A4%22%EB%9D%BC%EB%8A%94%20%EC%98%A4%EB%A5%98%EA%B0%80%20%EB%B0%9C%EC%83%9D%ED%95%A9%EB%8B%88%EB%8B%A4.%20%ED%95%B4%EA%B2%B0%20%EB%B0%A9%EB%B2%95%EC%9D%B4%20%EC%9E%88%EB%82%98%EC%9A%94%3F.png)
내 파티셔닝에 뭔가 이상한 점이 있습니다.
root@rescue ~ # mdadm -A --scan
mdadm: WARNING /dev/sdb1 and /dev/sdb appear to have very similar superblocks.
If they are really different, please --zero the superblock on one
If they are the same or overlap, please remove one from the
DEVICE list in mdadm.conf.
root@rescue ~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 4G 1 loop
sda 8:0 0 2.7T 0 disk
├─sda1 8:1 0 1G 0 part
├─sda2 8:2 0 64G 0 part
├─sda3 8:3 0 200G 0 part
├─sda4 8:4 0 1M 0 part
└─sda5 8:5 0 2.5T 0 part
sdb 8:16 0 2.7T 0 disk
└─sdb1 8:17 0 2.7T 0 part
sdc 8:32 0 223.6G 0 disk
레이드 체크 중 이런 오류가 뜹니다. 데이터 손실 없이 문제를 해결할 수 있는 방법이 있나요?
PS 새로운 출력이 추가되었습니다.
root@rescue ~ # fdisk -l /dev/sdb
Disk /dev/sdb: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Disk model: ST3000NM0033-9ZM
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A93A2325-8454-A346-8133-2ACDF59BE163
Device Start End Sectors Size Type
/dev/sdb1 2048 5860533134 5860531087 2.7T Linux RAID
root@rescue ~ # mdadm --examine /dev/sdb
/dev/sdb:
Magic : a92b4efc
Version : 0.90.00
UUID : 1ac1670b:7c95ed23:0028a58b:a51e25d4
Creation Time : Mon Dec 2 20:14:13 2019
Raid Level : raid0
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Update Time : Mon Dec 2 20:14:13 2019
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Checksum : a194544e - correct
Events : 1
Chunk Size : 8K
Number Major Minor RaidDevice State
this 1 8 17 1 active sync /dev/sdb1
0 0 8 5 0 active sync /dev/sda5
1 1 8 17 1 active sync /dev/sdb1
root@rescue ~ # mdadm --examine /dev/sdb1
/dev/sdb1:
Magic : a92b4efc
Version : 0.90.00
UUID : 1ac1670b:7c95ed23:0028a58b:a51e25d4
Creation Time : Mon Dec 2 20:14:13 2019
Raid Level : raid0
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Update Time : Mon Dec 2 20:14:13 2019
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Checksum : a194544e - correct
Events : 1
Chunk Size : 8K
Number Major Minor RaidDevice State
this 1 8 17 1 active sync /dev/sdb1
0 0 8 5 0 active sync /dev/sda5
1 1 8 17 1 active sync /dev/sdb1
답변1
이는 이전 mdadm 0.90 메타데이터에서 매우 일반적인 문제입니다. 이 메타데이터는 장치 끝 어딘가에 있지만 마지막 섹터가 아니라 64K 정렬 오프셋에 있습니다.
슈퍼블록의 길이는 4K이고 장치 끝에서 최소 64K이고 128K 미만인 64K 정렬 블록에 기록됩니다(즉, 슈퍼블록의 주소를 가져와 장치 크기를 64K의 배수로 내림). 을 누른 다음 64K를 뺍니다.
원천:https://raid.wiki.kernel.org/index.php/RAID_superblock_formats#The_version-0.90_Superblock_Format
불행하게도 64K의 배수가 아닌 전체 디스크 장치의 경우 디스크 끝 부분에 매우 가깝게 확장되는 파티션이 있습니다(마지막 부분 64K 블록까지). 이는 마지막 파티션의 슈퍼블록 위치가 전체 Drive-wise의 슈퍼블록 위치를 검색하면 결과는 정확히 동일합니다.
mdadm 매뉴얼 페이지에도 이 문제가 언급되어 있습니다.
0, 0.90 Use the original 0.90 format superblock. This format limits arrays to 28 component devices and limits component devices of levels 1 and greater to 2 terabytes. It is also possible for there to be confusion about whether the superblock applies to a whole device or just the last partition, if that partition starts on a 64K boundary.
또한 간접적으로 또 다른 해결 방법을 제안합니다. 파티션을 64K로 정렬하도록 설정하지 않으면 파티션의 슈퍼블록이 디스크와 64K로 정렬되지 않으므로 전체 디스크에 대한 슈퍼블록으로 간주될 수 없습니다.
그러나 귀하의 경우 파티션은 MiB로 정렬되어 64K로 정렬됩니다. 파티션의 슈퍼블록 위치는 이고 2048(start) + 5860531087(size) - 15(size%128) = 5860532992
, 디스크의 슈퍼블록 위치는 입니다 5860533168(size) - 48(size%128) - 128 = 5860532992
.
다시 말해서,여기에는 두 개의 슈퍼 블록이 없습니다. 동일한 것입니다.메시지의 조언을 따르고 둘 중 하나를 선택 하면 mdadm --zero-superblock
결국 둘 다 잃게 됩니다. 그러니 제발 이러지 마세요.
시스템의 경우 mdadm.conf에 DEVICE 줄을 추가하는 것이 간단한 해결 방법이지만 mdadm.conf 없이 Live CD 또는 Initramfs를 부팅하면 문제가 다시 발생합니다.
이는 0.90 메타데이터를 피해야 하는 여러 이유 중 하나입니다. 대신 1.x 메타데이터를 사용하세요.
mdadm
0.90 메타데이터 형식에서 1.0 메타데이터 형식으로 변환할 수 있습니다. 예:
mdadm --stop /dev/mdX
mdadm --assemble /dev/mdX --update=metadata /dev/sdx1 /dev/sdy1
맨페이지에서:
메타데이터 옵션은 v0.90 메타데이터 배열에서만 작동하며 이를 v1.0 메타데이터로 변환합니다. 어레이는 더티할 수 없으며(즉, 동기화가 필요할 수 없음) 쓰기 비트맵을 가질 수 없습니다.
기본 1.2 메타데이터(끝이 아닌 시작 부분)를 사용하는 것이 더 좋지만 모든 데이터를 이동해야 하며 내부 변환이 불가능합니다.