Bug 90649 - can't --useexisting or --noformat raid device
Summary: can't --useexisting or --noformat raid device
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux Beta
Classification: Retired
Component: anaconda
Version: beta1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks: CambridgeTarget
TreeView+ depends on / blocked
 
Reported: 2003-05-11 23:20 UTC by Alexandre Oliva
Modified: 2007-04-18 16:53 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-10-25 20:26:01 UTC
Embargoed:


Attachments (Terms of Use)
Get raid --device all the way to partRequest.device (1.24 KB, patch)
2003-10-20 02:56 UTC, Alexandre Oliva
no flags Details | Diff

Description Alexandre Oliva 2003-05-11 23:20:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
I've tried a number of ways to get anaconda to reuse an existing raid device,
but it always aborts with a message such as: `Usable to locate raid device None
to use for /oldboot'.

I've tried kickstart lines such as:

raid /oldboot --noformat --device=md0 --level=RAID1 --fstype ext3 raid.5 raid.13
raid /oldboot --noformat --device=md0 --level=RAID1 --fstype ext3
raid /boot --useexisting --device=md0 --level=RAID1 --fstype ext3 raid.5 raid.13
raid /boot --useexisting --device=md0 --level=1 --fstype ext3
raid /oldboot --noformat --device=0 --fstype=ext3

I've tried raidstart /dev/md0 before getting to the partitioning screen, just in
case, but that didn't help.  It does recognize the raid device, but it seems
that the `minor' argument passed to partRequests.RaidRequestSpec's ctor somehow
doesn't make it to the solidified device name (or I'm missing something :-)

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Create a RAID1 device with two partitions
2.Create a kickstart file that attempts to reuse this raid device
3.Tell the installer to use it

Actual Results:  For any of the `raid' lines above, the error is always the
same, that implies that the raid device was set to None.

Expected Results:  It should be able to use the device I specified.

Additional info:

Comment 1 Alexandre Oliva 2003-07-24 00:30:47 UTC
Still present in Severn (beta1)

Comment 2 Jeremy Katz 2003-07-24 23:57:06 UTC
You shouldn't have to specify the devices that make up the raid for noformat,
iirc.  Just 
raid /oldboot --noformat --device=md0

(And also don't define raid.5, etc)

If you do that, does it work?

Comment 3 Alexandre Oliva 2003-07-25 00:43:44 UTC
The closest I tried on Severn was this:

raid /l/root/boot --noformat --device=md0 --level=RAID1 --fstype ext3

and it didn't work just the same.  Could --level and --fstype be causing
problems?  I'll try without them when I get a chance.

Comment 4 Jeremy Katz 2003-09-25 23:00:39 UTC
Quite possibly -- how does it look with test2 if you leave those off?

Comment 5 Alexandre Oliva 2003-09-26 01:06:17 UTC
I can't test this any more, at least for now, because my laptop's RAID devices
all have one replica in an internal disk and one in an external disk, which the
installer can't cope with (see bug 105602)

Comment 6 Alexandre Oliva 2003-10-17 22:43:59 UTC
Ok, I managed to recreate a set up in which I can duplicate this.

raid /oldboot --noformat --device=md5

doesn't work.  The installer halts saying:

Unable to locate raid device None to use for /oldboot

:-(

Comment 7 Alexandre Oliva 2003-10-20 02:56:40 UTC
Created attachment 95305 [details]
Get raid --device all the way to partRequest.device

The problem was that the --device passed to raid never made it to the
partRequest.  This patch fixes it.  Anaconda got all the way to `reading
package information' after this patch, with a kickstart file that would
formerly cause it to error out as described.

Comment 8 Jeremy Katz 2003-10-21 16:40:47 UTC
Below is committed and should have the same effect.  I just avoid introducing
another variable and continue to allow the device to be passed as just an int
(as well as only setting the device on preexisting just to be paranoid)

RCS file: /cvs/devel/anaconda/kickstart.py,v
retrieving revision 1.212
diff -u -u -r1.212 kickstart.py
--- kickstart.py        16 Oct 2003 16:46:38 -0000      1.212
+++ kickstart.py        21 Oct 2003 16:38:29 -0000
@@ -1044,6 +1044,8 @@
          
         if uniqueID:
             request.uniqueID = uniqueID
+        if preexist and raidDev is not None:
+            request.device = "md%s" %(raidDev,)
  
         self.addPartRequest(id.partitions, request)


Comment 9 Alexandre Oliva 2003-10-21 18:03:00 UTC
It is actually not entirely equivalent, in that it doesn't support raid devices
that are not named md#, but I guess we don't care.  I'll give this a try soon,
along with the fix for 107518.  Thanks!

Comment 10 Jeremy Katz 2003-10-21 18:25:18 UTC
anaconda won't work with raid devices not named md# anyway :)

Comment 11 Alexandre Oliva 2003-10-21 19:18:23 UTC
Yeah, I remember that from my very first contact with raid in anaconda, when I
had absolutely no clue it was supposed to be named md# :-)  I thought explicitly
naming a raid device without following this convention, in kickstart installs,
might still work, which was why I did it the way I did, but it's not that I
really care about that any more.

Comment 12 Alexandre Oliva 2003-10-25 20:26:01 UTC
Thanks, verified.


Note You need to log in before you can comment on or make changes to this bug.