Bug 188314 - Raid installs should allow only 1 drive when using raid 1
Summary: Raid installs should allow only 1 drive when using raid 1
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 15
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Anaconda Maintenance Team
QA Contact: Mike McLean
: 247119 (view as bug list)
Depends On:
Blocks: 1056643
TreeView+ depends on / blocked
Reported: 2006-04-07 19:57 UTC by Bruno Wolff III
Modified: 2014-01-22 15:46 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1056643 (view as bug list)
Last Closed: 2006-10-30 19:05:27 UTC
Type: ---

Attachments (Terms of Use)
Respin script (8.36 KB, application/x-shellscript)
2006-11-12 18:06 UTC, Bruno Wolff III
no flags Details
This is a replacement spec file for the FC6 anaconda (97.69 KB, application/octet-stream)
2006-11-12 18:09 UTC, Bruno Wolff III
no flags Details
This patch allows anaconda to use raid 1 with one member in an array (5.13 KB, patch)
2006-11-12 18:13 UTC, Bruno Wolff III
no flags Details | Diff

Description Bruno Wolff III 2006-04-07 19:57:47 UTC
Description of problem:
When installing Fedora and doing custom partitioning, you are not allowed to set
up a raid 1 partition with only one drive, despite this being supported after
the OS is installed.
It can be convenient in a home user situation to break a mirror and do an
install on one half of the broken mirror while using the other half as a way to
do a quick fall back or as a convenient source for user data.
Once the system is installed and any data recovered from the other half of the
mirror, it can easily be put back in the mirror using mdadm.
While I believe it is possible to turn an ext3 partition into a software raid
partition with an ext3 partition on top of it, this doesn't seem to be well
documented and if you make a mistake, problems may not show up until much later
when recovery could be more expensive than during an initial install.

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

How reproducible:

Steps to Reproduce:
1. Do a custom partition during a fedora core install.
2. Try to set up a software raid partition with only one underlying partition.
Actual results:
You cannot even try to create a raid partition if only one partition of type
software raid is definied. If you do have more than one such partition, you
still aren't allowed to only have one partition in the array even though this
will work for raid 1.

Expected results:
When only one partition is in an array, raid 1 should be allowed.

Additional info:

Comment 1 Jeremy Katz 2006-04-10 18:14:35 UTC
People using RAID1 are doing so with an expectation of some reliability which
you don't get with a single drive.  We're not going to do this.

Comment 2 Bruno Wolff III 2006-04-11 13:24:54 UTC
I am not sure you understand the request. I wasn't suggesting that people run
raid 1 with one drive on an ongoing basis, just that they be able to use it
during an install. This provides a nice way to do a fresh install where the old
data is still conveniently available on a hard drive. Otherwise you need to do a
restore later from a backup medium or do extra copies of the drive contents.
People doing this would already be doing custom layouts, so it isn't something
people are likely to do by mistake. This mode is supported by md, so I wouldn't
expect it to be a big change.

Comment 3 Bob Gustafson 2006-04-25 21:39:59 UTC
I agree with the submitter.

An Install is a non critical (failure prone - for many other reasons) part of OS

Why not make it easy on folks and allow a one disk raid install.

The second disk can be mounted, stuff can be copied off, it can be repartitioned
and assembled into the running 2 disk RAID 1 pair. Saves on the need for extra
disk storage (don't need two blank disks at one time).

Comment 4 Bruno Wolff III 2006-10-28 20:45:18 UTC
Now that FC6 is here and I wanted to do some test installs, I played with this
some more. And I noticed that not only does anaconda not let you set up degraded
raid 1 arrays, it won't even use ones I created previously while running FC5.
The raid 1 arrays that weren't degraded were usable as is.

I still think being able to set up raid 1 arrays with only one drive is useful,
since the created file system uses up as much of the space as possible. There
isn't an easy way to do this without starting with a software raid partition.

It is one thing to keep users from accidentally setting up arrays with only 1
active drive, but another to go out of your way to keep people who want to use
temporarily degraded arrays from doing so.

Comment 5 Bob Gustafson 2006-10-28 21:20:05 UTC
As before, I agree with Bruno.

I have two raided systems, one I have already upgraded to FC6. The other system
is currently in a degraded state. Thanks to your note, I won't struggle with
installing FC6 on this second system until either I get another drive, or FC6
becomes installable on a degraded Raid 1.

Comment 6 Jeremy Katz 2006-10-30 19:05:27 UTC
If the array is degraded, it's not complete.  Trying to guess that the user is
_intending_ for that to be correct is insane.  We need to know that the setup
when we install is accurate for the post-install system so that we can't make
sure that things are set up correctly and working to avoid surprises later on.

Comment 7 Bob Gustafson 2006-10-30 19:44:48 UTC
The drive in my degraded one disk Raid 1 running FC5 is only a year and a half
old. The disk that failed 4 months ago was over 5 years old  (both SCSI). I
figure I have a little while before things could go bad. It would be nice to
enjoy (and help debug) FC6 during this period.

It would be nice to have a command line switch for Anaconda, so folks who "know
what they are doing" can override the fact that Anaconda insists on a two disks
when installing on a Raid 1 array.

I wonder if the Oracle distribution allows installation on a degraded Raid?

Comment 8 Bruno Wolff III 2006-10-30 21:26:20 UTC
mdadm lets you build arrays that way, so the install shouldn't need to know that
to provide a working system. Later the admin can use mdadm to add in a missing 
or additional drive to the mirror. It certainly seems reasonable to warn about
the unusual configuration.

In my test I used an array with a missing drive. On my next test install I'll try 
using an array created with one device instead of being degraded. I suspect that
won't work either, but I'll test it anyway and report back what happened, just
for the record.

Comment 9 Bruno Wolff III 2006-10-31 04:09:44 UTC
I tested doing an install using a raid 1 array with only one drive in it.
Anaconda recognized the array (unlike the degraded array with only one
functioning drive), but refused to use it in the install complaining about raid
1 arrays having a minimum of 2 drives.

My current thinking is that customizing Anaconda to change the test for the
minimum number of drives probably isn't hard. The Unity project is doing regular
respins, so they probably have a fairly systematic way of building ISOs using
binary rpms and some metadata. Unfortunately they don't obviously publish any
of that info, only the ISOs. I sent them an email message asking if they make
this information available and where I might find it. If they do, I can probably
make my own custom respins that do what I want. Since I have other reasons I
might want my own respins, I think it is worth looking into this. If I actually
have some success, I'll report back here.

Comment 10 Bruno Wolff III 2006-11-12 18:06:31 UTC
Created attachment 140998 [details]
Respin script

This is a script I got found using a google search that will do respins. It has

instructions emdedded in the script.

Comment 11 Bruno Wolff III 2006-11-12 18:09:44 UTC
Created attachment 140999 [details]
This is a replacement spec file for the FC6 anaconda

Note this is just FYI for observers.
This spec file will use a patch file which I will upload shortly that can be
used to modify ananconda to use and build arrays with one drive for RAID 1.

Comment 12 Bruno Wolff III 2006-11-12 18:13:24 UTC
Created attachment 141000 [details]
This patch allows anaconda to use raid 1 with one member in an array

Note this FYI for observers, I don't expect you to apply this.
To use this install the anaconda src rpm, replace the spec file with the
posted spec file and add this patch file to the SOURCES directory. The rpmbuild
-ba anaconda.spec
to make a new source rpm and the anaconda rpms.

Comment 13 Bruno Wolff III 2006-11-12 18:32:16 UTC
This is a wrap up for people who want to do this on their own.
You are going to need FC6 installed somewhere and have enough space to do a
respin. The patch I made doesn't allow you to use degraded arrays. You have to
use a RAID 1 array that is defined to have one active device. After you break
the mirror you want to use the mdadm Grow command to reduce the number of
active members to 1. You should also create a new raid device on the former
member(s) so that you have consistant array definitions.
If you only have one box you might change the partition you want to install
on to not be a raid partition for the first go around. Once you have the respin
DVD (or CDs) you can change the partition back to a raid partition.
To do the respin you will need some packages from Extras. They are listed in the
respin script.
There is a preexisting bug (215231) with text based installs and software raid, so
you should stick to graphical installs for now.
Once you have your first FC6 installed you can modify anaconda and install it
using the spec file and patch file attached to this bug report. Then you can use
the respin script to build new install media which will let you use raid 1 arrays
with one member (both existing and new). When doing the respin, be sure to copy
the new anaconda rpms over the ones from the original install media.
This issue turns out to be a good example of why I use free software. If I had
disaggreed about a feature for propietary software, I would be stuck. But with
Fedora I have the option to make my own custom version (even though there is
some pain).

Comment 14 Peter Jones 2007-07-09 15:24:27 UTC
*** Bug 247119 has been marked as a duplicate of this bug. ***

Comment 15 Gerry Reno 2007-07-09 15:50:12 UTC
I do not understand the WONTFIX reasoning behind closing this bug.  As you can 
see in the bug that I opened 247119, the whole point is to provide greater 
flexibility and convenience for the user.  As far as a user having an 
expectation regarding RAID-1, you present a warning message that tells them by 
installing with only one drive in the array that there is no redundancy until 
they add a second drive.  And at least now they can *easily* add that second 
drive at any time.  Their system is as reliable as any other single drive 
installation and a lot more flexible and convenient.

Please reconsider and REOPEN this bug.

Comment 16 Bob Gustafson 2007-07-09 21:44:26 UTC
Yes, here is another vote for a REOPEN. See also bug 189971

Bruno Wolff has a respin recipe - haven't tried it, but should be useful. I'm
not sure anyone will see this bug with a WONTFIX label though.

Fedora7 is even more unfriendly to RAID and LVM users. Kernel crash. See bug
237415 and others linked in.

Comment 17 Gerry Reno 2007-07-09 21:58:56 UTC
I understand that they want to prevent grandma from shooting herself in the 
foot when she installs Fedora using Anaconda but this greatly constrains 
experienced administrators who know what they want and what is possible.

Perhaps there just needs to be an "Expert" mode in Anaconda that lets 
experienced administrators have more control.

Please reconsider and REOPEN this bug.

Comment 18 Bruno Wolff III 2008-12-21 15:09:02 UTC
FYI. I needed this feature again in order to conveniently change the layout of my disk partitions, switch to using encrypted partitions while using a fresh install to handle the details.
There had been some discussion about allowing extra space to be left on a partition without actually setting raid 1 on the device to make copying easier later. However after reading though the software raid documentation, I see the are different possible sizes for the area used for supporting raid and even different locations the data can be saved in. So just reserving a fixed size at the end of the partition is still going to be error prone.

Comment 19 Roberto Ragusa 2009-07-11 09:53:30 UTC
Please REOPEN this bug.

This is imposing unacceptable limitations to expert administrators.
Even if installing/upgrading on a degraded or singledisk RAID-1
is considered dangerous (but I don't see how), there has to be
a way for an expert admin to force the desired behavior.
Rm has -f, rpm has --force, other dangerous stuff (dd) never
asks questions.

Please, if you really are concerned about inexperienced users,
give us a "are you a grand-ma?" "yes"-"no" option in anaconda
and let us do our stuff with no babysitter "help".

Comment 20 Susi Lehtola 2009-07-11 21:21:30 UTC
I agree that this should be a feature of anaconda, even if it could only be triggered by a magic keyword in boot and if it displayed a bunch of warnings in partitioning.

I have a system that currently has two identical hard drives and would like to make a RAID-1 array without first transferring my data elsewhere. The easiest way to do this would be using just one drive to (re)install, restore my data on it and extend the RAID to the other drive as well..

Comment 21 Björn Gerhart 2009-10-15 14:56:24 UTC
Thanks for the patch Bruno! I applied it to the anaconda source code for my CentOS 5.3 installation scenario. It works as expected   ;-)

In fact I'd also be very happy when the issue would get REOPENed! Needing this functionality for a customer project who wants to do a migration - but he also wants to be able to rollback to the older OS if something goes wrong during installation.

Comment 22 H. Peter Anvin 2011-10-07 01:22:50 UTC
For this to be forbidden is idiotic.

It forbids not just one, but two real-life use scenarios, both of which are extremely useful:

1. Break a mirror for reinstall/upgrade, if successful re-merge otherwise easy rollback is readily available;

2. "I may want to RAID this drive some day."

I used to work around Anaconda brain damage by just setting this up manually, but found today to my dismay that it is almost impossible to do correctly if you also want encrypted drives.

Comment 23 H. Peter Anvin 2011-10-07 01:23:44 UTC
Braindamage still present in Fedora 15 at least.

Comment 24 Susi Lehtola 2011-10-07 08:03:08 UTC
I agree: installing to a single drive should be possible as for the reasons presented in comment #22.

The installer could just issue a warning in this case if only one drive is used. (No safety benefit, slower operation.)

Comment 25 da-redhatbugzilla-20 2013-12-31 20:20:31 UTC
(In reply to H. Peter Anvin from comment #22)
> For this to be forbidden is idiotic.
> It forbids not just one, but two real-life use scenarios, both of which are
> extremely useful:
> 1. Break a mirror for reinstall/upgrade, if successful re-merge otherwise
> easy rollback is readily available;

I totally agree. I was going to install fedora this way but now have too look for another much more cumbersome solution. Please reopen this bug! A simple warning message is enough, there is no need to dumb down the installer.

Comment 26 paul 2014-01-22 06:21:01 UTC
I was able to create raid 1 (with LVM also) with 2 partitions on a single drive at Fedora 15, for /boot, / etc., with the custom layout option.

Now I find it is impossible to do so in Fedora 20!!!

Fedora 20 even do not allow to use partition / raid / LVM that I had setup on the harddisk drive before i run the installation DVD - why ?

Comment 27 Bruno Wolff III 2014-01-22 15:28:32 UTC
That is not the issue being discussed in this bug. You might want to start with asking these questions on the user list to make sure there isn't some way to do what you want, that you have missed. If the limitation(s) are confirmed, then you really should open a different bug, as this one is about a limitation that isn't affecting you.

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