| Summary: | autoinstall to usb stick failed if the usb stick have filesystem | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Guohua Ouyang <gouyang> | ||||||
| Component: | ovirt-node | Assignee: | Mike Burns <mburns> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 6.1 | CC: | apevec, gouyang, leiwang, mburns, moli, ovirt-maint, ycui | ||||||
| Target Milestone: | rc | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | ovirt-node-2.0.2-0.1.git5dce5f9.el6 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2011-12-06 19:07:03 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
|
Description
Guohua Ouyang
2011-04-20 10:34:49 UTC
My understanding was that this affects only usb sticks where there are no paritions, e.g. on /dev/sdb directly, rather than on /dev/sdb1 based on the comment. (In reply to comment #2) > My understanding was that this affects only usb sticks where there are no > paritions, e.g. on /dev/sdb directly, rather than on /dev/sdb1 based on the > comment. yes, it was using the entire usb stick device. I was using mkdosfs -I /dev/sdb to create the filesystem, which makes auto install fail with storage_init=usb. Let's at least relnote this, in case it can't be fixed for 6.2. I tried reproducing this with the latest autobuild without success. Please test with next build handed off to QE. Steps: insert usb stick (/dev/sdh) fdisk /dev/sdh delete all partitions w to write changes mkdosfs -I /dev/sdh go to different machine and autoinstall to that stick Successfully installed and booted (In reply to comment #5) > I tried reproducing this with the latest autobuild without success. Please > test with next build handed off to QE. > > Steps: > insert usb stick (/dev/sdh) > fdisk /dev/sdh > delete all partitions > w to write changes > mkdosfs -I /dev/sdh > go to different machine and autoinstall to that stick > Successfully installed and booted Mike, are you using storage_init=usb or storage_init=/dev/sdb? my test is failed with storage_init=usb, but successful with storage_init=/dev/sdb. When fail with storage_init=usb, it said "Device specified in storage_init does not exist" on screen. I think the failure is in file /usr/libexec/ovirt-boot-functions: [ -z "$ID_FS_USAGE" -a "$ID_BUS" = "$bus" ] return 1 because "$ID_FS_USAGE" isn't zero when the usb stick with filesystem. 1. If the usb stick have filesystem, it failed to find usb device. #. /usr/libexec/ovirt-boot-functions #find_disk usb #parse_disk_id usb 2. If it have no filesystem, it's ok to find the usb device. #. /usr/libexec/ovirt-boot-functions #find_disk usb /dev/sdb #parse_disk_id usb /dev/sdb 3. /dev/sdb always returns /dev/sdb: #. /usr/libexec/ovirt-boot-functions #parse_disk_id /dev/sdb /dev/sdb Created attachment 516533 [details]
Patch
Note: This ONLY happens with storage_init=<bus type>, not with specifying a specific device. Looking at the code, we were using the ID_FS_USAGE variable from udevadm info to determine if the device was valid for installation. This variable refers to whether there is a filesystem on the device or not. This lead to 2 problems: 1. A USB device with a filesystem on the root device rather than a partition would be incorrectly determined invalid 2. A partition without a filesystem would be determined valid #2 might be impossible since we would check the base device first and find that the base device is valid. I'm pretty sure we would fail later on if we did happen to get this device though. The solution is to use DEVTYPE. This is also found using udevadm info. It returns "disk" for the root disk and "partition" for a partition. Verified on 6.2-0.14, autoinstall to usb stick which have filesystem successful. install params: storage_init=usb storage_vol=:50::50:50:500 BOOTIF=eth0 local_boot firstboot Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1783.html |