How to start (non boot) raid during startup.... - Slackware

This is a discussion on How to start (non boot) raid during startup.... - Slackware ; I've added a raid1 for my home directory only. If I reboot the machine, it doesn't automatically get assembled, so I need log in and then do: mdadm -A /dev/md0 I was surprised not to find some mention of this ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: How to start (non boot) raid during startup....

  1. How to start (non boot) raid during startup....

    I've added a raid1 for my home directory only.

    If I reboot the machine, it doesn't automatically get assembled, so I
    need log in and then do:

    mdadm -A /dev/md0


    I was surprised not to find some mention of this in /etc/rc.d - usually
    there are at least commented out sections there.

    What's the "correct" way to have these assembled during startup?

    Thanks,

    Richard


    --
    Richard Corden

  2. Re: How to start (non boot) raid during startup....

    Richard Corden wrote:

    > I've added a raid1 for my home directory only.
    >
    > If I reboot the machine, it doesn't automatically get assembled, so I
    > need log in and then do:
    >
    > mdadm -A /dev/md0
    >
    >
    > I was surprised not to find some mention of this in /etc/rc.d - usually
    > there are at least commented out sections there.
    >
    > What's the "correct" way to have these assembled during startup?
    >


    Did you set the partition type to RAID?


  3. Re: How to start (non boot) raid during startup....

    jjg wrote:
    > Richard Corden wrote:
    >
    >>
    >> What's the "correct" way to have these assembled during startup?
    >>

    >
    > Did you set the partition type to RAID?


    I think so, here's fdisk -l:

    >fdisk -l


    Disk /dev/sda: 320.0 GB, 320071851520 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 1 38913 312568641 5 Extended
    /dev/sda5 * 1 1992 16000677 83 Linux
    /dev/sda6 1993 2241 2000061 82 Linux swap
    /dev/sda7 2491 4482 16000708+ fd Linux raid
    autodetect
    /dev/sda8 4483 16433 95996376 fd Linux raid
    autodetect
    /dev/sda9 16434 34929 148569088+ 83 Linux
    /dev/sda10 34930 38913 32001448+ 83 Linux

    Disk /dev/sdb: 120.0 GB, 120033041920 bytes
    255 heads, 63 sectors/track, 14593 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 14441 115997301 5 Extended
    /dev/sdb5 1 249 2000029+ 82 Linux swap
    /dev/sdb6 499 2490 16000708+ fd Linux raid
    autodetect
    /dev/sdb7 2491 14441 95996376 fd Linux raid
    autodetect

    Disk /dev/md0: 16.3 GB, 16384655360 bytes
    2 heads, 4 sectors/track, 4000160 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes

    Disk /dev/md0 doesn't contain a valid partition table

    Disk /dev/md1: 98.3 GB, 98300198912 bytes
    2 heads, 4 sectors/track, 23999072 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes

    Disk /dev/md1 doesn't contain a valid partition table



    The idea is that I have '/home' and '/opt' as raid1:

    This is my fstab:


    >cat /etc/fstab

    /dev/sda6 swap swap defaults 0 0
    /dev/sdb5 swap swap defaults 0 0
    /dev/sda5 / jfs defaults 1 1
    /dev/sda9 /junk jfs defaults 1 1
    /dev/md0 /opt jfs defaults 1 1
    /dev/md1 /home jfs defaults 1 1



    And finally I've also got the following in '/etc/mdadm.conf'

    ARRAY /dev/md0 level=raid1 num-devices=2
    UUID=1cbf10fb:65f93862:74b02be5:9f19e6d0 auto=yes
    ARRAY /dev/md1 level=raid1 num-devices=2
    UUID=5c3b9600:54ddebe4:0c0341ed:96caa63f auto=yes



    Thanks for your help!


    Richard






    --
    Richard Corden

  4. Re: How to start (non boot) raid during startup....

    Richard Corden wrote:

    > I was surprised not to find some mention of this in /etc/rc.d - usually
    > there are at least commented out sections there.
    >
    > What's the "correct" way to have these assembled during startup?


    I've stumbled across the solution - I probably should have seen it
    sooner!

    README_RAID.TXT that comes with the Slackware distribution has:

    <<<<<
    Note: If the module for your hard drive controller is not compiled into
    the generic kernel, you will want to add that module to the MODULE_LIST
    variable in mkinitrd.conf. For example, my controller requires the
    mptspi module, so
    my /etc/mkinitrd.conf looks like:
    MODULE_LIST="ext3:mptspi"
    RAID="1"
    >>>>>



    I gave this a try, ie. I created an appropriate mkinitrd.conf for my
    kernel with RAID="1" and my raid disks were started during boot.



    Cheers,

    Richard



    --
    Richard Corden

+ Reply to Thread