Bug 188314 - Raid installs should allow only 1 drive when using raid 1
Raid installs should allow only 1 drive when using raid 1
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
15
All Linux
medium Severity medium
: ---
: ---
Assigned To: Anaconda Maintenance Team
Mike McLean
: Reopened
: 247119 (view as bug list)
Depends On:
Blocks: 1056643
  Show dependency treegraph
 
Reported: 2006-04-07 15:57 EDT by Bruno Wolff III
Modified: 2014-01-22 10:46 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1056643 (view as bug list)
Environment:
Last Closed: 2006-10-30 14:05:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Respin script (8.36 KB, application/x-shellscript)
2006-11-12 13:06 EST, 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 13:09 EST, 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 13:13 EST, Bruno Wolff III
no flags Details | Diff

  None (edit)
Description Bruno Wolff III 2006-04-07 15:57:47 EDT
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.
3.
  
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 14:14:35 EDT
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 09:24:54 EDT
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 17:39:59 EDT
I agree with the submitter.

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

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 16:45:18 EDT
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 17:20:05 EDT
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 14:05:27 EST
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 14:44:48 EST
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 16:26:20 EST
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-30 23:09:44 EST
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 13:06:31 EST
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 13:09:44 EST
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 13:13:24 EST
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
previously
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 13:32:16 EST
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 11:24:27 EDT
*** Bug 247119 has been marked as a duplicate of this bug. ***
Comment 15 Gerry Reno 2007-07-09 11:50:12 EDT
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 17:44:26 EDT
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 17:58:56 EDT
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 10:09:02 EST
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 05:53:30 EDT
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 17:21:30 EDT
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 10:56:24 EDT
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-06 21:22:50 EDT
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-06 21:23:44 EDT
Braindamage still present in Fedora 15 at least.
Comment 24 Susi Lehtola 2011-10-07 04:03:08 EDT
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 15:20:31 EST
(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 01:21:01 EST
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 10:28:32 EST
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.