Results 1 to 4 of 4

Thread: mdadm Questions

  1. #1
    Join Date
    Nov 2007
    Location
    Newry, Northern Ireland
    Beans
    1,258

    mdadm Questions

    Hi Guys,

    I'm looking for some basic answers to complete n00b questions on mdadm.

    Does the OS need to be installed before the RAID array is assembled? So essentially, do I need to install the OS and build a RAID array on separate disks? so that I have the OS on Disk1 and use Disk2,Disk3,....,DiskN for the array?

    Can it be setup to automatically rebuild using a hot spare in case of a disk failure?

    I'm building a VM with a whole bunch of small vhds to test, but want to understand the first steps a little better before I start.

    Thanks.
    Can't think of anything profound or witty.
    My Blog: http://gonzothegeek.blogspot.co.uk/

  2. #2
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,136
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: mdadm Questions

    You can setup the array in two ways. You can set it up so you can install your OS on an mdadm array, but it needs to be RAID levels 1 or 10, and you'll need to use metadata version 0.90. Or, you can have a separate OS drive, and set the array up on different disks.

    In regards to a hot spare, all you need to do is add the disk to the array, and it will automatically be used as a hot spare in the case of a disk failure.

    Code:
    mdadm –add /dev/md0 /dev/sdf1
    After the spare is added, the device will show up in the /proc/mdstat output with the “(S)” string to indicate that it’s a hot spare.

    Testing with a virtual machine is the best and fastest way to gain an understanding of how mdadm works.

  3. #3
    Join Date
    Nov 2007
    Location
    Newry, Northern Ireland
    Beans
    1,258

    Re: mdadm Questions

    That's great, very helpful.

    So if I have a small partition on a flash drive and install the OS to that, then plug in a bunch of hard drives and create a RAID array on them, I should be able to place the write intensive stuff like logs etc on the RAID array afterwards, shouldn't I? would it be better to do this using symlinks or mountpoints?
    Can't think of anything profound or witty.
    My Blog: http://gonzothegeek.blogspot.co.uk/

  4. #4
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,136
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: mdadm Questions

    Yes you could write the logs to the array, or just write them to tmpfs. If you go this route, you'd want to do it with mountpoints rather than symlinks.

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
  •