Public bug reported:

The problem is :
Mdadm –detail command is not displaying the state of an md array as degraded, 
when actually the array is in degraded state:
Expected behavious is State should be 'Clean,degraded' for a degraded md array.

OS : Ubuntu 14.04.3 LTS
Kernel : 4.2.0-23-generic
mdadm v. 3.2.5-5

1. Create a md array
# mdadm --create /dev/md500 -n2 -l1 
/dev/disk/by-id/scsi-3644a84203ba22f001d6f5278428ed6e6 
/dev/disk/by-id/scsi-3644a84203ba22f001d6f527d42d5713d
mdadm: Note: this array has metadata at the start and
    may not be suitable as a boot device.  If you plan to
    store '/boot' on this device please ensure that
    your boot-loader understands md/v1.x metadata, or use
    --metadata=0.90
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md500 started.

# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] 
[raid10]
md500 : active raid1 sdc[1] sdb[0]
      20955008 blocks super 1.2 [2/2] [UU]

unused devices: <none>

# mdadm --detail /dev/md500
/dev/md500:
        Version : 1.2
  Creation Time : Mon Feb  1 11:14:34 2016
     Raid Level : raid1
     Array Size : 20955008 (19.98 GiB 21.46 GB)
  Used Dev Size : 20955008 (19.98 GiB 21.46 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Mon Feb  1 11:16:19 2016
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : blrfsserv149:500  (local to host blrfsserv149)
           UUID : ff415711:f14f374c:b61831d4:0558303e
         Events : 17

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

2. Offline a device using scsi offline command
# echo 1 > /sys/bus/scsi/devices/0:2:1:0/delete

3. Check the mdadm --details, the state is still 'clean'
Expected behavious is State should be 'Clean,degraded'

# mdadm --detail /dev/md400
/dev/md400:
        Version : 1.2
  Creation Time : Mon Feb  1 17:36:08 2016
     Raid Level : raid1
     Array Size : 20955008 (19.98 GiB 21.46 GB)
  Used Dev Size : 20955008 (19.98 GiB 21.46 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Mon Feb  1 17:46:05 2016
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : blrfsserv149:400  (local to host blrfsserv149)
           UUID : 00728830:7dd439a9:e1abe1bf:d8ab91b5
         Events : 2

    Number   Major   Minor   RaidDevice State
       0       8       16        0      active sync
       1       8       32        1      active sync   /dev/sdc

** Affects: ubuntu-release-upgrader (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1543003

Title:
  Mdadm –detail command is not displaying the state of a degraded md
  array as degraded

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1543003/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to