예상치 못한 정전 이후에 액세스할 수 없는 raid5가 있습니다.
세부 사항:
# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
md0 : active raid5 sdd[3] sdc[1] sdb[0]
3906766848 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
bitmap: 0/15 pages [0KB], 65536KB chunk
unused devices: <none>
# /sbin/mdadm --misc --test /dev/md0
# echo $?
0
# /sbin/mdadm --misc --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Wed May 29 18:43:39 2019
Raid Level : raid5
Array Size : 3906766848 (3725.78 GiB 4000.53 GB)
Used Dev Size : 1953383424 (1862.89 GiB 2000.26 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Thu Mar 19 19:02:08 2020
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 512K
Consistency Policy : unknown
Name : Serwer:0 (local to host Serwer)
UUID : 84a16ed7:c54e6e9f:f3ae512c:413b3a28
Events : 4368
Number Major Minor RaidDevice State
0 8 16 0 active sync /dev/sdb
1 8 32 1 active sync /dev/sdc
3 8 48 2 active sync /dev/sdd
# ls -l /dev/md0
brw-rw---- 1 root disk 9, 0 mar 19 19:00 /dev/md0
하지만:
/sbin/fsck /dev/md0
fsck from util-linux 2.33.1
fsck: error 2 (No such file or directory) while executing fsck.ext4 for /dev/md0
# mount /dev/md0 /media/storage/
mount: /media/storage: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.
답변1
/sbin/fsck /dev/md0
/sbin
컴퓨터에서 찾을 수 없기 때문에 실패했습니다 . PATH
따라서 fsck
찾을 수 없습니다 .fsck.ext4
다음에 /sbin/fsck.ext4
추가하는 것과 같이 직접 실행하면 작동합니다 .sbin
PATH
PATH="${PATH}:/sbin" /sbin/fsck /dev/md0
답변2
사용하여 /sbin/fsck.ext4 /dev/md0
작업을 완료했습니다. /sbin/fsck /dev/md0
FS를 인식하지 못할 것이라고는 예상하지 못했습니다 .