Jeffrey Ross writes:
It finally happened I had a disk failure in my RAID-1 system, I got a message from SMART telling me that I had a drive failing and and checked the mdstat and sure enough /dev/sda was missing/failed.Ok, drive has been replaced and I did the following: 1) recreated the partition table with "sfdisk -d /dev/sdb | sfdisk /dev/sda"2) re-added the partitions back to the raid system (eg mdadm --add /dev/md1 /dev/sda1 etc...) 3) recreated the boot sector on the new drive ***WAIT*** ran into an issue....The system was upgraded (via yum) from 14 to 15 to now 16 so I had grub, not grub2 on the system, previously it was a simple "grub-install /dev/sdX"since grub has been replaced with grub2 I tried: # grub2-install /dev/sda/sbin/grub2-setup: warn: Your core.img is unusually large. It won't fit in the embedding area.. /sbin/grub2-setup: error: embedding is not possible, but this is required for cross-disk install.so that didin't work, I'm doing something wrong, suggestions?
Carefully review the existing partition layout on what I presume is your good disk, /dev/sdb, and compare it with your recreated partition table on /dev/sda.
Hopefully, on /dev/sdb, your first partition starts on sector 2048, and not sector 63. You probably partitioned your new /dev/sda with the first partition starting on sector 63, which does not leave enough room to install grub. You'll have to start over. Fail and drop all your sda partitions on of all your md arrays. Create a new partition table on sda, recreating the partitions exactly how they are on sdb, starting with sector 2048, matching the start and the end of each partition, on sda, exactly how they exist on sdb. Then you'll be able to install grub.
If your sdb partitions start on sector 63, and you have no room to fit them on sda starting at sector 2048, you'll have to recreate all but your smallest partition on sda, then add and sync them to your array.
For the smallest partition, create it on sda making it as big as it can be. Create a new md array for it on sda, with just one unit. I believe you should be able to format it and mount it, even though its degraded. Then you can manually copy over the contents from sdb, then drop the array on sdb, and add its partition to the replacement md array on sda.
Attachment:
pgp9U7nSIrh60.pgp
Description: PGP signature
-- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org