阵列中的一个硬盘坏了,我不确定它是 raid0 还是 raid1,我想要实现的是安装工作驱动器并备份剩余的内容。
如果我安装/dev/md127
那么我只能看到一些 grub 文件,总大小约为 100mb。
如果我尝试,mount /dev/md1
我会得到:
root@rescue:~# mount /dev/md1 /mnt
mount: /dev/md1: can't read superblock
一些输出:
root@rescue:~# fdisk -l
Disk /dev/sdb: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001f015
Device Boot Start End Blocks Id System
/dev/sdb1 * 63 208844 104391 fd Linux raid autodetect
/dev/sdb2 208845 16787924 8289540 fd Linux raid autodetect
/dev/sdb3 16787925 2930272064 1456742070 fd Linux raid autodetect
Disk /dev/md127: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders, total 208640 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/md127 doesn't contain a valid partition table
root@rescue:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md127 : active raid1 sdb1[1]
104320 blocks [2/1] [_U]
unused devices: <none>
root@rescue:~# mdadm --examine /dev/sdb2
/dev/sdb2:
Magic : a92b4efc
Version : 0.90.00
UUID : fca66a1e:c6aba1f7:ace437e0:ae545265
Creation Time : Thu Oct 21 01:57:07 2010
Raid Level : raid0
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Update Time : Thu Oct 21 01:57:07 2010
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Checksum : 6138e9b8 - correct
Events : 1
Chunk Size : 256K
Number Major Minor RaidDevice State
this 1 8 18 1 active sync /dev/sdb2
0 0 8 2 0 active sync
1 1 8 18 1 active sync /dev/sdb2
如果有人可以分享,如何正确安装驱动程序以便能够访问数据(最好是在只读模式下,这样如果可能的话我不会弄乱任何东西)...
root@rescue:~# mdadm --examine --scan
ARRAY /dev/md127 UUID=0464b5c4:d777ef5e:17b64c46:2e5e61c3
ARRAY /dev/md1 UUID=fca66a1e:c6aba1f7:ace437e0:ae545265
ARRAY /dev/md2 UUID=46c22b6d:dc9668a4:13d0e329:c7b8b0ca
和
root@rescue:~# mdadm --detail /dev/md126
mdadm: cannot open /dev/md126: No such file or directory
和
root@rescue:~/dd_rescue# mdadm --detail /dev/md1
mdadm: md device /dev/md1 does not appear to be active.
root@rescue:~/dd_rescue#
root@rescue:~/dd_rescue#
root@rescue:~/dd_rescue#
root@rescue:~/dd_rescue# mdadm --detail /dev/md2
mdadm: md device /dev/md2 does not appear to be active.
聪明的
root@rescue:~# smartctl -a /dev/sda
smartctl 5.41 2011-06-09 r3365 [i686-linux-3.2.2-xxxx-std-ipv6-32] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Device Model: ST_M13FQBL
Serial Number: QNR_BFW
Firmware Version: 1117F38F
User Capacity: 4,142,054,400 bytes [4.14 GB]
Sector Size: 512 bytes logical/physical
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 6
ATA Standard is: ATA/ATAPI-6 T13 1410D revision 2
Local Time is: Thu May 16 01:37:37 2013 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Error SMART Values Read failed: scsi error aborted command
Smartctl: SMART Read Values failed.
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: UNKNOWN!
SMART Status, Attributes and Thresholds cannot be read.
Error SMART Error Log Read failed: scsi error aborted command
Smartctl: SMART Error Log Read Failed
Error SMART Error Self-Test Log Read failed: scsi error aborted command
Smartctl: SMART Self Test Log Read Failed
Device does not support Selective Self Tests/Logging
答案1
如果其中一个驱动器坏了,您将无法再挂载 /dev/md1 - 您必须在仍然活动的驱动器上挂载一个分区:/dev/sdb2 或 /dev/sdb3
您可以使用以下方式获取更多信息mdadm --examine /dev/sdb2
如果 sdb2 和 sdb3 运行 RAID0,则这些分区上的所有数据都将丢失。
答案2
挂载分区时必须指定文件系统类型,例如
mount -o ro -t ext3 /dev/sdb2 /mnt
如果您知道它的 ext3。ro - 用于只读安装。