LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Issue with Raid (/dev/md1) not started (https://www.linuxquestions.org/questions/linux-hardware-18/issue-with-raid-dev-md1-not-started-4175501718/)

broxas 04-14-2014 04:47 PM

Issue with Raid (/dev/md1) not started
 
This is the status of the raid (/dev/md1)
Code:

/dev/md1:
        Version : 01.00
  Creation Time : Sun Dec 26 08:50:26 2010
    Raid Level : raid5
  Used Dev Size : 975742272 (930.54 GiB 999.16 GB)
  Raid Devices : 4
  Total Devices : 3
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Mon Apr 14 10:32:02 2014
          State : active, degraded, Not Started
 Active Devices : 2
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 1

        Layout : left-symmetric
    Chunk Size : 64K

          Name : storage:1
          UUID : 064f416c:f2f6d30d:19d2a723:320d0960
        Events : 2141670

    Number  Major  Minor  RaidDevice State
      0      8        2        0      active sync  /dev/sda2
      1      0        0        1      removed
      2      8      34        2      active sync  /dev/sdc2
      3      0        0        3      removed

      1      8      18        -      spare  /dev/sdb2

Result of mdstat
Code:

Personalities : [raid1] [raid10] [linear] [raid0] [raid6] [raid5] [raid4]
md1 : inactive sda2[0] sdb2[1](S) sdc2[2]
      2927226816 blocks super 1.0

md0 : active raid1 sda1[0] sdd1[3] sdc1[2] sdb1[1]
      1020032 blocks [4/4] [UUUU]

status of the components for raid /dev/md1
1) sda2 = State (Clean) / Events 2141670
2) sdb2 = State (Clean) / Events 2141670
3) sdc2 = State (Clean) / Events 2141670
4) sdd2 = State (Clean) / Events 2141506

I saw a post online to try to force assembly the raid /dev/md1. Question is based on the info above, is it safe to do so?

The command suggested was 'mdadm --assemble --force /dev/md1 /dev/sd[a-d]2'

dimonic 04-15-2014 09:12 AM

It looks to me like you need to run

mdadm /dev/md1 --add /dev/sdb2

Since sdb2 is listed as spare, and you can't start raid5 with only 2 devices.

broxas 04-16-2014 11:40 AM

I tried the suggested command above and this is what am getting

Code:

root@IomegaNAS:/# mdadm /dev/md1 --add /dev/sdb2
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 01.00 unknown, ignored.
mdadm: Cannot open /dev/sdb2: Device or resource busy

I tried to run another command to check on the status of 'sdb2' and below is what am getting

Code:

root@IomegaNAS:/# mdadm -E /dev/sdb2
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 01.00 unknown, ignored.
/dev/sdb2:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x0
    Array UUID : 064f416c:f2f6d30d:19d2a723:320d0960
          Name : storage:1
  Creation Time : Sun Dec 26 08:50:26 2010
    Raid Level : raid5
  Raid Devices : 4

 Avail Dev Size : 1951484632 (930.54 GiB 999.16 GB)
    Array Size : 5854453632 (2791.62 GiB 2997.48 GB)
  Used Dev Size : 1951484544 (930.54 GiB 999.16 GB)
  Super Offset : 1951484888 sectors
          State : clean
    Device UUID : 2545ea0f:61adf2c5:582f757e:a6203ed2

    Update Time : Mon Apr 14 10:32:02 2014
      Checksum : 77cd5bfb - correct
        Events : 2141670

        Layout : left-symmetric
    Chunk Size : 64K

    Array Slot : 1 (0, empty, 2)
  Array State : u_u_


dimonic 04-16-2014 06:29 PM

I missed the sdd device - what do you get when you try hot-adding /dev/sdd2?

$ sudo mdadm /dev/md1 --add /dev/sdd2

also what is output from

$ cat /proc/mdstat

TobiSGD 04-16-2014 07:02 PM

Please use code-tags to preserve formatting when posting output of commands, this improves the readability of your posts significantly. I fixed that in your previous posts already. If you need more information on code-tags have a look at the link in my signature.

broxas 04-17-2014 02:46 PM

Here are the outputs

Code:

root@IomegaNAS:/# mdadm /dev/md1 --add /dev/sdd2
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 01.00 unknown, ignored.
mdadm: add new device failed for /dev/sdd2 as 4: Invalid argument
root@IomegaNAS:/#

root@IomegaNAS:/# cat /proc/mdstat
Personalities : [raid1] [raid10] [linear] [raid0] [raid6] [raid5] [raid4]
md1 : inactive sda2[0] sdb2[1](S) sdc2[2]
      2927226816 blocks super 1.0

md0 : active raid1 sda1[0] sdd1[3] sdc1[2] sdb1[1]
      1020032 blocks [4/4] [UUUU]

unused devices: <none>
root@IomegaNAS:/#


dimonic 04-17-2014 03:14 PM

Hmm. The device busy thing for sdb2 is odd. Can you make sure it is not mounted already.

For sdd2 - does it exist (is it a partition of appropriate size, with the right filesystem type code?

broxas 04-17-2014 03:39 PM

Sorry am fairly new when it comes to Linux. Do you mind providing the command I can run to get you the answer you're asking

Thanks

dimonic 04-17-2014 03:54 PM

So for sdb2)

$ sudo mount

will list all the mounted partitions and their devices, check if sdb2 is mounted somewhere. It being busy is suspicious to me.

For sdd2, send the output of

Code:

$ sudo fdisk -l /dev/sdd

broxas 04-22-2014 12:15 PM

sorry dimonic for the late reply. see below output

Code:

root@IomegaNAS:/# mount
rootfs on / type rootfs (rw)
/dev/root.old on /initrd type ext2 (rw)
none on / type tmpfs (rw)
/dev/md0 on /boot type ext2 (rw)
/dev/loop0 on /mnt/apps type cramfs (ro)
/dev/loop1 on /etc type ext2 (rw)
/dev/loop2 on /oem type cramfs (ro)
proc on /proc type proc (rw)
none on /proc/bus/usb type usbfs (rw)
none on /proc/fs/nfsd type nfsd (rw)
none on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /mnt/apps/lib/init/rw type tmpfs (rw,nosuid)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)


Code:


root@IomegaNAS:/# fdisk -l /dev/sdd

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x490e5aa7

  Device Boot      Start        End      Blocks  Id  System
/dev/sdd1              1        127    1020096  83  Linux
/dev/sdd2            128      121602  975742455+  83  Linux


dimonic 04-22-2014 12:54 PM

What does

Code:

# mdadm -E /dev/sdb2

# mdadm -E /dev/sdd2

give you?

You should probably have a filesystem type code of fd (raid autodetect) rather than 82 (linux filesystem).

fdisk will let you change the type-code of partitions.

dimonic 04-22-2014 01:01 PM

You should be able to get your array working as follows:

Code:

# mdadm /dev/md1 -f /dev/sdb2
# mdadm /dev/md1 -r /dev/sdb2
# mdadm /dev/md1 -a /dev/sdb2

That fails the spare device, removes it and then adds it.

broxas 04-22-2014 02:34 PM

here is the output for mdadm -E /dev/sdb2 and mdadm -E /dev/sdd2

Code:


root@IomegaNAS:/# mdadm -E /dev/sdb2
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 01.00 unknown, ignored.
/dev/sdb2:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x0
    Array UUID : 064f416c:f2f6d30d:19d2a723:320d0960
          Name : storage:1
  Creation Time : Sun Dec 26 08:50:26 2010
    Raid Level : raid5
  Raid Devices : 4

 Avail Dev Size : 1951484632 (930.54 GiB 999.16 GB)
    Array Size : 5854453632 (2791.62 GiB 2997.48 GB)
  Used Dev Size : 1951484544 (930.54 GiB 999.16 GB)
  Super Offset : 1951484888 sectors
          State : clean
    Device UUID : 2545ea0f:61adf2c5:582f757e:a6203ed2

    Update Time : Mon Apr 14 10:32:02 2014
      Checksum : 77cd5bfb - correct
        Events : 2141670

        Layout : left-symmetric
    Chunk Size : 64K

    Array Slot : 1 (0, empty, 2)
  Array State : u_u_
root@IomegaNAS:/# mdadm -E /dev/sdd2
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 01.00 unknown, ignored.
/dev/sdd2:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x0
    Array UUID : 064f416c:f2f6d30d:19d2a723:320d0960
          Name : storage:1
  Creation Time : Sun Dec 26 08:50:26 2010
    Raid Level : raid5
  Raid Devices : 4

 Avail Dev Size : 1951484632 (930.54 GiB 999.16 GB)
    Array Size : 5854453632 (2791.62 GiB 2997.48 GB)
  Used Dev Size : 1951484544 (930.54 GiB 999.16 GB)
  Super Offset : 1951484888 sectors
          State : clean
    Device UUID : 82c3b35b:1eadd588:e25f6ae7:c071b568

    Update Time : Mon Apr 14 10:32:02 2014
      Checksum : 85e65b17 - correct
        Events : 2141506

        Layout : left-symmetric
    Chunk Size : 64K

    Array Slot : 3 (0, empty, 2)
  Array State : u_u_


broxas 04-22-2014 02:40 PM

tried the last command you suggest but no luck

Code:


root@IomegaNAS:/# mdadm /dev/md1 -f /dev/sdb2
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 01.00 unknown, ignored.
mdadm: set device faulty failed for /dev/sdb2:  No such device

root@IomegaNAS:/# mdadm /dev/md1 -r /dev/sdb2
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 01.00 unknown, ignored.
mdadm: hot remove failed for /dev/sdb2: No such device

root@IomegaNAS:/# mdadm /dev/md1 -a /dev/sdb2
mdadm: metadata format 00.90 unknown, ignored.
mdadm: metadata format 01.00 unknown, ignored.
mdadm: Cannot open /dev/sdb2: Device or resource busy


dimonic 04-22-2014 02:48 PM

Passing strange. Sorry I have not been able to help with this.


All times are GMT -5. The time now is 02:59 AM.