Bug 207541

Summary: --useexisting can't find the existing RAID devices
Product: Red Hat Enterprise Linux 4 Reporter: Bastien Nocera <bnocera>
Component: anacondaAssignee: Chris Lumens <clumens>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.0CC: atodorov, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0816 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 16:35:14 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:
Attachments:
Description Flags
raidsb-test.c none

Description Bastien Nocera 2006-09-21 15:15:53 UTC
anaconda-10.1.1.46-1

1. Setup a machine using RAID
2. Get the anaconda kickstart file, replace the raid lines with --useexisting.
For example, replace:
raid /boot --fstype ext3 --device=md0 --level=RAID1 raid.01 raid.11
with:
raid /boot --device=md0 --useexisting
3. anaconda won't find the RAID devices, and print the error:
* couldn't get chunksize of md0: bad md magic on device

The attached test case (a stand-alone version of what anaconda's isys does, both
in RHEL4 and HEAD) shows the same problem:
$ ./raidsb-test /dev/md0
not md magic

And in python:

import sys
>>> sys.path.append("/usr/lib/anaconda")
>>> import isys
>>> (major, minor, raidSet, level, nrDisks, totalDisks, mdMinor) =
isys.raidsb("md0")
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "/usr/lib/anaconda/isys.py", line 97, in raidsb
   return raidsbFromDevice("/tmp/md")
 File "/usr/lib/anaconda/isys.py", line 103, in raidsbFromDevice
   rc = _isys.getraidsb(fd)
ValueError: bad md magic on device

mdadm works though, but doesn't find a superblock either:
mdadm -Q /dev/md0
/dev/md0: 101.88MiB raid1 2 devices, 0 spares. Use mdadm --detail for more detail.
/dev/md0: No md super block found, not an md component.

It looks like anaconda never sets the magic on those devices.

Comment 1 Bastien Nocera 2006-09-21 15:16:03 UTC
Created attachment 136866 [details]
raidsb-test.c

Comment 2 Bastien Nocera 2006-09-21 15:26:12 UTC
Check whether it's actually writing the magic and superblocks on the devices.
mdadm --create (which anaconda uses) is supposed to write those superblocks.

Comment 3 Bastien Nocera 2006-12-04 10:25:39 UTC
From Brent:

"
RHEL4 U4 also fails to set the superblock md data:

[root@wudan ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)

[root@wudan ~]# mdadm -Q /dev/md0
/dev/md0: 101.88MiB raid1 2 devices, 0 spares. Use mdadm --detail for more detail.
/dev/md0: No md super block found, not an md component.

[root@wudan ~]# mdadm -Q /dev/md1
/dev/md1: 15.11GiB raid0 2 devices, 0 spares. Use mdadm --detail for more detail.
/dev/md1: No md super block found, not an md component.

[root@wudan ~]# mdadm -Q /dev/md2
/dev/md2: 1678.50MiB raid0 2 devices, 0 spares. Use mdadm --detail for more detail.
/dev/md2: No md super block found, not an md component.
"

Comment 5 RHEL Program Management 2007-05-09 09:34:59 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 7 Chris Lumens 2007-08-22 15:47:22 UTC
There's no more time for working on this in 4.6, so we'll have to bump it to 4.7.

Comment 11 Chris Lumens 2007-09-06 20:35:51 UTC
I've committed a potential fix that should be in tomorrow's nightly tree.  I'd
like to get some testing done there before it goes into the next snapshot for
customer testing.

Comment 13 Alexander Todorov 2007-09-20 09:39:46 UTC
Test fails with the attached reproducer from comment #1 and mdadm says:

[root@bohr ~]# mdadm -Q /dev/md0
/dev/md0: 33.28GiB raid1 4 devices, 0 spares. Use mdadm --detail for more detail.
/dev/md0: No md super block found, not an md component.

Using anaconda-ks.cfg seems to work. The relevant part of the file is:

#clearpart --all
part /boot/efi --fstype vfat --onpart sda1
part raid.2 --noformat --onpart sda2
part raid.5 --noformat --onpart sdb2
part raid.4 --noformat --onpart sdb1
part swap --onpart sdb3
part raid.3 --noformat --onpart sda3
raid / --device=md0 --useexisting

Please give more details how to reproduce using kickstart file.

Comment 15 Alexander Todorov 2007-09-20 12:09:22 UTC
My apologies, tested with an older version of anaconda that the one in errata.
Will retest soon.

Comment 18 errata-xmlrpc 2007-11-15 16:35:14 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0816.html


Comment 20 andreas 2008-06-19 09:37:13 UTC
i'm Cann't install Redhat Enterprise linux 4 on my laptop, specification my 
computer : 
 Presario V3000
 Intel Core 2 Duo 1.88 Ghz
 Ram 1 Gb
 Hdd Samsung HM160HI

 I'm cann't find for driver instalation on sata driver.
 Please  send me driver sata driver for my laptop on my email.

 Tahnk's
 Andre