Page 6 of 13 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 124

Thread: HOWTO: Linux Software Raid using mdadm

  1. #51
    Join Date
    Oct 2006
    Beans
    45
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Linux Software Raid using mdadm

    Quote Originally Posted by crtlbreak View Post
    I think that page actually has the answer for you

    " ... Then create the file system on the RAID array. Format it now because the partitioner in the installer doesn't know how to modify or format RAID arrays. I used XFS file system, because XFS has great large file performance. Then you will create an alias for the RAID array with the link command because the Ubuntu installer won't find devices starting with "md"."

    Does that seem logical?
    Just to be sure - it is RAID 10 you are requiring with 4 seperate devices?
    I've done *all* those steps and it did not work ... and yes, it's raid 10 with 4 identical drives. It looks like this is a known problem with a workaround (and, perhaps, a solution in future releases). One can either use a workaround (which I did not try) or alternate install CD.
    Back to my story -- I thought I was stuck between a rock and a hard place, b/c alternate install CD was not detecting my keyboard (and live CD was not detecting my raid) ... eventually I got this situation resolved by making alternate CD recognize my keyboard correctly. Everything went smoothly from then on.

  2. #52
    Join Date
    Sep 2007
    Location
    Boise,ID
    Beans
    119
    Distro
    Kubuntu

    Re: HOWTO: Linux Software Raid using mdadm

    Gents,
    Here is an excellent manual on setting up a raid array:
    http://www.linuxconfig.org/Linux_Software_Raid_1_Setup
    Here it states that you can't boot if your / or /boot is raid 5.
    Secondly, nobody seems to know how to kill a md array once created. The trouble is your raid drives have information about the raid array on them, so to keep raid arrays from 'magically (re udev)' showing up, you need to temporarily rename the mdadm command. I renamed mine to mdadm.x

    The situation is that my server root file system stated to fail out, and I was down to one disk, and for whatever reason, that one disk had ext3 errors on it, but the disk that was not showing up in the array was good, so I needed to e2fsck the bad array to fix the ext3 file system, and create a new temporary second drive until my new server was up (i.e. bailing wire & tape).
    The plan is to create 2 arrays, copy data from one to the other (so I don't copy the ext3 FS error), then delete one array, change my new mirror drive to the correct array, and place both back on my server. md0 in this case is my old drive, md1 the new, and the array on my server I am trying to fix is md0 (which is why md0 is my old drive).

    I created two separate arrays on my development box with the old drive and my new mirror, and created 2 different arrays with one missing:

    sudo mdadm --create /dev/md1 --level=1 --raid-disks=2 missing /dev/sdb1
    (I did that for md0 & 1), then created a new ext3 fs on my new mirror, then mounted & copied the data from md1 to md0. But now I want to kill md1, and all attempts to do that failed...until I renamed mdadm to mdadm.x.

    So go through the steps to fail your drives out:
    mdadm.x /dev/md1 -f /dev/sdb1
    mdadm.x /dev/md1 -r /dev/sdb1
    Then stop the array:
    mdadm.x -S /dev/md1
    Then remove the drives from the system (I used USB-ide adapter...much easier). Then add back the new drive, which has become /dev/sdb1, and re-create the md0 array using /dev/sdb1:
    mdadm.x --create /dev/md1 --level=1 --raid-disks=2 missing /dev/sdb1
    Then fail the drive & move it to the server.

    A further note, for those of you who want some of the structure of the software raid: The hard drive you can think of as a container. In the container you have to make partitions (not always, but for the most part you do) These partitions are also containers. Then normally you put a file system in these partition containers, but software raid adds one more level. You add a software raid container to the partition container, then finally the file system, which is another type of container...it holds information on the data stored on the drive. Not sure if that really helped or not....

  3. #53
    Join Date
    Oct 2005
    Beans
    86

    Re: HOWTO: Linux Software Raid using mdadm

    Question for all you RAID knowledgeable peeps out there. I just finished creating my first RAID5 array out of 3 x 1TB WD Caviar drives. The problem was that I had a lot of data that I could not get rid of before creating the array. So what I did is that on each drive I created two partitions, say sda1 (100G) and sda2 (900G). I spread my existing data over the 3x100G partitions and was left with 3x900G blank partitions.

    I created a new RAID5 array on the 3x900G partitions and put an lvm logical volume on top of it running ext3.

    I then transferred all the data from the 3x100G partitions into the RAID array.

    So far so good.

    Now what I want to do is expand my RAID array to include the 3x100G paritions which are now empty.

    Can that be done easily? Is there a way to EXPAND the underlying partitions that make up the raid array (i.e. make each 900G partition, 1TB)? or do I just add the 3x100G partitions as separate drives to the existing array (so that the array will have 6 partitions underneath it)?

    Thanks for your help,
    Shifty

  4. #54
    Join Date
    Aug 2005
    Location
    Fargo, ND, USA
    Beans
    1,499
    Distro
    Kubuntu 10.04 Lucid Lynx

    Re: HOWTO: Linux Software Raid using mdadm

    Quote Originally Posted by ShiftyPowers View Post
    Question for all you RAID knowledgeable peeps out there. I just finished creating my first RAID5 array out of 3 x 1TB WD Caviar drives. The problem was that I had a lot of data that I could not get rid of before creating the array. So what I did is that on each drive I created two partitions, say sda1 (100G) and sda2 (900G). I spread my existing data over the 3x100G partitions and was left with 3x900G blank partitions.

    I created a new RAID5 array on the 3x900G partitions and put an lvm logical volume on top of it running ext3.

    I then transferred all the data from the 3x100G partitions into the RAID array.

    So far so good.

    Now what I want to do is expand my RAID array to include the 3x100G paritions which are now empty.

    Can that be done easily? Is there a way to EXPAND the underlying partitions that make up the raid array (i.e. make each 900G partition, 1TB)? or do I just add the 3x100G partitions as separate drives to the existing array (so that the array will have 6 partitions underneath it)?

    Thanks for your help,
    Shifty
    I think you can expand partions at the end. As in:
    Code:
    [900GB(preserved)][100GB(destroyed)] -> [1000GB]
    You wouldn't want this:
    Code:
    [100GB(preserved)][900GB(destroyed)] -> [1000GB]
    I know you won't want to add the 100 GB partitions to the existing array. The size of the array is determined by the smallest device.

    Since you wisely used LVM, why not make a new RAID5 array, make it a physical volume under LVM, add it to your existing logical volume, and expand the filesystem.
    Last edited by jpkotta; October 17th, 2008 at 03:35 AM.
    Help yourself: Search the community docs or try other resources.
    Quote Originally Posted by Henry Spencer
    Those who do not understand Unix are condemned to reinvent it, poorly.
    Let science use your computer when you aren't: Folding@Home.

  5. #55
    Join Date
    Aug 2007
    Beans
    19

    Re: HOWTO: Linux Software Raid using mdadm

    I was having problems creating my array. I would get this error message:

    Code:
    user@machine:~$ sudo mdadm --create /dev/md0 --level=1 /dev/sdb1 /dev/sdc1
    mdadm: error opening /dev/md0: No such device or address
    But the /dev/md0 node was getting created. Turns out my problem was the "md" kernel module was not installed. I ran this:

    Code:
    sudo modprobe md

    And that fixed my issue.

    I hope this helps someone.

  6. #56
    Join Date
    Dec 2008
    Beans
    3

    Re: HOWTO: Linux Software Raid using mdadm

    Quote Originally Posted by therufus View Post
    I have gutsy server version and can't get software RAID to work. mdadm isn't even installed. If I try to apt-get it, I get:

    root@server:/usr/bin# apt-get install mdadm
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package mdadm is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package mdadm has no installation candidate

    apt-get update works fine when I set everything to New Zealand servers (the Australian repository is always down - thanks for that Optus). I tried manually downloading mdadm and doing an install but make isn't even installed on gutsy. Installing make doesn't work either because of other dependencies, and further down the rabbit hole I go.

    What am I doing wrong?
    Is this still true? That I have to point to new zealand mirrors to get mdadm? How do I change my mirror to point to new zealand?
    Thanks

  7. #57
    Join Date
    Oct 2006
    Beans
    45
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Linux Software Raid using mdadm

    Nope, no need to point to New Zealand. All you need to do is to install using *Alternate* CD (text-based install).

  8. #58
    Join Date
    May 2007
    Beans
    25

    Re: HOWTO: Linux Software Raid using mdadm

    Can anyone tell me if this guide still is valid for Ubuntu 8.04 ?

    Thanks.

  9. #59
    Join Date
    Mar 2008
    Location
    London
    Beans
    87
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: HOWTO: Linux Software Raid using mdadm

    Hi Melsen
    yes - this guide is valid for 8.04 Hardy.
    I have a RAID1 setup (redundancy purposes) which is well managed by mdadm.
    Regards
    0,= ,-_-. =.
    ((_/)o o(\_))
    `' `-'(. .)`-'
    '''00\_/

  10. #60
    Join Date
    Apr 2008
    Location
    Kansas City
    Beans
    509

    Re: HOWTO: Linux Software Raid using mdadm

    I am setting up a raid-6 array today, and in doing so I realized that when I was brand new to Ubuntu and switched over a windows software raid server to ubuntu and used mdadm I didn't specify partitions, I created the array with the entire disks... it worked... and has been working since... but I noticed that nobody is doing it that way in any of the tutorials I've been browsing through. Anyone know why? are there any advantages/disadvantages to doing it either way?

    what I'm talking about is when you do "mdadm --create /dev/md0" and specify the drives to create the array with, all the tutorials are showing to use /dev/sda1 /dev/sdb1 /dev/sdc1, ect... they're creating the array using a linux raid autodetect partition from each drive... the way I did it when I didn't know any better was to do not specify a partition but the whole disk, like /dev/sda, /dev/sdb, /dev/sdc... either way I want to use the whole disk for the raid array... so since I want to use the entire disk is there an advantage to go through the trouble of creating partitions on each disk and then creating the raid array using those partitions instead of the disk itself? It seems to have worked okay on that server I did it to.

Page 6 of 13 FirstFirst ... 45678 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •