Bug 156081

Summary: Unable to set faulty drives in linear mode
Product: [Fedora] Fedora Reporter: Paolo Campegiani <p.campegiani>
Component: mdadmAssignee: Doug Ledford <dledford>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-02 15:16:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paolo Campegiani 2005-04-27 12:55:16 UTC
Description of problem:

If you define a linear RAID, a faulty device does not compromise the entire
array, nor /proc/mdstat gives a clue about that.

How reproducible:

Always.

# uname -a
Linux linux5.confor.it 2.6.11-1.14_FC3 #1 Thu Apr 7 19:23:49 EDT 2005 i686 i686
i386 GNU/Linux
# mdadm --version
mdadm - v1.6.0 - 4 June 2004
# mdadm --create --verbose /dev/md0 --chunk 16 --level raid0 --raid-devices=4
/dev/hda5 /dev/hda6 /dev/hda7 /dev/hda8

So I want a linear array composed of some partitions of /dev/hda (I know, but
it's a test).

mdadm: /dev/hda5 appears to contain an ext2fs file system
    size=457536K  mtime=Wed Apr 27 13:18:41 2005
mdadm: /dev/hda5 appears to be part of a raid array:
    level=0 devices=4 ctime=Wed Apr 27 13:20:34 2005
mdadm: /dev/hda6 appears to be part of a raid array:
    level=0 devices=4 ctime=Wed Apr 27 13:20:34 2005
mdadm: /dev/hda7 appears to be part of a raid array:
    level=0 devices=4 ctime=Wed Apr 27 13:20:34 2005
mdadm: /dev/hda8 appears to contain an ext2fs file system
    size=-76546048K  mtime=Wed Apr 27 13:18:41 2005
mdadm: /dev/hda8 appears to be part of a raid array:
    level=0 devices=4 ctime=Wed Apr 27 13:20:34 2005
Continue creating array? y
mdadm: array /dev/md0 started.

# cat /proc/mdstat
Personalities : [raid0]
md0 : active raid0 hda8[3] hda7[2] hda6[1] hda5[0]
      610048 blocks 16k chunks

unused devices: <none>

And this seems to me a bit strange, as /proc/mdstat does not contain the [UUUU]
string.

Nevertheless, the array is up and running:

# lsmod | grep raid
raid0                   8129  1

# mkfs -t ext3 /dev/md0
mke2fs 1.35 (28-Feb-2004)
max_blocks 156172288, rsv_groups = 4766, rsv_gdb = 37
[...]
This filesystem will be automatically checked every 33 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

# mount /dev/md0 /raid
# ls /raid
lost+found

I test it by copying some files in, and it works.

# mdadm --manage /dev/md0 --set-faulty /dev/hda6
mdadm: set /dev/hda6 faulty in /dev/md0

# ls /raid
[...] same as above

# cat /proc/mdstat
Personalities : [raid0]
md0 : active raid0 hda8[3] hda7[2] hda6[1] hda5[0]
      610048 blocks 16k chunks

Shouldn't /proc/mdstat tell that the linear RAID array is gone?
I can still copy files to it!

  
Actual results: RAID array continues to work.
Expected results: RAID array should be gone.

Additional info: if I build a RAID-5 array with the same partitions, I've the
[UUUU] in /proc/mdstat, and faulty-ing one array component is reported in
/proc/mdstat (and I can remove it and hot-add it, seeing reconstruction progress
and so on).

Comment 1 John Thacker 2006-10-29 21:19:49 UTC
[Mass switching of bugs filed against FC4T3 to fc4test3 from test3]

Comment 2 Christian Iseli 2007-01-20 00:24:21 UTC
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.

Comment 3 Matthew Miller 2007-04-06 15:21:36 UTC
Fedora Core 3 and Fedora Core 4 are no longer supported. If you could retest
this issue on a current release or on the latest development / test version, we
would appreciate that. Otherwise, this bug will be marked as CANTFIX one month
from now. Thanks for your help and for your patience.


Comment 4 Doug Ledford 2007-07-02 15:16:19 UTC
Closing this bug as NOTABUG.  The issue is that non-redundant raid modes can't
be set faulty.  The entire concept of tracking faulty disks is only useful if
you have some means of recovering from the fault.  If you don't, then the errors
are simply propagated back up to the higher levels of the OS, such as the file
system code, where they are handled.  The ioctl that mdadm uses to set a device
faulty hooks into the raid subsystem at the same point that a real error hooks
into it.  Since the non-redundant arrays just pass errors up to the higher
layers, the mdadm call succeeds in trigering the code, but the code essentially
does nothing.