Bug 684519

Summary: RAID spare insufficient space
Product: [Fedora] Fedora Reporter: Gianugo Altieri <gianugo.altieri>
Component: gnome-disk-utilityAssignee: David Zeuthen <davidz>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 14CC: davidz, mclasen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 12:56:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Gianugo Altieri 2011-03-13 09:57:37 UTC
Description of problem:
When adding a spare drive to a RAID 1 array currently composed of 2 disks, the spare disk gets partitioned in a way so that the program refuses it emitting an insufficient disk space message. Actually the RAID device is 80 GB while the added disk is a clean 160 GB drive. The g-d-u creates on it a RAID partition of 80 GB, but then exits complaining there is not enough contiguous space in the drive.
Can be related to bug #675333

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

How reproducible:
My current situation (from fdisk printout):
Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa805a805

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   156301311    78149632   fd  Linux raid autodetect

Disk /dev/sdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00090a9d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048   156301311    78149632   fd  Linux raid autodetect
/dev/sdc2   *   156301312   164689919     4194304   83  Linux
/dev/sdc3       164689920   168884223     2097152   82  Linux swap / Solaris
/dev/sdc4       168891345   312576704    71842680   83  Linux

Disk /dev/md0: 80.0 GB, 80024104960 bytes
2 heads, 4 sectors/track, 19537135 cylinders, total 156297080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Steps to Reproduce:
1. Physically plug in a new 160 GB HDD that maps to /dev/sda
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000eb15

2. Launch g-d-u, click on /dev/md0 and go to "Edit components"
3. "Add spare"
4. Choose the new disk (which is the only allowed choice)
5. Start
  
Actual results:
The new disk gets (automatically) partitioned into one 80 GB RAID partition and 80 GB free space.
The new disk is refused because of not enough contiguous space.

Expected results:
The new disk gets partitioned into one 80 GB RAID partition and 80 GB free space, but the RAID partition is large enough for being added to the RAID, and the array gets automatically reconstructed.

Additional info:
The workaround has been to partition the new drive using fdisk, where I created a 150 GB RAID partition. Then "mdadm --add /dev/md0 /dev/sda3". Then I forced the reconstruction of the array from g-d-u using the "check array" function.

Comment 1 Fedora End Of Life 2012-08-16 12:56:42 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping