Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: Agent86 on November 16, 2009, 03:22:02 AM

Title: Raid1 Drive Sync -2
Post by: Agent86 on November 16, 2009, 03:22:02 AM
Hi

I decided to post my finding on a subject of Raid1 with IDE hard drivers simple standard setup

Regarding drives that may have started out small, then were expanded to larger drives as times goes on.

The backround:
When drivers are partitioned typically they start on cylinder 1(default) and end on (????default) and when you have 2 partitions on that drive then the second partition should start after the first left off for example

Using this example of something typical:
hda1 start on cylinder (1) and end on cylinder (208) - for example
hda2 start 209 to 7800 - for example

Less typical example
hda start cylinder (1) to cylinder (208)
hda2 start cylinder  (208) to (7800)

In this case this was likely cause by expanding the drive size in the event that you are replacing a smaller drive with a larger drive and synced the larger drive with the smaller drive, and then expanded to increase the capacity to the full drive size.

Why does anyone care
Well what happened for me was that when I remove a failed IDE drive and installed the new drive and followed the How To's:
here:
http://wiki.contribs.org/AddExtraHardDisk
and here:
http://wiki.contribs.org/Raid

One thing that occurs while my USB external backup drive is attached is that the new drive never causes SME to ask for adding the new drive to the Raid.

In other words typically you would go into SME server console and select option #5(Manage disk redundancy) and then it would simply see that you have a drive that needs to be added and it would ask you to add it to the raid, and you simply select YES
However, while the USB backup is attatched you won't get this request and thus all you may see if your md1 and md2 with _U and _U which means no drive exists.

So in this case you would be led to believe that you must add it manually and go thru all the How To's in order to figure out how to do so if you did not previously understand these commands.

However, because of the cylinder topic the manual process will likely give you trouble.
Anything from not being able to add hdc2 to the md2, or other console errors such as disk is full or not disk found etc.

And this is likely because the cylinder overlap which is not really typical and fdisk notices this right away with messages such as:
 Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         208      104384+  fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/hda2             208      119150    59947215   fd  Linux raid autodetect

Notice that hda1 and hda1 end and start on the same cylinder

Typically if you try to create these parameters with fdisk, fdisk will complain and does not like you to create this setup manually because the cylinders overlap.

So in the process I found that shutting down the server and detaching the USB backup drive will allow the option #5 to find the drive and ask if you want to add it to the raid setup.
The option #5 in the SME server console also and appears to re-create the mirror / raid just fine and also re-creates the overlap which linux will not have a problem with, but fdisk appears to dislike and so does mda

And keeping in mind that this topic likely occurred from the expansion of drives in the past because typically fdisk creates the partitions with parameters that do not land on the same cylinders.

I will install SME on a few more desktop I have in the garage and see if the partitions do this by default, but I don't think so.

Anyhow, I hope this helps anyone who also uses a standard IDE drive setup or perhaps a 2) drive Raid1 setup with USB backup as I do.

I look forward to helping to provide the best forum experience available.

Thanks for using SME