最近有人让我尝试从 Synology NAS 上的 raid 中恢复数据。该 raid 由 2 个 2TB 大小的磁盘组成。它是 raid 1。
据我所知,其中一个驱动器出现故障,而备份驱动器仍然完好无损。我知道这两个驱动器中哪个是哪个。
重新组装 RAID 没有任何效果。出于某种原因,无论我在 --assemble 命令中声明了什么 md,每次执行 mdadm 命令后,RAID 总是被识别为 md127。当我声明其中一个驱动器丢失时,mdadm 会开始寻找名为丢失的驱动器,而不是将阵列声明为降级。在组装命令结束时,最终结果始终是“未找到适合 dev/md/e_nas:2 的驱动器”。
sudo mdadm --stop /dev/md127
sudo mdadm --assemble --verbose /dev/md0 /dev/sdb3 /dev/sda3
mdadm: looking for devices for /dev/md0
mdadm: /dev/sda3 is busy - skipping
mdadm: Merging with already-assembled /dev/md/e_nas:2
mdadm: /dev/sda3 is identified as a member of /dev/md/e_nas:2, slot 32769.
mdadm: /dev/sdb3 is identified as a member of /dev/md/e_nas:2, slot 32768.
mdadm: No suitable drives found for /dev/md/e_nas:2
sudo mdadm --detail --scan
INACTIVE-ARRAY /dev/md127 metadata=1.2 name=e_nas:2 UUID=213397ad:6d3ef545:dae75da0:662ff5a8
sudo mdadm --stop /dev/md127
sudo mdadm -Afvs
mdadm: looking for devices for further assembly
mdadm: no recogniseable superblock on /dev/sdc1
mdadm: Cannot assemble mbr metadata on /dev/sdc
mdadm: Cannot assemble mbr metadata on /dev/nvme0n1p8
mdadm: Cannot assemble mbr metadata on /dev/nvme0n1p7
mdadm: no recogniseable superblock on /dev/nvme0n1p6
mdadm: Cannot assemble mbr metadata on /dev/nvme0n1p5
mdadm: no recogniseable superblock on /dev/nvme0n1p4
mdadm: Cannot assemble mbr metadata on /dev/nvme0n1p3
mdadm: Cannot assemble mbr metadata on /dev/nvme0n1p2
mdadm: no recogniseable superblock on /dev/nvme0n1p1
mdadm: Cannot assemble mbr metadata on /dev/nvme0n1
mdadm: No super block found on /dev/sdb2 (Expected magic a92b4efc, got 32323533)
mdadm: no RAID superblock on /dev/sdb2
mdadm: No super block found on /dev/sdb1 (Expected magic a92b4efc, got 00000099)
mdadm: no RAID superblock on /dev/sdb1
mdadm: No super block found on /dev/sdb (Expected magic a92b4efc, got 00000000)
mdadm: no RAID superblock on /dev/sdb
mdadm: No super block found on /dev/sda2 (Expected magic a92b4efc, got 6d783f3c)
mdadm: no RAID superblock on /dev/sda2
mdadm: No super block found on /dev/sda1 (Expected magic a92b4efc, got 00000099)
mdadm: no RAID superblock on /dev/sda1
mdadm: No super block found on /dev/sda (Expected magic a92b4efc, got 00000000)
mdadm: no RAID superblock on /dev/sda
mdadm: /dev/sdb3 is identified as a member of /dev/md/e_nas:2, slot 32768.
mdadm: /dev/sda3 is identified as a member of /dev/md/e_nas:2, slot 32769.
mdadm: No suitable drives found for /dev/md/e_nas:2
mdadm: looking for devices for further assembly
mdadm: No arrays found in config file or automatically
以下是使用--examine 命令获取的驱动器上的一些数据。
/dev/sda3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 213397ad:6d3ef545:dae75da0:662ff5a8
Name : e_nas:2
Creation Time : Fri Oct 9 23:42:52 2015
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 3897385120 sectors (1858.42 GiB 1995.46 GB)
Array Size : 1948692416 KiB (1858.42 GiB 1995.46 GB)
Used Dev Size : 3897384832 sectors (1858.42 GiB 1995.46 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
Unused Space : before=1968 sectors, after=288 sectors
State : clean
Device UUID : c396622f:050e9557:36e44171:82178cbd
Update Time : Sun Jan 29 21:35:43 2023
Checksum : a8f09696 - correct
Events : 5185
Device Role : Active device 32769
Array State : .. ('A' == active, '.' == missing, 'R' == replacing)
WARNING Array state is inconsistent - each number should appear only once
0:- 1:32769 2:- 3:- 4:- 5:- 6:- 7:- 8:- 9:- 10:- 11:- 12:- 13:- 14:- 15:- 16:- 17:- 18:- 19:- 20:- 21:- 22:- 23:- 24:- 25:- 26:- 27:- 28:- 29:- 30:- 31:- 32:- 33:- 34:- 35:- 36:- 37:- 38:- 39:- 40:- 41:- 42:- 43:- 44:- 45:- 46:- 47:- 48:- 49:- 50:- 51:- 52:- 53:- 54:- 55:- 56:- 57:- 58:- 59:- 60:- 61:- 62:- 63:- 64:- 65:- 66:- 67:- 68:- 69:- 70:- 71:- 72:- 73:- 74:- 75:- 76:- 77:- 78:- 79:- 80:- 81:- 82:- 83:- 84:- 85:- 86:- 87:- 88:- 89:- 90:- 91:- 92:- 93:- 94:- 95:- 96:- 97:- 98:- 99:- 100:- 101:- 102:- 103:- 104:- 105:- 106:- 107:- 108:- 109:- 110:- 111:- 112:- 113:- 114:- 115:- 116:- 117:- 118:- 119:- 120:- 121:- 122:- 123:- 124:- 125:- 126:- 127:- 128:- 129:- 130:- 131:- 132:- 133:- 134:- 135:- 136:- 137:- 138:- 139:- 140:- 141:- 142:- 143:- 144:- 145:- 146:- 147:- 148:- 149:- 150:- 151:- 152:- 153:- 154:- 155:- 156:- 157:- 158:- 159:- 160:- 161:- 162:- 163:- 164:- 165:- 166:- 167:- 168:- 169:- 170:- 171:- 172:- 173:- 174:- 175:- 176:- 177:- 178:- 179:- 180:- 181:- 182:- 183:- 184:- 185:- 186:- 187:- 188:- 189:- 190:- 191:- 192:- 193:- 194:- 195:- 196:- 197:- 198:- 199:- 200:- 201:- 202:- 203:- 204:- 205:- 206:- 207:- 208:- 209:- 210:- 211:- 212:- 213:- 214:- 215:- 216:- 217:- 218:- 219:- 220:- 221:- 222:- 223:- 224:- 225:- 226:- 227:- 228:- 229:- 230:- 231:- 232:- 233:- 234:- 235:- 236:- 237:- 238:- 239:- 240:- 241:- 242:- 243:- 244:- 245:- 246:- 247:- 248:- 249:- 250:- 251:- 252:- 253:- 254:- 255:- 256:- 257:- 258:- 259:- 260:- 261:- 262:- 263:- 264:- 265:- 266:- 267:- 268:- 269:- 270:- 271:- 272:- 273:- 274:- 275:- 276:- 277:- 278:- 279:- 280:- 281:- 282:- 283:- 284:- 285:- 286:- 287:- 288:- 289:- 290:- 291:- 292:- 293:- 294:- 295:- 296:- 297:- 298:- 299:- 300:- 301:- 302:- 303:- 304:- 305:- 306:- 307:- 308:- 309:- 310:- 311:- 312:- 313:- 314:- 315:- 316:- 317:- 318:- 319:- 320:- 321:- 322:- 323:- 324:- 325:- 326:- 327:- 328:- 329:- 330:- 331:- 332:- 333:- 334:- 335:- 336:- 337:- 338:- 339:- 340:- 341:- 342:- 343:- 344:- 345:- 346:- 347:- 348:- 349:- 350:- 351:- 352:- 353:- 354:- 355:- 356:- 357:- 358:- 359:- 360:- 361:- 362:- 363:- 364:- 365:- 366:- 367:- 368:- 369:- 370:- 371:- 372:- 373:- 374:- 375:- 376:- 377:- 378:- 379:- 380:- 381:- 382:- 383:-
/dev/sdb3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 213397ad:6d3ef545:dae75da0:662ff5a8
Name : e_nas:2
Creation Time : Fri Oct 9 23:42:52 2015
Raid Level : raid1
Raid Devices : 2
Avail Dev Size : 3897385120 sectors (1858.42 GiB 1995.46 GB)
Array Size : 1948692416 KiB (1858.42 GiB 1995.46 GB)
Used Dev Size : 3897384832 sectors (1858.42 GiB 1995.46 GB)
Data Offset : 2048 sectors
Super Offset : 8 sectors
Unused Space : before=1968 sectors, after=288 sectors
State : clean
Device UUID : 44e9ebd4:7a7aaf74:5bb8bfbd:98d0343f
Update Time : Fri Jan 20 19:32:43 2023
Checksum : b9ab54fe - correct
Events : 242
Device Role : Active device 32768
Array State : .. ('A' == active, '.' == missing, 'R' == replacing)
WARNING Array state is inconsistent - each number should appear only once
0:32768 1:- 2:- 3:- 4:- 5:- 6:- 7:- 8:- 9:- 10:- 11:- 12:- 13:- 14:- 15:- 16:- 17:- 18:- 19:- 20:- 21:- 22:- 23:- 24:- 25:- 26:- 27:- 28:- 29:- 30:- 31:- 32:- 33:- 34:- 35:- 36:- 37:- 38:- 39:- 40:- 41:- 42:- 43:- 44:- 45:- 46:- 47:- 48:- 49:- 50:- 51:- 52:- 53:- 54:- 55:- 56:- 57:- 58:- 59:- 60:- 61:- 62:- 63:- 64:- 65:- 66:- 67:- 68:- 69:- 70:- 71:- 72:- 73:- 74:- 75:- 76:- 77:- 78:- 79:- 80:- 81:- 82:- 83:- 84:- 85:- 86:- 87:- 88:- 89:- 90:- 91:- 92:- 93:- 94:- 95:- 96:- 97:- 98:- 99:- 100:- 101:- 102:- 103:- 104:- 105:- 106:- 107:- 108:- 109:- 110:- 111:- 112:- 113:- 114:- 115:- 116:- 117:- 118:- 119:- 120:- 121:- 122:- 123:- 124:- 125:- 126:- 127:- 128:- 129:- 130:- 131:- 132:- 133:- 134:- 135:- 136:- 137:- 138:- 139:- 140:- 141:- 142:- 143:- 144:- 145:- 146:- 147:- 148:- 149:- 150:- 151:- 152:- 153:- 154:- 155:- 156:- 157:- 158:- 159:- 160:- 161:- 162:- 163:- 164:- 165:- 166:- 167:- 168:- 169:- 170:- 171:- 172:- 173:- 174:- 175:- 176:- 177:- 178:- 179:- 180:- 181:- 182:- 183:- 184:- 185:- 186:- 187:- 188:- 189:- 190:- 191:- 192:- 193:- 194:- 195:- 196:- 197:- 198:- 199:- 200:- 201:- 202:- 203:- 204:- 205:- 206:- 207:- 208:- 209:- 210:- 211:- 212:- 213:- 214:- 215:- 216:- 217:- 218:- 219:- 220:- 221:- 222:- 223:- 224:- 225:- 226:- 227:- 228:- 229:- 230:- 231:- 232:- 233:- 234:- 235:- 236:- 237:- 238:- 239:- 240:- 241:- 242:- 243:- 244:- 245:- 246:- 247:- 248:- 249:- 250:- 251:- 252:- 253:- 254:- 255:- 256:- 257:- 258:- 259:- 260:- 261:- 262:- 263:- 264:- 265:- 266:- 267:- 268:- 269:- 270:- 271:- 272:- 273:- 274:- 275:- 276:- 277:- 278:- 279:- 280:- 281:- 282:- 283:- 284:- 285:- 286:- 287:- 288:- 289:- 290:- 291:- 292:- 293:- 294:- 295:- 296:- 297:- 298:- 299:- 300:- 301:- 302:- 303:- 304:- 305:- 306:- 307:- 308:- 309:- 310:- 311:- 312:- 313:- 314:- 315:- 316:- 317:- 318:- 319:- 320:- 321:- 322:- 323:- 324:- 325:- 326:- 327:- 328:- 329:- 330:- 331:- 332:- 333:- 334:- 335:- 336:- 337:- 338:- 339:- 340:- 341:- 342:- 343:- 344:- 345:- 346:- 347:- 348:- 349:- 350:- 351:- 352:- 353:- 354:- 355:- 356:- 357:- 358:- 359:- 360:- 361:- 362:- 363:- 364:- 365:- 366:- 367:- 368:- 369:- 370:- 371:- 372:- 373:- 374:- 375:- 376:- 377:- 378:- 379:- 380:- 381:- 382:- 383:-
以下是 md127 的详细信息。
/dev/md127:
Version : 1.2
Raid Level : raid1
Total Devices : 2
Persistence : Superblock is persistent
State : inactive
Working Devices : 2
Name : e_nas:2
UUID : 213397ad:6d3ef545:dae75da0:662ff5a8
Events : 242
Number Major Minor RaidDevice
- 8 19 - /dev/sdb3
- 8 3 - /dev/sda3
这是 fdisk -l 中的两个磁盘。
Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD20EFRX-68E
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00085d7c
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 4982527 4980480 2.4G fd Linux raid autodetect
/dev/sda2 4982528 9176831 4194304 2G fd Linux raid autodetect
/dev/sda3 9437184 3906824351 3897387168 1.8T fd Linux raid autodetect
Disk /dev/sdb: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD20EFRX-68E
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x000c2a5c
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 4982527 4980480 2.4G fd Linux raid autodetect
/dev/sdb2 4982528 9176831 4194304 2G fd Linux raid autodetect
/dev/sdb3 9437184 3906824351 3897387168 1.8T fd Linux raid autodetect
如果需要更多信息,我很乐意提供。我对突袭和数据恢复不是很熟悉,因此任何帮助或建议都将不胜感激。
编辑1:
以下是需要的一些其他数据Nikita Kipriyanovs 评论
lsblk 的结果:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 2.4G 0 part
├─sda2 8:2 0 2G 0 part
└─sda3 8:3 0 1.8T 0 part
└─md127 9:127 0 0B 0 md
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 2.4G 0 part
├─sdb2 8:18 0 2G 0 part
└─sdb3 8:19 0 1.8T 0 part
└─md127 9:127 0 0B 0 md
blkid 的结果:
/dev/sdb2: UUID="acfd5239-cd13-40e7-bef6-6bc3124f080c" TYPE="swap" PARTUUID="000c2a5c-02"
/dev/sdb3: UUID="213397ad-6d3e-f545-dae7-5da0662ff5a8" UUID_SUB="44e9ebd4-7a7a-af74-5bb8-bfbd98d0343f" LABEL="e_nas:2" TYPE="linux_raid_member" PARTUUID="000c2a5c-03"
/dev/sdb1: UUID="14da5054-869b-884b-3017-a5a8c86610be" TYPE="linux_raid_member" PARTUUID="000c2a5c-01"
/dev/sdc1: PARTUUID="01bbceed-01"
/dev/sda2: UUID="26036c54-8e86-bf3a-d6dd-008535d3b9f1" TYPE="linux_raid_member" PARTUUID="00085d7c-02"
/dev/sda3: UUID="213397ad-6d3e-f545-dae7-5da0662ff5a8" UUID_SUB="c396622f-050e-9557-36e4-417182178cbd" LABEL="e_nas:2" TYPE="linux_raid_member" PARTUUID="00085d7c-03"
/dev/sda1: UUID="14da5054-869b-884b-3017-a5a8c86610be" TYPE="linux_raid_member" PARTUUID="00085d7c-01"
以下是我在继续尝试解决此问题时意识到的一些其他问题。尝试安装 md 时出现此错误:
mount: /mnt/md127: can't read superblock on /dev/md127.
dmesg(1) may have more information after failed mount system call.
dmesg 条目指出:
FAT-fs (md127): unable to read boot sector
正如尼基塔·基普里亚诺夫,我运行了 vgchange -ay。这似乎改变了一些东西,因为 raid 的详细信息已经改变。2 个卷已更改为已移除,第三个卷已添加为备用。以下是新的输出:
/dev/md127:
Version : 1.2
Creation Time : Fri Oct 9 23:42:52 2015
Raid Level : raid1
Used Dev Size : 1948692416 (1858.42 GiB 1995.46 GB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent
Update Time : Sun Jan 29 21:35:43 2023
State : active, FAILED, Not Started
Active Devices : 0
Working Devices : 1
Failed Devices : 0
Spare Devices : 1
Consistency Policy : unknown
Number Major Minor RaidDevice State
- 0 0 0 removed
- 0 0 1 removed
- 8 3 - spare /dev/sda3