我最近将操作系统从RHEL 5升级到了6.为此,我在新磁盘上安装了新的操作系统,并且希望安装旧磁盘。 旧磁盘在新系统中被列为/ dev / sdc和sdd,它们使用LVM使用RHEL安装GUI中的默认设置创build为RAID 1arrays。
我设法安装旧磁盘并在过去的两周内使用它们,但在重新启动后,它们没有重新安装,我无法弄清楚如何让它们恢复正常。 我没有理由相信磁盘有什么问题。
(我正在做磁盘的副本,我有一个较旧的备份,但我希望我不必使用其中任何一个…)
使用fdisk -l:
# fdisk -l Disk /dev/sdb: 300.1 GB, 300069052416 bytes 255 heads, 63 sectors/track, 36481 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00042e35 Device Boot Start End Blocks Id System /dev/sdb1 * 1 30596 245760000 fd Linux raid autodetect /dev/sdb2 30596 31118 4194304 fd Linux raid autodetect /dev/sdb3 31118 36482 43080704 fd Linux raid autodetect Disk /dev/sda: 300.1 GB, 300069052416 bytes 255 heads, 63 sectors/track, 36481 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00091208 Device Boot Start End Blocks Id System /dev/sda1 * 1 30596 245760000 fd Linux raid autodetect /dev/sda2 30596 31118 4194304 fd Linux raid autodetect /dev/sda3 31118 36482 43080704 fd Linux raid autodetect Disk /dev/sdc: 640.1 GB, 640135028736 bytes 255 heads, 63 sectors/track, 77825 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00038b0e Device Boot Start End Blocks Id System /dev/sdc1 1 77825 625129281 fd Linux raid autodetect Disk /dev/sdd: 640.1 GB, 640135028736 bytes 255 heads, 63 sectors/track, 77825 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00038b0e Device Boot Start End Blocks Id System /dev/sdd1 1 77825 625129281 fd Linux raid autodetect Disk /dev/md2: 4292 MB, 4292804608 bytes 2 heads, 4 sectors/track, 1048048 cylinders Units = cylinders of 8 * 512 = 4096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/md1: 251.7 GB, 251658043392 bytes 2 heads, 4 sectors/track, 61439952 cylinders Units = cylinders of 8 * 512 = 4096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/md127: 44.1 GB, 44080955392 bytes 2 heads, 4 sectors/track, 10761952 cylinders Units = cylinders of 8 * 512 = 4096 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000
接着
# mdadm --examine /dev/sd[cd] mdadm: /dev/sdc is not attached to Intel(R) RAID controller. mdadm: /dev/sdc is not attached to Intel(R) RAID controller. /dev/sdc: Magic : Intel Raid ISM Cfg Sig. Version : 1.1.00 Orig Family : 8e7b2bbf Family : 8e7b2bbf Generation : 0000000d Attributes : All supported UUID : c8c81af9:952cedd5:e87cafb9:ac06bc40 Checksum : 014eeac2 correct MPB Sectors : 1 Disks : 2 RAID Devices : 1 Disk01 Serial : WD-WCASY6849672 State : active Id : 00010000 Usable Size : 1250259208 (596.17 GiB 640.13 GB) [Volume0]: UUID : 03c5fad1:93722f95:ff844c3e:d7ed85f5 RAID Level : 1 Members : 2 Slots : [UU] Failed disk : none This Slot : 1 Array Size : 1250258944 (596.17 GiB 640.13 GB) Per Dev Size : 1250259208 (596.17 GiB 640.13 GB) Sector Offset : 0 Num Stripes : 4883824 Chunk Size : 64 KiB Reserved : 0 Migrate State : idle Map State : uninitialized Dirty State : clean Disk00 Serial : WD-WCASY7183713 State : active Id : 00000000 Usable Size : 1250259208 (596.17 GiB 640.13 GB) mdadm: /dev/sdd is not attached to Intel(R) RAID controller. mdadm: /dev/sdd is not attached to Intel(R) RAID controller. /dev/sdd: Magic : Intel Raid ISM Cfg Sig. Version : 1.1.00 Orig Family : 8e7b2bbf Family : 8e7b2bbf Generation : 0000000d Attributes : All supported UUID : c8c81af9:952cedd5:e87cafb9:ac06bc40 Checksum : 014eeac2 correct MPB Sectors : 1 Disks : 2 RAID Devices : 1 Disk00 Serial : WD-WCASY7183713 State : active Id : 00000000 Usable Size : 1250259208 (596.17 GiB 640.13 GB) [Volume0]: UUID : 03c5fad1:93722f95:ff844c3e:d7ed85f5 RAID Level : 1 Members : 2 Slots : [UU] Failed disk : none This Slot : 0 Array Size : 1250258944 (596.17 GiB 640.13 GB) Per Dev Size : 1250259208 (596.17 GiB 640.13 GB) Sector Offset : 0 Num Stripes : 4883824 Chunk Size : 64 KiB Reserved : 0 Migrate State : idle Map State : uninitialized Dirty State : clean Disk01 Serial : WD-WCASY6849672 State : active Id : 00010000 Usable Size : 1250259208 (596.17 GiB 640.13 GB)
试图组装:
# mdadm --assemble /dev/md3 /dev/sd[cd] mdadm: no RAID superblock on /dev/sdc mdadm: /dev/sdc has no superblock - assembly aborted
我试过了:
# mdadm --examine --scan /dev/sd[cd] ARRAY metadata=imsm UUID=c8c81af9:952cedd5:e87cafb9:ac06bc40 ARRAY /dev/md/Volume0 container=c8c81af9:952cedd5:e87cafb9:ac06bc40 member=0 UUID=03c5fad1:93722f95:ff844c3e:d7ed85f5
并将其添加到/etc/mdadm.conf文件,但似乎没有帮助。 我不知道接下来要做什么。 任何帮助将不胜感激。
编辑1:“Magic:Intel Raid ISM Cfg Sig”。 表明我需要使用dmraid?
编辑2:如下build议,我试图dmraid,但我不知道什么答案意味着:
# dmraid -ay RAID set "isw_cdjaedghjj_Volume0" already active device "isw_cdjaedghjj_Volume0" is now registered with dmeventd for monitoring RAID set "isw_cdjaedghjj_Volume0p1" already active RAID set "isw_cdjaedghjj_Volume0p1" was not activated
编辑2b:所以,现在我可以看到这里的东西:
# ls /dev/mapper/ control isw_cdjaedghjj_Volume0 isw_cdjaedghjj_Volume0p1
但它没有安装:
# mount /dev/mapper/isw_cdjaedghjj_Volume0p1 /mnt/herbert_olddrive/ mount: unknown filesystem type 'linux_raid_member'
编辑2c:好的,也许这可能有帮助:
# mdadm -I /dev/mapper/isw_cdjaedghjj_Volume0 mdadm: cannot open /dev/mapper/isw_cdjaedghjj_Volume0: Device or resource busy. # mdadm -I /dev/mapper/isw_cdjaedghjj_Volume0p1 #
第二个命令什么都不返回。 这是否意味着什么,或者我的方式偏离轨道?
编辑3:/ proc / mdstat:
# cat /proc/mdstat Personalities : [raid1] md127 : active raid1 sda3[1] sdb3[0] 43047808 blocks super 1.1 [2/2] [UU] bitmap: 0/1 pages [0KB], 65536KB chunk md1 : active raid1 sda1[1] 245759808 blocks super 1.0 [2/1] [_U] bitmap: 2/2 pages [8KB], 65536KB chunk md2 : active raid1 sda2[1] 4192192 blocks super 1.1 [2/1] [_U] unused devices: <none>
md1和md2是新的操作系统使用的sda和sdb上的raid数组。
有点困惑 – 是mdadm raid还是lvm raid? 在提到lvm raid的问题中,不断尝试使用mdadm raid。
为lvm – 第一次使用
pvscan -u
或者
pvscan -a --cache /dev/sdc /dev/sdd
将足以重新创build您的设备。 如果没有,使用
vgchange -ay VolGroup00
要么
vgcfgrestore VolGroup00
另一种可能性是你使用dmraid – 你可以试试
dmraid -ay
但是这些磁盘必须连接到intel fakeraid控制器(确保磁盘所连接的ata插槽在bios中启用了raid)
看来我在dmraid设置和mdadm设置之间有冲突。 我不明白的细节,但我最终做了什么来解决它是停止dmraid
dmraid -an
然后将驱动器组装到一个全新的md设备上:
mdadm --assemble /dev/md4 /dev/sdc /dev/sdd
当我这样做的时候,/ dev / md126和/ dev / md126p1神秘地出现了(对我来说是神秘的,但是我确定有人可以解释它),而我挂载了md126p1:
mount /dev/md126p1 /mnt/olddrive
而且:我的数据再次出现! 有几个损坏的文件,但没有数据丢失。
谢谢@Dani_l和@MatHatter的帮助!