我的 1and1 专用服务器出现磁盘故障。他们给我发了此指南。
这对我来说意义不大,但在阅读它并查看我的输出后,看起来一些工作可能已经完成。
例如,我的驱动器后面没有 (F)。
rescue:/# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [faulty]
md1 : active raid1 sda1[0]
4194240 blocks [2/1] [U_]
md3 : active raid1 sda3[1]
970470016 blocks [2/1] [_U]
unused devices: <none>
fdisk 显示:
rescue:/# fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0xc05267b6
Device Boot Start End Blocks Id System
/dev/sda1 2048 8390655 4194304 fd Linux raid autodetect
/dev/sda2 8390656 12584959 2097152 82 Linux swap / Solaris
/dev/sda3 12584960 1953525167 970470104 fd Linux raid autodetect
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x55555555
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/md3: 993.8 GB, 993761296384 bytes
2 heads, 4 sectors/track, 242617504 cylinders, total 1940940032 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/md3 doesn't contain a valid partition table
Disk /dev/md1: 4294 MB, 4294901760 bytes
2 heads, 4 sectors/track, 1048560 cylinders, total 8388480 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/md1 doesn't contain a valid partition table
Disk /dev/mapper/vg00-usr: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 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/mapper/vg00-usr doesn't contain a valid partition table
Disk /dev/mapper/vg00-var: 859.0 GB, 858993459200 bytes
255 heads, 63 sectors/track, 104433 cylinders, total 1677721600 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/mapper/vg00-var doesn't contain a valid partition table
Disk /dev/mapper/vg00-home: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders, total 12582912 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/mapper/vg00-home doesn't contain a valid partition table
rescue:/# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [faulty]
md1 : active raid1 sda1[0]
4194240 blocks [2/1] [U_]
md3 : active raid1 sda3[1]
970470016 blocks [2/1] [_U]
unused devices: <none>
因此,我正在查看步骤 9 abd cat /etc/mdadm.conf 是否不包含我期望的内容,或者这是在执行步骤 7 后写的吗?
将相同的分区结构从好驱动器 (sda) 复制到空白驱动器 (sdb)。如果使用不当,以下命令可能会擦除好驱动器。确保指定的第一个驱动器是功能驱动器,指定的第二个驱动器是空白驱动器。
我如何知道哪个是好驱动器,哪个是空白驱动器?
此外,如果这样更容易的话,我会付钱请专家帮我看一下。
谢谢。
答案1
您需要对 进行分区/dev/sdb
以获得类似于 的分区表/dev/sda
,然后需要将相关分区插入到相关数组中(mdadm -a /dev/md1 /dev/sdb1 ; mdadm -a /dev/md2 /dev/sdb3
)。
我不太清楚 是做什么/dev/sdb2
用的;看来交换分区没有 RAID。在这种情况下,您可能需要考虑添加/dev/sdb2
第二个交换分区;这可能已经完成了,但如果没有看到您的,/etc/fstab
就无法确定。如果您想这样做,您需要将该分区设置为交换分区mkswap /dev/sdb2
。
最后,如果您希望新的第二个驱动器在没有 / 的情况下可启动,dev/sda
您需要将可启动标志设置为开启/dev/sdb1
(我不太明白为什么不设置为开启)并在的 MBR/dev/sda1
上安装 grub ( )。sdb
man grub-install