3개의 HDD가 있습니다: /dev/sda
및 /dev/sdb
(2x1TB), 둘 다 RAID 0 모드 -> /dev/md127
및 4TB /dev/sdc
, -> /dev/sdc
.
dd
실수로 스크립트를 실행했습니다.https://github.com/tdg5/blog/blob/master/_includes/scripts/dd_obs_test.sh/dev/md127
(스크립트는 RAID에 134218752바이트(128MB)를 씁니다.) 내 Linux 운영 체제는 어디에 있습니까 ?
모든 것을 복원할 수 있습니까? 시스템이 아직 재부팅되지 않았으며 명령의 99%를 사용할 수 없다는 오류가 표시됩니다. 다음은 콘솔의 로그입니다.
[root@ns2 tmp]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.8G 4.0K 7.8G 1% /dev
tmpfs 7.8G 12K 7.8G 1% /dev/shm
tmpfs 7.8G 624K 7.8G 1% /run
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/md127 64Z 64Z 677G 100% /
tmpfs 7.8G 0 7.8G 0% /tmp
tmpfs 1.6G 0 1.6G 0% /run/user/509
tmpfs 1.6G 0 1.6G 0% /run/user/0
[root@ns2 tmp]# df -a
Filesystem 1K-blocks Used Available Use% Mounted on
sysfs 0 0 0 - /sys
proc 0 0 0 - /proc
devtmpfs 8162264 4 8162260 1% /dev
securityfs 0 0 0 - /sys/kernel/security
tmpfs 8169748 12 8169736 1% /dev/shm
devpts 0 0 0 - /dev/pts
tmpfs 8169748 596 8169152 1% /run
tmpfs 8169748 0 8169748 0% /sys/fs/cgroup
cgroup 0 0 0 - /sys/fs/cgroup/systemd
pstore 0 0 0 - /sys/fs/pstore
cgroup 0 0 0 - /sys/fs/cgroup/cpuset
cgroup 0 0 0 - /sys/fs/cgroup/cpu,cpuacct
cgroup 0 0 0 - /sys/fs/cgroup/pids
cgroup 0 0 0 - /sys/fs/cgroup/net_cls,net_prio
cgroup 0 0 0 - /sys/fs/cgroup/blkio
cgroup 0 0 0 - /sys/fs/cgroup/memory
cgroup 0 0 0 - /sys/fs/cgroup/perf_event
cgroup 0 0 0 - /sys/fs/cgroup/devices
cgroup 0 0 0 - /sys/fs/cgroup/freezer
cgroup 0 0 0 - /sys/fs/cgroup/hugetlb
configfs 0 0 0 - /sys/kernel/config
/dev/md127 73786976294807425856 73786976294098109944 709299528 100% /
hugetlbfs 0 0 0 - /dev/hugepages
tmpfs 8169748 0 8169748 0% /tmp
systemd-1 - - - - /proc/sys/fs/binfmt_misc
debugfs 0 0 0 - /sys/kernel/debug
mqueue 0 0 0 - /dev/mqueue
tmpfs 1633952 0 1633952 0% /run/user/509
tmpfs 1633952 0 1633952 0% /run/user/0
binfmt_misc 0 0 0 - /proc/sys/fs/binfmt_misc
[root@ns2 tmp]# hdparm --help
-bash: /usr/sbin/hdparm: Structure needs cleaning
[root@ns2 tmp]# w
-bash: /usr/bin/w: Structure needs cleaning
[root@ns2 tmp]# ps
-bash: /usr/bin/ps: Structure needs cleaning
[root@ns2 tmp]# top
-bash: top: command not found
[root@ns2 tmp]# dnf --help
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted
[root@ns2 tmp]# yum --help
-bash: /usr/bin/yum: Input/output error
[root@ns2 tmp]# kill --help
-bash: kill: -help: invalid signal specification
[root@ns2 tmp]# who
-bash: who: command not found
[root@ns2 tmp]# w
-bash: /usr/bin/w: Structure needs cleaning
[root@ns2 tmp]# xfs_copy
-bash: xfs_copy: command not found
[root@ns2 tmp]# ls -la /dev/sdc1
brw-rw---- 1 root disk 8, 33 Jun 4 17:53 /dev/sdc1
[root@ns2 tmp]#
편집: 그래서 라이브 CD에서 부팅하고 RAID 0 -> /dev/md127을 /dev/sdc1에 raid.img로 DD'ed하고 xfs_repair -n을 즉시 실행했습니다. 저는 이것에 익숙하지 않습니다. 가능한 한 적은 손상으로 문제를 해결할 수 있는 다른 명령이 있습니까?
답변1
raid0에는 중복성이 없으므로 다루는 내용은 모두 사라집니다.