Koozali.org: home of the SME Server

Mirror Issue, please help

Offline icemannz

  • **
  • 24
  • +0/-0
Mirror Issue, please help
« on: November 20, 2009, 02:24:44 AM »
Hi all,
I hope you have one of your great answers here as I have made a mistake with installing a new drive and the mirror is not working.
Basically I need to install a couple of larger drives in the SME Server.
I removed the old mirror drive and put in a new drive.
I ran the following command to add it to the mirror:
mdadm --add /dev/md1 /dev/sdc
But this is wrong - the command I read and mistyed was supposed to be
mdadm --add /dev/md1 /dev/sdc1
Now that I have put in the wrong command I thought I would try the following:
mdadm --remove /dev/md1 /dev/sdc but it doesn't work and says the drive is busy.

Also the /dev/sdc is a new drive and doesn't have any partitions on it - so what is the best way to fix this issue ?

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Mirror Issue, please help
« Reply #1 on: November 20, 2009, 04:00:33 AM »
icemannz

Login as admin & select the drive maintenance menu to add a drive to the array.
Add the two larger drives one by one, allowing the system to use existing partition size. Then use the RAID Howto to "grow the size" to utilize the larger drives.
 

« Last Edit: November 20, 2009, 04:04:56 AM by mary »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline icemannz

  • **
  • 24
  • +0/-0
Re: Mirror Issue, please help
« Reply #2 on: November 20, 2009, 04:13:07 AM »
Hi and thanks for the reply, unfortuanately I wasn't able to fix it by logging in as admin and going to Manage Disk Redundancy.
For any users in a similar issue,
I had to run the command
mdadm --manage /dev/md2 --fail /dev/sdc
Which failed the drive and then I had to format the drive the same as the existing one,
fdisk /dev/sdc
n for new partition
p for primary
1 for partition 1
t to select the type
L to show a list of types
fd to select the Linux Raid type
w to write changes,
Had to do the above for each partition and make sure you make the start and end blocks the same as the original disk,
then add the drive back into the mirror with,

mdadm --add /dev/md1 /dev/sdc1
and
mdadm --add /dev/md2 /dev/sdc2

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Mirror Issue, please help
« Reply #3 on: November 20, 2009, 06:22:51 AM »
icemannz

The drive must have all partition information deleted before using that menu option. If it doesn't work as expected you should report a bug.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline icemannz

  • **
  • 24
  • +0/-0
Re: Mirror Issue, please help
« Reply #4 on: November 23, 2009, 07:07:20 AM »
Hi Mary,
thanks for your reply,
as it turns out I have to change the drives once again for bigger ones so I will get a chance to try this out.
So I will make sure all the drives have no partitions on them and try to use the menu option.

Offline icemannz

  • **
  • 24
  • +0/-0
Re: Mirror Issue, please help
« Reply #5 on: November 24, 2009, 10:30:15 PM »
Thanks again Mary,
I had some new drives to put in and you were correct, once the partitions were removed from the new drives, all I had to do was login as admin and select the Disk Redundancy option and in there you can just add the new disk to the array.
Worked like a charm.

Offline Gert

  • *****
  • 208
  • +0/-0
    • http://www.huge.co.za
Re: Mirror Issue, please help
« Reply #6 on: November 24, 2009, 10:42:00 PM »
PS. If you just did:

mdadm --add /dev/md1 /dev/sdc1
and
mdadm --add /dev/md2 /dev/sdc2

then grub would not have been installed on the new disk and it would be unable to boot.