Results 1 to 2 of 2

Thread: MDAMD Wont create software raid array

  1. #1
    Join Date
    Jul 2015
    Beans
    1

    MDAMD Wont create software raid array

    When i try create software raid 1 with mdadm, it spits out every single time following text.

    Code:
    mdadm: An option must be given to set the mode before a second device
           (/dev/md1) is listed
    fdisk -l
    Code:
    Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
    90 heads, 3 sectors/track, 21705678 cylinders, total 5860533168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x8bb1610f
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1            2048  4294967294  2147482623+  83  Linux
    Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
    90 heads, 3 sectors/track, 21705678 cylinders, total 5860533168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xb83211c1
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1            2048  4294967294  2147482623+  83  Linux
    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00039378
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048    16779264     8388608+  82  Linux swap / Solaris
    /dev/sda2        16781312    17829888      524288+  83  Linux
    /dev/sda3        17831936   234439600   108303832+  83  Linux
    Command i use with mdadm
    Code:
    mdadm –create /dev/md1 –level=1 –raid-devices=2 /dev/sdb /dev/sdc
    Anyone have any idea why its saying that?

    Have tried with unpartitioned and partitioned disks, but i guess issue is somewhere in command i use to create the mdadm software raid.
    Last edited by Jarno_Matikainen; July 1st, 2015 at 01:51 PM.

  2. #2
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,221
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: MDAMD Wont create software raid array

    I don't know if it is a typo, but you need -- in front of options, not just one.
    Code:
    sudo mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
    Also you better use partitions as members, not disks as you are trying to do. Replace them with /dev/sdb1 /dev/sdc1.

    PS. Also I see you formatted the partitions. That is not needed but it doesn't matter much if you leave it. For mdadm you only create partitions on the disks, don't format them with any filesystem. The md devices is formatted and holds the filesystem, not the partitions.
    Last edited by darkod; July 1st, 2015 at 02:17 PM.

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
  •