Всем привет!
Имеются 4 диска по 4ТБ из NAS'a Netgear 2120. Диски были в RAID10. Файловая система раздела с данными - btrfs. Отказался в один прекрасный момент монтироваться массив с данными на устройстве. Сделал клоны с дисков хранилища, поставил Ubuntu, собрал массивы, сижу ковыряю. Массивы с системой и свопом собрались нормально, ничего не пострадало, а вот массив с данными не хочет монтироваться, хотя собрался нормально.
Далее по порядку выводы команд:
# cat /proc/mdstatPersonalities : [raid1] [raid10] [linear] [multipath] [raid0] [ raid6] [raid5] [raid4]
md0 : active raid1 sdd1[7] sdc1[6] sdb1[5] sda1[4] ----- массив с системным раздлом NAS'a
4190208 blocks super 1.2 [4/4] [UUUU]
md1 : active raid1 sdc2[2] sdb2[0] sda2[1] ----- массив с swap разделом NAS'a
523712 blocks super 1.2 [3/3] [UUU]
md127 : active raid10 sdd3[3] sdc3[2] sdb3[1] sda3[0] ----- массив непосредственно с данными
7804337664 blocks super 1.2 64K chunks 2 near-copies [4/4] [UUUU]
unused devices: <none>
# mdadm --detail /dev/md127 /dev/md127:
Version : 1.2
Creation Time : Wed Feb 4 00:23:02 2015
Raid Level : raid10
Array Size : 7804337664 (7442.80 GiB 7991.64 GB)
Used Dev Size : 3902168832 (3721.40 GiB 3995.82 GB)
Raid Devices : 4
Total Devices : 4
Persistence : Superblock is persistent
Update Time : Tue Apr 10 08:51:01 2018
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Layout : near=2
Chunk Size : 64K
Name : 43020200:Data-0
UUID : 7b32ab64:d55e4ee4:f3b96f35:67529850
Events : 325
Number Major Minor RaidDevice State
0 8 3 0 active sync set-A /dev/sda3
1 8 19 1 active sync set-B /dev/sdb3
2 8 35 2 active sync set-A /dev/sdc3
3 8 51 3 active sync set-B /dev/sdd3
Разделы массива: # mdadm --examine /dev/sda3
/dev/sda3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 7b32ab64:d55e4ee4:f3b96f35:67529850
Name : 43020200:Data-0
Creation Time : Wed Feb 4 00:23:02 2015
Raid Level : raid10
Raid Devices : 4
Avail Dev Size : 7804337728 (3721.40 GiB 3995.82 GB)
Array Size : 7804337664 (7442.80 GiB 7991.64 GB)
Used Dev Size : 7804337664 (3721.40 GiB 3995.82 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before=262064 sectors, after=64 sectors
State : clean
Device UUID : fb323946:fe8c7f7f:fd4942fc:8dafff68
Update Time : Tue Apr 10 08:51:01 2018
Checksum : cbda899e - correct
Events : 325
Layout : near=2
Chunk Size : 64K
Device Role : Active device 0
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
------------------------------------------
# mdadm --examine /dev/sdb3
/dev/sdb3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 7b32ab64:d55e4ee4:f3b96f35:67529850
Name : 43020200:Data-0
Creation Time : Wed Feb 4 00:23:02 2015
Raid Level : raid10
Raid Devices : 4
Avail Dev Size : 7804337728 (3721.40 GiB 3995.82 GB)
Array Size : 7804337664 (7442.80 GiB 7991.64 GB)
Used Dev Size : 7804337664 (3721.40 GiB 3995.82 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before=262064 sectors, after=64 sectors
State : clean
Device UUID : 21859115:8d4aad64:46c36cef:0c12c543
Update Time : Tue Apr 10 08:51:01 2018
Checksum : 4e50750c - correct
Events : 325
Layout : near=2
Chunk Size : 64K
Device Role : Active device 1
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
------------------------------------------------------
# mdadm --examine /dev/sdc3
/dev/sdc3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 7b32ab64:d55e4ee4:f3b96f35:67529850
Name : 43020200:Data-0
Creation Time : Wed Feb 4 00:23:02 2015
Raid Level : raid10
Raid Devices : 4
Avail Dev Size : 7804337728 (3721.40 GiB 3995.82 GB)
Array Size : 7804337664 (7442.80 GiB 7991.64 GB)
Used Dev Size : 7804337664 (3721.40 GiB 3995.82 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before=262064 sectors, after=64 sectors
State : clean
Device UUID : 3865fc52:d44bf32d:54f9f180:aecf2f6d
Update Time : Tue Apr 10 08:51:01 2018
Checksum : ff14a1b - correct
Events : 325
Layout : near=2
Chunk Size : 64K
Device Role : Active device 2
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
--------------------------------------------------
# mdadm --examine /dev/sdd3
/dev/sdd3:
Magic : a92b4efc
Version : 1.2
Feature Map : 0x0
Array UUID : 7b32ab64:d55e4ee4:f3b96f35:67529850
Name : 43020200:Data-0
Creation Time : Wed Feb 4 00:23:02 2015
Raid Level : raid10
Raid Devices : 4
Avail Dev Size : 7804337728 (3721.40 GiB 3995.82 GB)
Array Size : 7804337664 (7442.80 GiB 7991.64 GB)
Used Dev Size : 7804337664 (3721.40 GiB 3995.82 GB)
Data Offset : 262144 sectors
Super Offset : 8 sectors
Unused Space : before=262064 sectors, after=64 sectors
State : clean
Device UUID : 93dd2b12:4a7e5b58:a458d073:5b2f41c2
Update Time : Tue Apr 10 08:51:01 2018
Checksum : 4178b3ea - correct
Events : 325
Layout : near=2
Chunk Size : 64K
Device Role : Active device 3
Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
Пытаемся монтировать:
# mount -t btrfs -o ro /dev/md127 /megaraid/mount: wrong fs type, bad option, bad superblock on /dev/md127,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
# dmesg | tail[28012.268930] BTRFS info (device md127): disk space caching is enabled
[28012.382136] BTRFS error (device md127): bad tree block start 3832626239416452422 23082805854208
[28012.392151] BTRFS error (device md127): bad tree block start 3256156600824574002 23082805854208
[28012.392165] BTRFS warning (device md127): failed to read tree root
[28012.453188] BTRFS error (device md127): open_ctree failed
[28102.889391] BTRFS info (device md127): disk space caching is enabled
[28102.925727] BTRFS error (device md127): bad tree block start 3832626239416452422 23082805854208
[28102.925850] BTRFS error (device md127): bad tree block start 3256156600824574002 23082805854208
[28102.925868] BTRFS warning (device md127): failed to read tree root
[28102.973106] BTRFS error (device md127): open_ctree failed
# btrfs check --readonly /dev/md127checksum verify failed on 23082805854208 found 085D0D8D wanted 35424544
checksum verify failed on 23082805854208 found 085D0D8D wanted 35424544
checksum verify failed on 23082805854208 found 0ACE470B wanted 30313030
checksum verify failed on 23082805854208 found 085D0D8D wanted 35424544
bytenr mismatch, want=23082805854208, have=3832626239416452422
Couldn't read tree root
Couldn't open file system
проблема в контрольной сумме? что-то не понимать
Запустил зря, наверное:
# btrfs rescue chunk-recover /dev/md127Scanning: 4319247679488 in dev0
к утру должно завершиться, надеюсь, ближе к обеду электричество вырубят))
с btrfs сталкиваюсь впервые, да и в Linux не гуру, сильно не пинайте
Куда копать дальше?
Пользователь добавил сообщение 20 Апреля 2018, 07:51:43:
без результата((
# btrfs rescue chunk-recover /dev/md127 Scanning: DONE in dev0
checksum verify failed on 23082805854208 found 085D0D8D wanted 35424544
checksum verify failed on 23082805854208 found 085D0D8D wanted 35424544
checksum verify failed on 23082805854208 found 0ACE470B wanted 30313030
checksum verify failed on 23082805854208 found 085D0D8D wanted 35424544
bytenr mismatch, want=23082805854208, have=3832626239416452422
Couldn't read tree root
open with broken chunk error
Chunk tree recovery failed
Пользователь добавил сообщение 20 Апреля 2018, 14:36:47:
В общем, оставил попытки примонтировать раздел. Поступил следующим образом:
# btrfs-find-root /dev/md127 Couldn't read tree root
Superblock thinks the generation is 482848
Superblock thinks the level is 1
Well block 16528607805440(gen: 482841 level: 1) seems good, but generation/level doesn't match, want gen: 482848 level: 1
Well block 16528669212672(gen: 482838 level: 0) seems good, but generation/level doesn't match, want gen: 482848 level: 1
Well block 16528668884992(gen: 482838 level: 0) seems good, but generation/level doesn't match, want gen: 482848 level: 1
Well block 16528668786688(gen: 482838 level: 0) seems good, but generation/level doesn't match, want gen: 482848 level: 1
...
...
Well block 14567063158784(gen: 305604 level: 0) seems good, but generation/level doesn't match, want gen: 482848 level: 1
Well block 726339289088(gen: 263228 level: 0) seems good, but generation/level doesn't match, want gen: 482848 level: 1
Well block 4292608(gen: 3 level: 0) seems good, but generation/level doesn't match, want gen: 482848 level: 1
Well block 4194304(gen: 2 level: 0) seems good, but generation/level doesn't match, want gen: 482848 level: 1
Далее запуск восстановления с первого блока из списка, что вывелся выше:
# btrfs restore -t 16528607805440 /dev/md127 /megaraid/parent transid verify failed on 16528607805440 wanted 482848 found 482841
parent transid verify failed on 16528607805440 wanted 482848 found 482841
parent transid verify failed on 16528607805440 wanted 482848 found 482841
parent transid verify failed on 16528607805440 wanted 482848 found 482841
Ignoring transid failure
Skipping snapshot snapshot
Skipping snapshot snapshot
Skipping snapshot snapshot
Skipping snapshot snapshot
Skipping snapshot snapshot
Skipping snapshot snapshot
^C
Восстановление пока отменил, т.к. место необходимое подготовить надо.
В тех каталогах, что восстановились, поврежденных или пропавших файлов пока не выявлено.