Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mdadm and raid0... will not reassemble.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
siknasa9
n00b
n00b


Joined: 09 Dec 2011
Posts: 62

PostPosted: Wed Sep 09, 2015 3:56 am    Post subject: mdadm and raid0... will not reassemble. Reply with quote

My first time messing around with raid, but it certainly seemed straight forward enough. I got a laptop with 3 hard drives and I want 2 of them in a raid0 for storage while the ssd carries Gentoo. sda and sdb are the raid array while sdc is the OS. Problem is that I have to recreate the array every reboot. The steps I took pre-file system were

Code:
mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sdb


to create the array. I added the filesystem and mounted it to make sure everything worked and it did. So, I decided to do

Code:
mdadn --detail --scan -v >> /etc/mdadm.conf


to try and make it permanent. Well, upon reboot the array is assembled with no devices.

Before reboot mdadm --detail /dev/md0 produces

Code:
        Version : 1.2
  Creation Time : Tue Sep  8 18:59:18 2015
     Raid Level : raid0
     Array Size : 3906766848 (3725.78 GiB 4000.53 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Tue Sep  8 18:59:18 2015
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 512K

           Name : purgatory:0  (local to host purgatory)
           UUID : 27c85d72:6eee5e74:69d0c1ea:cce19387
         Events : 0

    Number   Major   Minor   RaidDevice State
       0       8        0        0      active sync   /dev/sda
       1       8       16        1      active sync   /dev/sdb


After reboot:

Code:
Version: 0
Raid Level : raid0
Raid Devices : 0


Not sure what the problem is since my config file before reboot matches, but when I --stop md0 and then mdadm -A md0 it gives the same output until I mdadm --create again. My config file is as so: /etc/mdadm.conf

Code:
# mdadm configuration file
#
# mdadm will function properly without the use of a configuration file,
# but this file is useful for keeping track of arrays and member disks.
# In general, a mdadm.conf file is created, and updated, after arrays
# are created. This is the opposite behavior of /etc/raidtab which is
# created prior to array construction.
#
#
# the config file takes two types of lines:
#
#   DEVICE lines specify a list of devices of where to look for
#     potential member disks
#
#   ARRAY lines specify information about how to identify arrays so
#     so that they can be activated
#
# You can have more than one device line and use wild cards. The first
# example includes SCSI the first partition of SCSI disks /dev/sdb,
# /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second
# line looks for array slices on IDE disks.
#
#DEVICE partitions
#DEVICE /dev/hda1 /dev/hdb1
#
# If you mount devfs on /dev, then a suitable way to list all devices is:
#DEVICE /dev/discs/*/*
#
#
# The AUTO line can control which arrays get assembled by auto-assembly,
# meaing either "mdadm -As" when there are no 'ARRAY' lines in this file,
# or "mdadm --incremental" when the array found is not listed in this file.
# By default, all arrays that are found are assembled.
# If you want to ignore all DDF arrays (maybe they are managed by dmraid),
# and only assemble 1.x arrays if which are marked for 'this' homehost,
# but assemble all others, then use
#AUTO -ddf homehost -1.x +all
#
# ARRAY lines specify an array to assemble and a method of identification.
# Arrays can currently be identified by using a UUID, superblock minor number,
# or a listing of devices.
#
#   super-minor is usually the minor number of the metadevice
#   UUID is the Universally Unique Identifier for the array
# Each can be obtained using
#
#    mdadm -D <md>
#
#ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371
#ARRAY /dev/md1 super-minor=1
#ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1
#
# ARRAY lines can also specify a "spare-group" for each array.  mdadm --monitor
# will then move a spare between arrays in a spare-group if one array has a failed
# drive but no spare
#ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1
#ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1
#
# When used in --follow (aka --monitor) mode, mdadm needs a
# mail address and/or a program.  This can be given with "mailaddr"
# and "program" lines to that monitoring can be started using
#    mdadm --follow --scan & echo $! > /run/mdadm/mon.pid
# If the lines are not found, mdadm will exit quietly
MAILADDR root
#PROGRAM /usr/sbin/handle-mdadm-events

DEVICE partitions

ARRAY /dev/md0 level=raid0 num-devices=2 metadata=1.2 name=purgatory:0 UUID=38686c45:9b38fd8d:a8c6495a:c543d595 devices=/dev/sda,/dev/sdb


except that the uuid matches when I follow the step above. It's changed every time do --create again of course. Not sure where to go next since even mdadm -A /dev/md0 /dev/sda /dev/sdb tells me /dev/sda has no superblock:

Code:
mdadm -A /dev/md0 /dev/sda /dev/sdb
mdadm: Cannot assemble mbr metadata on /dev/sda
mdadm: /dev/sda has no superblock - assembly aborted


Therein, I have to --stop /dev/md0 and --create all over again and everything works fine except that I will eventually have to reboot again and create it again and can't mount it automagically. Any help is greatly appreciated. Thanks.
_________________
Autobots... roll out!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum