+++ This bug was initially created as a clone of Bug #6630 +++ I manage a SME 7.5 server. It had two 250gb HDDs synced OK with RAID. One of the drives (sda) failed and so we decided to get 2 new 500gb drives to upgrade with. I installed the first 500gb drive (as /dev/sda), went into array manager, and added it to the array which then went and sync'd it successfully. However, when I removed the 250gb drive, the machine wouldn't boot from the 500gb that had just been synced. It just hangs at the point that the grub menu should kick in. I have checked the bios is trying to boot the 500gb correctly. I re-installed the 250gb again, booted up, and verified that the array is showing full health/sync. The output of cat /proc/mdstat: [code]Personalities : [raid1] md2 : active raid1 sda2[0] sdb2[1] 244091520 blocks [2/2] [UU] md1 : active raid1 sda1[0] sdb1[1] 104320 blocks [2/2] [UU] unused devices: <none>[/code] The output of fdisk -l [code]Disk /dev/sda: 500.1 GB, 500106780160 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104384+ fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sda2 13 60801 488279647 fd Linux raid autodetect Disk /dev/sdb: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 13 104391 fd Linux raid autodetect /dev/sdb2 14 30401 244091610 fd Linux raid autodetect Disk /dev/md1: 106 MB, 106823680 bytes 2 heads, 4 sectors/track, 26080 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md1 doesn't contain a valid partition table Disk /dev/md2: 249.9 GB, 249949716480 bytes 2 heads, 4 sectors/track, 61022880 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md2 doesn't contain a valid partition table Disk /dev/dm-0: 247.9 GB, 247900143616 bytes 2 heads, 4 sectors/track, 60522496 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/dm-0 doesn't contain a valid partition table Disk /dev/dm-1: 2013 MB, 2013265920 bytes 2 heads, 4 sectors/track, 491520 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/dm-1 doesn't contain a valid partition table[/code] I'm particularly concerned about the message near the top that says under sda1: "Partition does not end on cylinder boundary" Does anyone know what this means? I suspect it may be the cause NOte: also check other comments on original version 7 report.
Set closed as per comment #18
Set status as per comment #18
I have sourced a brand new 2tb WD drive, have not zeroed the drive with dd. System Raid1 2 x 40gb HDs, down system remove /dev/sdb replace with 2tb drive. System sees it, makes it available to be added to array and syncs it up OK. Down the server, Remove 40gb drive /dev/sda, retain new 2tb drive as a single drive restart system SUCCESS boots OK As far as I am concerned, this Bug is NOT confirmed and works for me. [root@sme8-6911 ~]# fdisk -l Disk /dev/sda: 40.0 GB, 40016019456 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 fd Linux raid autodetect /dev/sda2 14 4865 38973690 fd Linux raid autodetect Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 13 104384+ fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sdb2 13 243201 1953407647 fd Linux raid autodetect Disk /dev/md2: 39.9 GB, 39908933632 bytes 2 heads, 4 sectors/track, 9743392 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md2 doesn't contain a valid partition table Disk /dev/md1: 106 MB, 106823680 bytes 2 heads, 4 sectors/track, 26080 cylinders Units = cylinders of 8 * 512 = 4096 bytes Device Boot Start End Blocks Id System Disk /dev/dm-0: 29.5 GB, 29561454592 bytes 255 heads, 63 sectors/track, 3593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-0 doesn't contain a valid partition table Disk /dev/dm-1: 10.3 GB, 10334765056 bytes 255 heads, 63 sectors/track, 1256 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-1 doesn't contain a valid partition table [root@sme8-6911 ~]# cat /proc/mdstat Personalities : [raid1] md1 : active raid1 sdb1[1] sda1[0] 104320 blocks [2/2] [UU] md2 : active raid1 sdb2[2] sda2[0] 38973568 blocks [2/1] [U_] [====>................] recovery = 23.3% (9116864/38973568) finish=18.6min speed=26693K/sec unused devices: <none> [root@sme8-6911 ~]# fdisk -l Disk /dev/sda: 40.0 GB, 40016019456 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 fd Linux raid autodetect /dev/sda2 14 4865 38973690 fd Linux raid autodetect Disk /dev/sdb: 2000.3 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 13 104384+ fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sdb2 13 243201 1953407647 fd Linux raid autodetect Disk /dev/md2: 39.9 GB, 39908933632 bytes 2 heads, 4 sectors/track, 9743392 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md2 doesn't contain a valid partition table Disk /dev/md1: 106 MB, 106823680 bytes 2 heads, 4 sectors/track, 26080 cylinders Units = cylinders of 8 * 512 = 4096 bytes Device Boot Start End Blocks Id System Disk /dev/dm-0: 29.5 GB, 29561454592 bytes 255 heads, 63 sectors/track, 3593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-0 doesn't contain a valid partition table Disk /dev/dm-1: 10.3 GB, 10334765056 bytes 255 heads, 63 sectors/track, 1256 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-1 doesn't contain a valid partition table [root@sme8-6911 ~]# [root@sme8-6911 ~]# cat /proc/mdstat Personalities : [raid1] md1 : active raid1 sdb1[1] sda1[0] 104320 blocks [2/2] [UU] md2 : active raid1 sdb2[1] sda2[0] 38973568 blocks [2/2] [UU] unused devices: <none> [root@sme8-6911 ~]# fdisk -l Remove 40gb HD /dev/sda and reboot Disk /dev/sda: 2000.3 GB, 2000398934016 bytes 255 heads, 63 sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104384+ fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sda2 13 243201 1953407647 fd Linux raid autodetect Disk /dev/md2: 39.9 GB, 39908933632 bytes 2 heads, 4 sectors/track, 9743392 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md2 doesn't contain a valid partition table Disk /dev/md1: 106 MB, 106823680 bytes 2 heads, 4 sectors/track, 26080 cylinders Units = cylinders of 8 * 512 = 4096 bytes Device Boot Start End Blocks Id System Disk /dev/dm-0: 29.5 GB, 29561454592 bytes 255 heads, 63 sectors/track, 3593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-0 doesn't contain a valid partition table Disk /dev/dm-1: 10.3 GB, 10334765056 bytes 255 heads, 63 sectors/track, 1256 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-1 doesn't contain a valid partition table [root@sme8-6911 ~]# cat /proc/mdstat Personalities : [raid1] md1 : active raid1 sda1[1] 104320 blocks [2/1] [_U] md2 : active raid1 sda2[1] 38973568 blocks [2/1] [_U] unused devices: <none>
Running test with a brand new 2tb WD
Terry, I wonder if this has to do with larger sized drives then ? I will have a look and see if I have any bigger ones kicking about to try.
As a further observation re installing system, when a USB install is performed on 2 x HD, install runs OK and a Raid1 system is created that boots OK, if any drive is removed the remaining drive fails to boot and stalls at the grub prompt, when an install is performed from a DVD/CD removing drives etc is NOT an issue. Seems/Maybe as though the grub menu has been installed to the USB? Greater minds than mine may know..
re three disks, don't have three of same size that I can use, however should still work OK if I use a different sized third drive, more to come.
System fully updated apart from fdisk -l producing a different result than from the initial install, /dev/dm-# is now shown, all functionality when upgrading HD is as expected, reboots etc all OK. Before update: [root@sme8-6911 ~]# fdisk -l Disk /dev/sda: 40.0 GB, 40016019456 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 fd Linux raid autodetect /dev/sda2 14 4865 38973690 fd Linux raid autodetect Disk /dev/sdb: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 13 104384+ fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sdb2 13 9729 78043807 fd Linux raid autodetect Disk /dev/md2: 39.9 GB, 39908933632 bytes 2 heads, 4 sectors/track, 9743392 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md2 doesn't contain a valid partition table Disk /dev/md1: 106 MB, 106823680 bytes 2 heads, 4 sectors/track, 26080 cylinders Units = cylinders of 8 * 512 = 4096 bytes Device Boot Start End Blocks Id System After update: [root@sme8-6911 ~]# fdisk -l Disk /dev/sda: 40.0 GB, 40016019456 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 fd Linux raid autodetect /dev/sda2 14 4865 38973690 fd Linux raid autodetect Disk /dev/sdb: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 * 1 13 104384+ fd Linux raid autodetect Partition 1 does not end on cylinder boundary. /dev/sdb2 13 9729 78043807 fd Linux raid autodetect Disk /dev/md2: 39.9 GB, 39908933632 bytes 2 heads, 4 sectors/track, 9743392 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md2 doesn't contain a valid partition table Disk /dev/md1: 106 MB, 106823680 bytes 2 heads, 4 sectors/track, 26080 cylinders Units = cylinders of 8 * 512 = 4096 bytes Device Boot Start End Blocks Id System Disk /dev/dm-0: 29.5 GB, 29561454592 bytes 255 heads, 63 sectors/track, 3593 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-0 doesn't contain a valid partition table Disk /dev/dm-1: 10.3 GB, 10334765056 bytes 255 heads, 63 sectors/track, 1256 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/dm-1 doesn't contain a valid partition table If the mbr is not zeroed on a used drive I have observed that sometimes a manual intervention is indicated from the console when Managing disk redundancy.
Should have added this "Zeroing the MBR may be the critical thing, as when the above is tried without zeroing the mbr of the larger drive it will not boot by itself and stalls at the grub prompt." has been my experience in past yet to be fully confirmed as part of this testing.
Initial observations, still to run other scenarios however. Installed SME8.1 to a 2 x 40gb system, Raid1 created and synced up, no updates applied as yet. Removed /dev/sdb and replaced with a 80gb HD (an old used drive) that has had its MBR zeroed with dd if=/dev/zero of=/dev/sdb bs=512 count=1 System restarted boots OK from original 40gb Go to console and Manage disk redundancy, option to add a HD is present, answer yes. System begins to sync new 80gb drive to the array when complete down system and remove 40gb drive /dev/sda and replace with second 80gb drive restart system SUCCESS reboots OK, from the console add second 80gb HD to array and sync, reboot. SUCCESS System now boots and runs from a 2 x 80gb Raid1. Have also tried removing 40gb drive /dev/sda first with same results Zeroing the MBR may be the critical thing, as when the above is tried without zeroing the mbr of the larger drive it will not boot by itself and stalls at the grub prompt. I do not have a brand new untouched drive to see if it also is detected, prepared and added to the array and then boots OK. As a further observation re installing system, when a USB install is performed on 2 x HD, install runs OK and a Raid1 system is created that boots OK, if any drive is removed the remaining drive fails to boot and stalls at the grub prompt, when an install is performed from a DVD/CD removing drives etc is NOT an issue. Seems as though the grub menu has been installed to the USB, more investigation needed.
(In reply to Terry Fage from comment #9) > Ok, I can setup a box and do the tests and can then also use it for testing > any fixes etc > That'll keep you busy for a bit :-) Nice one Terry - thanks. This is quite an important one IMHO. Although it was specifically about adding a larger disk as a replacement, it might be worth trying the same thing with 3 equal size disks for the scenario where one dies and is replaced to see if the error occurs there as well.
Ok, I can setup a box and do the tests and can then also use it for testing any fixes etc On SME9, Bug 7960 Bug 7953 and Bug 7997 all appear to be related.
(In reply to John Crisp from comment #7) > I don't think you need to do the grow bit - it will probably fail before > then. Indeed. And "the grow bit" was not part of the original bug report, nor AFAIK part of SME server standard functionality, so is just unnecessarily confusing the issue. Yes, if you move to a larger drive, you might want to make use of the extra space, but that is a separate issue. > The prblem seems to be that the boot sector is not getting written > correctly on the new drive for some reason (I coudl be wildly wrong here) That's what it sounded like to me. But I might have missed something. I only scanned the various bugs quickly.
(In reply to Terry Fage from comment #6) > So if I setup an actual test box, is the test procedure to be. > > Install SME8 and SME9 in a 2xHD Raid1 setup. > Remove one drive, test for both sda and sdb, replace with a larger new or a > reused HD zeroed with dd (in my case a reused HD) > Sync array (hopefully) > > Remove remaining original smaller drive, make sure system still boots, > Add a second larger HD, same as remaining drive. > Confirm array syncs. > Grow array to new size.. > Confirm system will boot from both drives by removing alternate drives. > I don't think you need to do the grow bit - it will probably fail before then. The prblem seems to be that the boot sector is not getting written correctly on the new drive for some reason (I coudl be wildly wrong here) On both versions : Drive A and Drive B are equal size. Drive C is a 'new' larger drive (you could use another equal size disk to A and B as an additional test - I think it will still fail) Install RAID 1 to A and B Pull B and install a completely wiped C Add new disk to array using admin panel Pull A and check C boots. Pull C and check A boots. Has the boot sector been synced ? I think it will fail on trying to boot C Same again but this time pull A and replace with C. Add new disk to array using admin panel Pull B and check C boots. Pull C and check B boots. Again, has the boot sector has been synced ? I think it will fail on trying to boot C In both scenarios you could try swapping C to the other connector and see if it boots but I think it will fail on either cable. You can then try to go back to A and B, pull one, install C and then see http://bugs.contribs.org/show_bug.cgi?id=6911#c4 below sfdisk A to C and then add the drive to the array. Then pull A. It should boot from C. > Bug 7960 for SME9 seems to have been on the same track Yes it would appear so.
So if I setup an actual test box, is the test procedure to be. Install SME8 and SME9 in a 2xHD Raid1 setup. Remove one drive, test for both sda and sdb, replace with a larger new or a reused HD zeroed with dd (in my case a reused HD) Sync array (hopefully) Remove remaining original smaller drive, make sure system still boots, Add a second larger HD, same as remaining drive. Confirm array syncs. Grow array to new size.. Confirm system will boot from both drives by removing alternate drives. Bug 7960 for SME9 seems to have been on the same track
(In reply to Charlie Brady from comment #4) > Re-opening. I don't think WontFix is appropriate. This appears to be a real > problem which can and should be fixed. > Sorry - yes I think I got my bugs mixed. For ref as far as I can see : http://bugs.contribs.org/show_bug.cgi?id=6630 which is against 7.5 and is therefore closed wontfix. It was cloned to this bug so is the reference. http://bugs.contribs.org/show_bug.cgi?id=6632 was a documentation bug to cover 6630, but it may be inaccurate and therefore either should be closed won't fix with a dupe to v8.x or be reopened and have a version bump. Not sure on the best policy for this. This particular bug should track the error in v8.x (possibly update the version in the bug) Agree this is quite serious and needs further investigation as it appears that the add_drive_to_raid script is failing somewhere, possibly when installing grub. I originally did some testing and could replicate the error but have no idea how to debug or fix it. I did wonder if it was a failure in the /sbin/e-smith/add_drive_to_raid script when adding grub. I'll happily follow any suggestions for further testing. Probably the first thing is to check if it occurs when adding a new drive of equal capacity ? e.g. set up test box with two drives, remove and destroy drive 2, reinsert as drive 2 and and check add drive. Remove and destroy drive 2, swap drive 1 to drive 2 to simulate failure of drive 1. Insert destroyed drive as drive 1. Check add drive. This should also be tested to see if it occurs in v9 as well.
Re-opening. I don't think WontFix is appropriate. This appears to be a real problem which can and should be fixed. Following the chain of bugs I think we should look again at: http://bugs.contribs.org/show_bug.cgi?id=6630#c6 ... However, I don't understand why if I use a straight forward sfdisk -d /dev/sda |sfdisk /dev/sdb to copy the partions I do not appear to get the error, but I do when I use the admin panel / add_device_to_raid script ...
sorry : closed wontfix
I would say yes, set closed
This bug is linked to http://bugs.contribs.org/show_bug.cgi?id=6632 Can they both be closed ?