mdadm Linux Software RAID auto-detect and assemble RAID Array

mdadm --assemble --scan


mdadm: /dev/md/diaghost05102010:2 has been started with 2 drives.
mdadm: /dev/md/diaghost05102010:1 has been started with 2 drives.
mdadm: /dev/md/diaghost05102010:0 has been started with 2 drives.
-bash-3.1# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4] [multipath]
md125 : active raid1 sda1[0] sdb1[1]
      14658185 blocks super 1.2 [2/2] [UU]
     
md126 : active raid1 sda2[0] sdb2[1]
      58604024 blocks super 1.2 [2/2] [UU]
     
md127 : active raid1 sda3[0] sdb3[1]
      1880246440 blocks super 1.2 [2/2] [UU]
      [>....................]  resync =  0.0% (1228928/1880246440) finish=407.7min speed=76808K/sec
     
unused devices: <none>

The only strange thing is that the drives were all renamed to something high, md125,126 and 127 when I originally created them as 0,1,2

What if you don't want to assemble the array?

You can just scan like this

mdadm -D -s

ARRAY /dev/md/diaghost05102010:2 metadata=1.2 name=diaghost05102010:2 UUID=d851091d:3d109a17:921ab0e1:3a465899
ARRAY /dev/md/diaghost05102010:1 metadata=1.2 name=diaghost05102010:1 UUID=f841529d:a434b994:6f27c55b:64f4ef7d
ARRAY /dev/md/diaghost05102010:0 metadata=1.2 name=diaghost05102010:0 UUID=cba74a1f:e1c83abe:1ea30dc3:cee425bd

To see the details of a specific array just do this:

mdadm -D /dev/md/diaghost05102010:2
/dev/md/diaghost05102010:2:
        Version : 1.2
  Creation Time : Mon May 10 22:05:48 2010
     Raid Level : raid1
     Array Size : 1880246440 (1793.14 GiB 1925.37 GB)
  Used Dev Size : 1880246440 (1793.14 GiB 1925.37 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Wed May 12 23:37:54 2010
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : diaghost05102010:2
           UUID : d851091d:3d109a17:921ab0e1:3a465899
         Events : 6

    Number   Major   Minor   RaidDevice State
       0       8        3        0      active sync   /dev/sda3
       1       8       19        1      active sync   /dev/sdb3


Tags:

mdadm, linux, software, raid, auto, detect, assemble, arraymdadm, scan, dev, md, diaghost, bash, proc, mdstat, personalities, linear, multipath, active, sda, sdb, uu, resync, min, unused, devices, renamed, originally, array, metadata, uuid, ab, ef, cba, ea, dc, cee, bd, creation, gib, gb, persistence, superblock, persistent, update, wed, raiddevice, sync,

Latest Articles

  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint
  • Save money on bandwidth by disabling reflective rpc queries in Linux CentOS RHEL Ubuntu Debian
  • How to access a disk with bad superblock Linux Ubuntu Debian Redhat CentOS ext3 ext4
  • ImageMagick error convert solution - convert-im6.q16: cache resources exhausted
  • PTY allocation request failed on channel 0 solution
  • docker error not supported as upperdir failed to start daemon: error initializing graphdriver: driver not supported
  • Migrated Linux Ubuntu Mint not starting services due to broken /var/run and dbus - Failed to connect to bus: No such file or directory solution