Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm toying with a ReadyNAS device that I've recently acquired. It is a SPARC-based box, and it runs linux.

As device is pretty slow, I've pulled one drive out of array, hoping to populate it with files much faster than via Ethernet. However, assembling its MD raid seems impossible to me.

Configuration:

  • /dev/sdb is a device pulled from NAS.
  • /dev/sdb[1-3] partitions are of fd type (linux raid autodetect).
  • Each partition is part of respective /dev/md[0-2] raid1 device.
  • All raid arrays work perfectly when device is plugged to NAS.

Here's what I get:

# mdadm --assemble --scan
mdadm: failed to add /dev/sdb3 to /dev/md/2_0: Invalid argument
mdadm: failed to RUN_ARRAY /dev/md/2_0: Invalid argument
mdadm: failed to add /dev/sdb2 to /dev/md/1_0: Invalid argument
mdadm: failed to RUN_ARRAY /dev/md/1_0: Invalid argument
mdadm: failed to add /dev/sdb1 to /dev/md/0_0: Invalid argument
mdadm: failed to RUN_ARRAY /dev/md/0_0: Invalid argument
mdadm: failed to add /dev/sdb to /dev/md/2: Invalid argument
mdadm: failed to RUN_ARRAY /dev/md/2: Invalid argument
mdadm: No arrays found in config file or automatically

# mdadm -E /dev/sdb1
/dev/sdb1:
          Magic : a92b4efc
        Version : 0.90.03
           UUID : 8ae34a5e:c446418f:1245590f:4aa53e2a
  Creation Time : Wed Mar 13 09:56:36 2013
     Raid Level : raid1
  Used Dev Size : 2047936 (2000.27 MiB 2097.09 MB)
     Array Size : 2047936 (2000.27 MiB 2097.09 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

    Update Time : Wed Mar 13 10:19:36 2013
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : f7dff982 - expected 5532a626
         Events : 91658897063936


      Number   Major   Minor   RaidDevice State
this     1      33        1        1      active sync

   0     0      22        1        0      active sync
   1     1      33        1        1      active sync 

# cat /proc/mdstat
Personalities :
Unused devices: <none>

Devices /dev/sdb2 and /dev/sdb3 have same output as above, except: UUID, Used Dev Size, Array Size, Preferred Minor, Checksum and Events, so I've omitted them for clarity.

I've read somewhere that the error above means kernel modules need to be loaded first, but I believe that if I create raid1 array on another pair of disks (while this disk in question is still present), linux would have auto-loaded all necessary modules (correct me if I'm wrong here). And it still doesn't recognize md raid devices.

Attempts to assemble an array by hand yields nothing useful:

# mdadm --assemble /dev/md0 /dev/sdb1
mdadm: failed to add /dev/sdb1 to /dev/md0: Invalid argument
mdadm: /dev/md0 assembled from 0 drives - need all 2 to start it (use --run to insist).

Here mdadm was very clear about what it needs, given that this IS a raid1 array, but as it is one part of mirror copy, it must be able to work on its own:

# mdadm --assemble /dev/md0 /dev/sdb1 --run
mdadm: failed to add /dev/sdb1 to /dev/md0: Invalid argument
mdadm: failed to RUN_ARRAY /dev/md0: Invalid argument

How can I mount these MD raid devices?

share|improve this question

migrated from serverfault.com Mar 16 '13 at 9:05

This question came from our site for system and network administrators.

Had the same problem:

$ sudo mdadm --assemble /dev/md100 /dev/sdj3 
mdadm: failed to add /dev/sdj3 to /dev/md100: Invalid argument
mdadm: /dev/md100 assembled from 0 drives - need all 2 to start it (use --run to insist).

dmesg showed the following error:

$ dmesg | grep sdj3
[  102.886486]  sdj: sdj1 sdj2 sdj3
[  103.138246] md: invalid superblock checksum on sdj3
[  103.138250] md: sdj3 does not have a valid v0.90 superblock, not importing!

Which can be fixed by:

$ sudo mdadm --assemble /dev/md100 /dev/sdj3 --update=summaries --force
mdadm: /dev/md100 has been started with 1 drive (out of 2).

If you have all your drives connected their names should be appended together, I only had 1 disc connected, sdj3 in this example.

EDIT:

I should add a few following snafus.

Mounting the md-array is not possible due to it beeing LVM:

$ sudo mount /dev/md100 /mnt/readynas
mount: unknown filesystem type 'LVM2_member'

lvdisplay can give you the name of the lvm device:

$ sudo lvdisplay | grep "LV Path"
  LV Path                /dev/c/c

But mounting that device fails as well:

$ sudo mount /dev/c/c /mnt/readynas
mount: wrong fs type, bad option, bad superblock on /dev/mapper/c-c,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

dmesg will tell you why:

$ dmesg | tail -2
[ 2294.007063] EXT4-fs (dm-1): mounting ext3 file system using the ext4 subsystem
[ 2294.007069] EXT4-fs (dm-1): bad block size 16384

On ubuntu that can be handled by using another tool to mount the filesystem:

$ sudo apt-get install fuseext2
$ sudo fuseext2 -o ro,allow_other /dev/c/c /mnt/readynas
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.