Koozali.org: home of the SME Server

Adding another RAID array to a mirrored installation

penguinzrool

Adding another RAID array to a mirrored installation
« on: January 11, 2007, 03:50:32 PM »
Hi,

I've got a small VIA EPIA box running SME 7 and it's been working great for months. Recently, one of the other storage devices in the house failed (don't go anywhere near the Netger SC101...) and I was wondering if the following would be possible...

The server's currently got 2x120GB hard disks running in a mirrored array. Would it be possible to add an additional 2x250GB hard disks, set them up as an independant mirrored array and have them mounted at, say, /extradata or another random mount point?

Looking through the forums there's a lot of talk of the add_mirror command, so if I set the 1st 250GB disk up, mounted it and then ran add_mirror, would that work or would that mess up my current mirrored array?

Thanks in advance!
Chris.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Adding another RAID array to a mirrored installation
« Reply #1 on: January 11, 2007, 04:23:32 PM »
Quote from: "penguinzrool"

Looking through the forums there's a lot of talk of the add_mirror command, so if I set the 1st 250GB disk up, mounted it and then ran add_mirror, would that work or would that mess up my current mirrored array?


All that add_mirror can do is to increase the redundancy on your existing mirror, not add any available disk space.

SME server has no inbuilt support for adding additional disk space, but there are HOWTOs for mounting additional disks.  What you are planning to do is to set up a mirrored array on two additional drives, and then mount a file system which you create on that array.

penguinzrool

Adding another RAID array to a mirrored installation
« Reply #2 on: January 11, 2007, 05:07:21 PM »
Quote
What you are planning to do is to set up a mirrored array on two additional drives, and then mount a file system which you create on that array.


Spot on - I definitely don't want to mess around with the already existing system as it's working too well!

So I'm assuming the order of events would be along the lines of...

i) connect additional hard drives, boot the system and check they're detected
ii) partition the drives
iii) create a new 'md' device which mirrors the two new partitions
iv) mount the new md device

I can cope with 1,2 and 4 but it looks like 3 could be the tricky one. Surely the install process uses a tool which creates a new md device, so it must be around somewhere...

Cheers for the quick reply,
Chris.

penguinzrool

Adding another RAID array to a mirrored installation
« Reply #3 on: January 11, 2007, 05:51:34 PM »
Update - I just found the 'mdadm' tool in /sbin and it looks like mdadm --create should do what I'm after. I'll have a play and get back to you guys...

Chris.

sebb

Adding another RAID array to a mirrored installation
« Reply #4 on: January 13, 2007, 11:47:56 PM »
Ok, i m exactly in the same situation as you.

I have 2 hard disk with partitions hdb1 & hdd1 c

First i type :
# mdadm --create /dev/md0 --level 1 --raid-devices=2 /dev/hdb1 /dev/hdd1
# cat /proc/mdstat  

)==> it show that raid is ok.

# mke2fs -j /dev/md0
)==> it s formatting

# mount /dev/md0 /mnt/yourdir

But i don't know how to boot with the raid started at SME server reboot.
Raid rely not on raidtab file anymore with mdam.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Adding another RAID array to a mirrored installation
« Reply #5 on: January 13, 2007, 11:56:03 PM »
Quote from: "sebb"
Ok, i m exactly in the same situation as you.

I have 2 hard disk with partitions hdb1 & hdd1 c

First i type :
# mdadm --create /dev/md0 --level 1 --raid-devices=2 /dev/hdb1 /dev/hdd1
# cat /proc/mdstat  

...


I doubt that you were doing with with SME7. In SME7, you should already have a /dev/md0 array.

sebb

Adding another RAID array to a mirrored installation
« Reply #6 on: January 14, 2007, 12:56:06 AM »
No, that's my configuration. I didn't do anything, after installing SME 7.1.
I have md1 with hda1 (104320 block ) as a raid 1 with 1 device missing .
And a md2 with hda2 and other part of the hard disk.
And then md0

At the install, i agree to  format hda.  Will this could cause me trouble ?
Anyway, that's working.

Offline Gaston94

  • *****
  • 184
  • +0/-0
Adding another RAID array to a mirrored installation
« Reply #7 on: January 14, 2007, 02:41:28 PM »
Hi,
Quote from: "sebb"
But i don't know how to boot with the raid started at SME server reboot.
Raid rely not on raidtab file anymore with mdam.

Did you set the partition's sytem ID to "fd" (Linux raid autodetect) ?
You also can add an entry in the /etc/mdadm.conf

G.
 
Quote from: "CharlieBrady"
I doubt that you were doing with with SME7. In SME7, you should already have a /dev/md0 array.
It's was also my first though, but not looks like true V7.0 or V7.1

sebb

Adding another RAID array to a mirrored installation
« Reply #8 on: January 17, 2007, 11:38:02 PM »
Quote
Did you set the partition's sytem ID to "fd" (Linux raid autodetect) ?
You also can add an entry in the /etc/mdadm.conf


No i didn't do that, but it s enabled by default. The proof, system raid , md1 & md2 are not in the mdadm.conf file, but found at startup.
That's not the case of md0.

Anyway, i found the command to launch the raid previously created :
mdadm --assemble /dev/md0 /dev/hdb1 /dev/hdb1

Before, i did :
with a md0 already created before
mdadm --create /dev/md0 --level 1 --raid-devices=2 /dev/hdb1 /dev/hdd1
then i was able to mount it, but each time , raid1 was rebuilt on hdd1.

Next step, will be to put array info in the mdadm.conf , to have a clean stat up process.

Thx,