Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 621515 - partition --onpart doesn't work with /dev/disk/by-path
partition --onpart doesn't work with /dev/disk/by-path
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda (Show other bugs)
6.0
All Linux
medium Severity medium
: rc
: ---
Assigned To: Chris Lumens
Release Test Team
:
Depends On: 683873
Blocks: 647893
  Show dependency treegraph
 
Reported: 2010-08-05 06:40 EDT by Alexander Todorov
Modified: 2011-05-19 08:32 EDT (History)
10 users (show)

See Also:
Fixed In Version: anaconda-13.21.84-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 512053
Environment:
Last Closed: 2011-05-19 08:32:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
anaconda.log (5.10 KB, text/plain)
2010-08-05 06:50 EDT, Alexander Todorov
no flags Details
blkid output (241 bytes, text/plain)
2010-08-05 06:50 EDT, Alexander Todorov
no flags Details
ls -lR /dev/disk output (737 bytes, text/plain)
2010-08-05 06:50 EDT, Alexander Todorov
no flags Details
program.log (17.16 KB, text/plain)
2010-08-05 06:50 EDT, Alexander Todorov
no flags Details
storage.log (47.89 KB, text/plain)
2010-08-05 06:51 EDT, Alexander Todorov
no flags Details
syslog (41.08 KB, text/plain)
2010-08-05 06:51 EDT, Alexander Todorov
no flags Details
udevadm info --export-db from the system (60.23 KB, text/plain)
2010-08-06 11:59 EDT, Alexander Todorov
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0530 normal SHIPPED_LIVE anaconda bug fix and enhancement update 2011-05-18 13:44:52 EDT

  None (edit)
Description Alexander Todorov 2010-08-05 06:40:58 EDT
+++ This bug was initially created as a clone of Bug #512053 +++

--- Additional comment from atodorov@redhat.com on 2010-08-05 13:38:50 EEST ---

(In reply to comment #18)
> 
> > * ignoredisk --only-use=
> > * partition --onpart=
> 
> Not tested.
> 

ignore-disk --only-use tested and works, however partition --onpart doesn't.

Since this bug covers several kickstart commands which were tested and PASS I'll move it to VERIFIED and open a separate one for the --onpart issue.
Comment 1 Alexander Todorov 2010-08-05 06:45:38 EDT
Description of problem:

Installing with ks.cfg which contains the partition --onpart command doesn't work when the partition path is specified as /dev/disk/by-path/...


Steps to reproduce:

1) Prepare a system with 2 disks and known partitioning. In my case this is a KVM guest with vda and vdb disks where vda contains /boot and PV and vdb has a single xfs partition. 

2) Start a second install on the same system with the following ks.cfg snippet:

bootloader --location=mbr
clearpart --none

part /boot --fstype=ext4 --size=500 --ondisk=/dev/disk/by-path/virtio-pci-virtio1
part swap --size=2048 --ondisk=/dev/disk/by-path/virtio-pci-virtio1
part / --fstype=ext4 --size=500 --grow --ondisk=/dev/disk/by-path/virtio-pci-virtio1

part /mydata --fstype=xfs --size=500 --grow --onpart=/dev/disk/by-path/virtio-pci-virtio2-part1 --noformat

Actual results:
Anaconda gives error: No preexisting partition with the name "disk/by-path/virtio-pci-virtio2-part1" was found.

Expected results:
installation compeltes.

Additional info:
blkid and ls /dev/disk/by-path report that this partition exists. Logs will be attached.
Comment 3 Alexander Todorov 2010-08-05 06:50:20 EDT
Created attachment 436810 [details]
anaconda.log
Comment 4 Alexander Todorov 2010-08-05 06:50:30 EDT
Created attachment 436812 [details]
blkid output
Comment 5 Alexander Todorov 2010-08-05 06:50:46 EDT
Created attachment 436813 [details]
ls -lR /dev/disk output
Comment 6 Alexander Todorov 2010-08-05 06:50:57 EDT
Created attachment 436814 [details]
program.log
Comment 7 Alexander Todorov 2010-08-05 06:51:07 EDT
Created attachment 436815 [details]
storage.log
Comment 8 Alexander Todorov 2010-08-05 06:51:24 EDT
Created attachment 436816 [details]
syslog
Comment 9 Chris Lumens 2010-08-05 09:36:08 EDT
Could you also attach the output of udevadm info --export-db?
Comment 11 Alexander Todorov 2010-08-06 11:59:53 EDT
Created attachment 437194 [details]
udevadm info --export-db from the system
Comment 12 Chris Lumens 2010-08-20 16:06:09 EDT
diff --git a/storage/udev.py b/storage/udev.py
index 12116f6..62ef214 100644
--- a/storage/udev.py
+++ b/storage/udev.py
@@ -49,8 +49,12 @@ def udev_resolve_devspec(devspec):
             ret = dev
             break
         else:
+            spec = devspec
+            if not spec.startswith("/dev/"):
+                spec = os.path.normpath("/dev/" + spec)
+
             for link in dev["symlinks"]:
-                if devspec == link:
+                if spec == link:
                     ret = dev
                     break
Comment 14 RHEL Product and Program Management 2010-10-29 17:33:03 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.
Comment 17 Alexander Todorov 2011-03-10 09:56:34 EST
Blocked by bug #683873
Comment 18 Alexander Todorov 2011-03-11 05:50:33 EST
Tested with:

bootloader --location=mbr

clearpart --drives=vda --all

part /boot --fstype=ext4 --size=1024 --ondisk=/dev/disk/by-path/pci-0000:00:05.0-virtio-pci-virtio1
part swap --size=1024 --ondisk=/dev/disk/by-path/pci-0000:00:05.0-virtio-pci-virtio1
part / --fstype=ext4 --size=500 --grow --ondisk=/dev/disk/by-path/pci-0000:00:05.0-virtio-pci-virtio1

part /mydata --fstype=ext4 --onpart=/dev/disk/by-path/pci-0000:00:06.0-virtio-pci-virtio2-part1 --noformat


With anaconda-13.21.104-1.el6.x86_64. All works as expected.
Comment 19 Orion Poplawski 2011-03-17 15:14:08 EDT
Would it be possible to get an updates image for this?
Comment 20 errata-xmlrpc 2011-05-19 08:32:00 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0530.html

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