Bug 761278 - Fedora16 installer fails when drive is already partitioned - system with multipath
Fedora16 installer fails when drive is already partitioned - system with mult...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
16
ppc64 All
unspecified Severity urgent
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks: F17Blockerppc
  Show dependency treegraph
 
Reported: 2011-12-07 18:01 EST by IBM Bug Proxy
Modified: 2013-01-10 01:41 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-19 17:20:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
anaconda.log (8.76 KB, text/plain)
2011-12-07 18:01 EST, IBM Bug Proxy
no flags Details
program.log (54.39 KB, text/plain)
2011-12-07 18:01 EST, IBM Bug Proxy
no flags Details
storage.log (399.74 KB, text/plain)
2011-12-07 18:01 EST, IBM Bug Proxy
no flags Details
attached picture (61.01 KB, image/jpeg)
2011-12-07 18:02 EST, IBM Bug Proxy
no flags Details
Test fix for bug 77158 (35.85 KB, text/plain)
2011-12-09 17:00 EST, IBM Bug Proxy
no flags Details
Existing installation detected menu (35.82 KB, image/jpeg)
2011-12-09 17:11 EST, IBM Bug Proxy
no flags Details
Patch as suggested by dlehman (1.63 KB, text/plain)
2011-12-09 17:11 EST, IBM Bug Proxy
no flags Details
fc16 beta rc 6 - doesn't detect existing OS with mpath device (44.59 KB, application/x-gzip)
2011-12-13 16:31 EST, IBM Bug Proxy
no flags Details
fc16 beta rc 6 - doesn't detect existing OS with mpath device w/ Mark's 77158-1.img update file (427.90 KB, application/x-gzip)
2011-12-13 16:31 EST, IBM Bug Proxy
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
IBM Linux Technology Center 77158 None None None Never

  None (edit)
Description IBM Bug Proxy 2011-12-07 18:01:13 EST
---Problem Description---
Installing the ppc64 Beta-rc6 release from http://ppc.koji.fedoraproject.org/scratch/karsten/iso/Beta-rc6/ppc64/iso/

The system is connected to a SAS (Serial Attached SCSI) multipath array.

When I choose "Use All Space" and verified "Use LVM" is enabled.  I see 2 drives available.  See attached screen shot.

When I pick the first drive to install on I get the following failure message:
"Error Partitioning Could not find enough free space for automatic partitioning, please use another partition method."

Currently this hdisk has Fedora16 installed but I'm testing a reinstall.  I had issues with the Fedora16 installer failing to clear the hdisk partitions last time as well.  That time the hdisk had a RHEL installation.  For record, RHEL6.1 installer works fine and I'm able to get past this hdisk selection process in the installer.

I've found to work around this issue I have to boot to Fedora rescue mode and zero out the drives using the following commands.

boot: linux serial rescue

Select OK and Start Shell.

List hdisk information:
     fdisk ???l

To zero out the hdisk(s) do the following:
     dd if=/dev/zero of=/dev/sdX bs=1M &
     Where X is the hdisk(s) you wish to zero out
      Note: This takes 30-40min for a 140GB drive

      Hint: To view progress on the ???dd??? process you can run the following
command against your ???dd??? process ID.

            kill -USR1 <PID>

Once complete reboot the partition and start the Fedora install again.
 
---Anaconda Component Data--- 
Userspace tool common name: Anaconda 
 
The userspace tool has the following bit modes: 64-bit 

Userspace rpm: anaconda 

Userspace tool obtained from project website:  na 
 

== Comment:  2011.12.07 14:46:34 ==
When I ssh into the installer, fdisk will recognize the partitions.

[anaconda root@pfdioc03b ~]# fdisk -l

Disk /dev/sdb: 146.8 GB, 146814976000 bytes
128 heads, 32 sectors/track, 70006 cylinders, total 286748000 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: 0x4a930c00

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048       10239        4096   41  PPC PReP Boot
/dev/sdb2           10240     1034239      512000   83  Linux
/dev/sdb3         1034240   286746623   142856192   8e  Linux LVM

Disk /dev/sda: 146.8 GB, 146814976000 bytes
128 heads, 32 sectors/track, 70006 cylinders, total 286748000 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: 0xba310400

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048       10239        4096   41  PPC PReP Boot
/dev/sda2           10240     1034239      512000   83  Linux
/dev/sda3         1034240   286746623   142856192   8e  Linux LVM

Disk /dev/sdd: 146.8 GB, 146814976000 bytes
128 heads, 32 sectors/track, 70006 cylinders, total 286748000 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: 0x4a930c00

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048       10239        4096   41  PPC PReP Boot
/dev/sdd2           10240     1034239      512000   83  Linux
/dev/sdd3         1034240   286746623   142856192   8e  Linux LVM

Disk /dev/sdc: 146.8 GB, 146814976000 bytes
128 heads, 32 sectors/track, 70006 cylinders, total 286748000 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: 0xba310400

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048       10239        4096   41  PPC PReP Boot
/dev/sdc2           10240     1034239      512000   83  Linux
/dev/sdc3         1034240   286746623   142856192   8e  Linux LVM

Disk /dev/mapper/live-rw: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders, total 4194304 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

Disk /dev/mapper/live-rw doesn't contain a valid partition table
Comment 1 IBM Bug Proxy 2011-12-07 18:01:28 EST
Created attachment 542242 [details]
anaconda.log
Comment 2 IBM Bug Proxy 2011-12-07 18:01:43 EST
Created attachment 542243 [details]
program.log
Comment 3 IBM Bug Proxy 2011-12-07 18:01:55 EST
Created attachment 542244 [details]
storage.log
Comment 4 IBM Bug Proxy 2011-12-07 18:02:08 EST
Created attachment 542245 [details]
attached picture
Comment 5 David Lehman 2011-12-08 12:18:44 EST
The basic problem is that the code in the devicetree to handle scanning and activating multipath devices does not work if the mpaths are already active when the devicetree scans the system. Since anaconda scans for devices at least twice during install, only the first scan is successful as far as mpaths go.
Comment 6 David Lehman 2011-12-08 12:22:33 EST
One possible solution that occurs to me is to ignore dm devices when iterating self.topology.devices_iter in DeviceTree._populate. They'll get scanned in the subsequent loops after the mpath-specific set has been done.
Comment 7 IBM Bug Proxy 2011-12-09 17:00:59 EST
Created attachment 544725 [details]
Test fix for bug 77158


------- Comment (attachment only) From dlshaw@us.ibm.com 2011-12-09 16:52 EDT-------
Comment 8 IBM Bug Proxy 2011-12-09 17:10:50 EST
------- Comment From dlshaw@us.ibm.com 2011-12-09 17:01 EDT-------
Mark Hamzy provided me with a fix to test on my Juno IOC-L hardware that has a SAS controller with multipath (mpath).  I've attached the 77158-1.img file to this bug as well.

This patch fixed the problem where we couldn't install Fedora16 on a system with SAS and mpath.  I also regression tested this on a system with SAS and no mpath successfully.

However, there is one problem left to resolve on a SAS with mpath.  Once Fedora starts the VNC installation the user will choose the following options:

Language
Keyboard Layout
Storage Device

After selecting Basic storage device the installer will examine the system's storage device(s) and should detect any existing Fedora installations.  If it detects an existing installation the installer should display a menu that notifies the user that it has detected an existing installation and asks the user what they wish to do.  Fresh Install or Upgrade existing installation.

This behaves correctly on SAS without mpath systems but for systems that have SAS and mpath the installer fails to detect any existing installations and doesn't display the menu letting the user know there were existing installation(s) detected.  Instead it goes staight to the next menu which I think is the hostname of the system.

I'm going to attach a screen shot of the installation menu screen that should show up when an existing installation has been detected.

------- Comment From dlshaw@us.ibm.com 2011-12-09 17:04 EDT-------
I captured fdisk -l output from a Juno IOC-L that has SAS without mpath in case its helpful to figure this out.

sh-4.2# fdisk -l

Disk identifier: 0x64cd0800


Disk identifier: 0xff920500


Disk /dev/sda: 73.4 GB, 73407488000 bytes
128 heads, 32 sectors/track, 35003 cylinders, total 143374000 sectors
Disk identifier: 0x82bc0000

/dev/sda3         1034240   143372287    71169024   8e  Linux LVM

Disk /dev/sdd: 73.4 GB, 73407488000 bytes
128 heads, 32 sectors/track, 35003 cylinders, total 143374000 sectors
Disk identifier: 0x5eee0100




------- Comment From hamzy@us.ibm.com 2011-12-09 17:09 EDT-------
dlehman, the fix still does not detect an existing system.  Do you know what might be wrong there?  Why does it detect the disks a number of times?  Is there a way to deactivate the multipath devices before the first scan occurs?
Comment 9 IBM Bug Proxy 2011-12-09 17:11:03 EST
Created attachment 544746 [details]
Existing installation detected menu


------- Comment (attachment only) From dlshaw@us.ibm.com 2011-12-09 17:02 EDT-------
Comment 10 IBM Bug Proxy 2011-12-09 17:11:16 EST
Created attachment 544747 [details]
Patch as suggested by dlehman


------- Comment (attachment only) From hamzy@us.ibm.com 2011-12-09 17:06 EDT-------
Comment 11 David Lehman 2011-12-12 11:06:56 EST
I believe you must choose advanced storage to use mpath. I would have to see the storage.log to see what specifically is not happening.
Comment 12 IBM Bug Proxy 2011-12-13 16:31:14 EST
Created attachment 546406 [details]
fc16 beta rc 6 - doesn't detect existing OS with mpath device


------- Comment on attachment From dlshaw@us.ibm.com 2011-12-13 16:23 EDT-------


Installer doesn't detect existing OS.  I picked "Specialized Storage Devices" and selected the two mpath devices listed.  This is with the default Fedora16 Beta RC6 installer without updates.
Comment 13 IBM Bug Proxy 2011-12-13 16:31:26 EST
Created attachment 546407 [details]
fc16 beta rc 6 - doesn't detect existing OS with mpath device w/ Mark's 77158-1.img update file


------- Comment on attachment From dlshaw@us.ibm.com 2011-12-13 16:24 EDT-------


Installer doesn't detect existing OS.  I picked "Specialized Storage Devices" and selected the two mpath devices listed.  This is with the default Fedora16 Beta RC6 installer with Mark's 77158-1.img update file.
Comment 14 IBM Bug Proxy 2011-12-13 16:41:13 EST
------- Comment From hamzy@us.ibm.com 2011-12-13 16:34 EDT-------
Any ideas, dlehman, what else might be wrong?
Comment 15 IBM Bug Proxy 2011-12-20 17:11:05 EST
------- Comment From hamzy@us.ibm.com 2011-12-20 17:02 EDT-------
If I look at the machine when it is running the installed Fedora 16 partition, the multipath code seems to be able to parse the output correctly.

[root@pfdioc03b ~]# yum install -y anaconda device-mapper-multipath
[root@pfdioc03b ~]# multipath -ll
Dec 20 15:18:57 | DM multipath kernel driver not loaded
[root@pfdioc03b ~]# modprobe dm-multipath
[  874.000422] device-mapper: multipath: version 1.3.0 loaded
[root@pfdioc03b ~]# multipath -ll
[root@pfdioc03b ~]# multipath -d
create: mpatha (35000c50017b69adf) undef IBM,ST9146852SS
size=137G features='0' hwhandler='0' wp=undef
|-+- policy='round-robin 0' prio=1 status=undef
| `- 0:0:4:0 sda 8:0  undef ready running
`-+- policy='round-robin 0' prio=1 status=undef
`- 1:0:4:0 sdc 8:32 undef ready running
create: mpathb (35000c5002328f6a7) undef IBM,ST9146852SS
size=137G features='0' hwhandler='0' wp=undef
|-+- policy='round-robin 0' prio=1 status=undef
| `- 0:0:5:0 sdb 8:16 undef ready running
`-+- policy='round-robin 0' prio=1 status=undef
`- 1:0:5:0 sdd 8:48 undef ready running
[root@pfdioc03b ~]# python
>>> from pyanaconda.storage.devicelibs import mpath
>>> from pyanaconda import iutil
>>> output = iutil.execWithCapture("multipath", ["-d",])
>>> mpaths = mpath.parseMultipathOutput(output)
>>> mpaths
{'mpathb': ['sdb', 'sdd'], 'mpatha': ['sda', 'sdc']}
Comment 16 IBM Bug Proxy 2011-12-20 18:51:11 EST
------- Comment From hamzy@us.ibm.com 2011-12-20 18:46 EDT-------
Submitted the patch to the anaconda development mailing list.

https://www.redhat.com/archives/anaconda-devel-list/2011-December/msg00108.html

dlehman recommends that we close this defect and open a new one for the "not detecting an existing installation" problem.
Comment 17 IBM Bug Proxy 2012-02-27 12:21:34 EST
------- Comment From clnperez@us.ibm.com 2012-02-27 12:17 EDT-------
(In reply to comment #22)
> Submitted the patch to the anaconda development mailing list.
>
> https://www.redhat.com/archives/anaconda-devel-list/2011-December/msg00108.html
>
> dlehman recommends that we close this defect and open a new one for the "not
> detecting an existing installation" problem.

Mark,

It looks like that's been done (Bug 77584), so I'm going to close this one.
Comment 18 David Aquilina 2012-06-11 14:29:40 EDT
Per IBM this bz should have been closed (Comment #17)
Comment 19 IBM Bug Proxy 2012-06-11 15:02:00 EDT
------- Comment From clnperez@us.ibm.com 2012-06-11 18:56 EDT-------
Yes, it has been closed on our side.

Thanks.
Comment 20 Jesse Keating 2012-07-19 17:20:54 EDT
Closing due to comment #19

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