我们有一台 CentOS 6.4 服务器,有两个 RAID。一个是 RAID-1,另一个是 RAID-5。RAID-1 有多个分区,上面安装了操作系统。RAID-5 有两个分区,上面有一些数据。
为了复制场景,我们必须删除 RAID-1 分区并在其上安装 CentOS 4.8。我们在安装过程中删除了另一个 RAID。安装操作系统后,我们将 RAID-5 的磁盘重新插入托架并重新启动服务器。我们想安装这些分区并使用其中的数据。
现在服务器将设备 /dev/cciss/c0d1 上的分区显示为 /dev/cciss/c0d1p1 和 /dev/cciss/c0d1p2,但我们不确定如何安装它们并从中读取数据。
以下是一些命令的输出
df -h 显示 RAID-1 上的所有分区
[root@dbreplica ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/cciss/c0d0p5 9.7G 278M 8.9G 3% /
/dev/cciss/c0d0p1 193M 14M 170M 8% /boot
none 16G 0 16G 0% /dev/shm
/dev/cciss/c0d0p7 3.9G 40M 3.7G 2% /home
/dev/cciss/c0d0p9 90G 88M 85G 1% /opt
/dev/cciss/c0d0p8 985M 18M 918M 2% /tmp
/dev/cciss/c0d0p3 12G 7.2G 3.8G 66% /usr
/dev/cciss/c0d0p6 3.9G 248M 3.5G 7% /var
fdisk -l 显示两个 RAID 上的所有分区
[root@dbreplica ~]# fdisk -l
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
255 heads, 32 sectors/track, 35132 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 50 203984 83 Linux
/dev/cciss/c0d0p2 51 4066 16385280 82 Linux swap
/dev/cciss/c0d0p3 4067 7078 12288960 83 Linux
/dev/cciss/c0d0p4 7079 35132 114460320 5 Extended
/dev/cciss/c0d0p5 7079 9588 10240784 83 Linux
/dev/cciss/c0d0p6 9589 10592 4096304 83 Linux
/dev/cciss/c0d0p7 10593 11596 4096304 83 Linux
/dev/cciss/c0d0p8 11597 11847 1024064 83 Linux
/dev/cciss/c0d0p9 11848 35132 95002784 83 Linux
Disk /dev/cciss/c0d1: 2400.3 GB, 2400374186496 bytes
255 heads, 63 sectors/track, 291828 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d1p1 1 127483 1024000000 83 Linux
/dev/cciss/c0d1p2 127483 267350 1123482624 83 Linux
但 RAID-5 分区上的 fsck 给出了此错误
[root@dbreplica ~]# fsck -t ext3 /dev/cciss/c0d1
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext3: Bad magic number in super-block while trying to open /dev/cciss/c0d1
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
我不是 Linux 专家。只知道一些事情。有人能帮忙看看如何从 RAID-5 上的两个分区读取数据吗?