Bug 691891

Summary: support storage_init=<bus> in dracut plugin
Product: Red Hat Enterprise Linux 6 Reporter: Mike Burns <mburns>
Component: ovirt-nodeAssignee: Mike Burns <mburns>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.1CC: acathrow, apevec, gouyang, leiwang, mburns, moli, ovirt-maint, ycui
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-node-1.9.3-26.1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 699380 (view as bug list) Environment:
Last Closed: 2011-08-19 15:18:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 694215, 699380    
Attachments:
Description Flags
Patch
none
Follow-up patch
apevec: review+
pre-pviot ouput none

Description Mike Burns 2011-03-29 19:46:16 UTC
Description of problem:
The dracut plugin currently doesn't work with storage_init=<bus_type>.  This is due to a function that is not available in initramfs

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

How reproducible:
Always

Steps to Reproduce:
1.install 6.1 rhevh to scsi disk
2.boot with storage_init=scsi firstboot rdbreak
3.when boot process drops to dracut shell, check for HostVG on scsi disk
  
Actual results:
fails to clean due to a function missing

Expected results:
cleans scsi disk

Additional info:

Comment 3 Mike Burns 2011-04-05 18:15:18 UTC
Created attachment 490054 [details]
Patch

Comment 9 Mike Burns 2011-04-14 15:32:56 UTC
Created attachment 492151 [details]
Follow-up patch

Comment 10 Mike Burns 2011-04-14 15:36:08 UTC
Setting to post as the above patch is needed to solve some devices.  Will await confirmation on whether it's the same issue for cciss

Comment 11 Alan Pevec 2011-04-14 15:47:11 UTC
Comment on attachment 492151 [details]
Follow-up patch

For easier review here's diff w/o indent changes:
-    for b in ata cciss scsi usb; do
-       for d in $(ls /dev/disk/by-id/$b* 2>/dev/null); do
+    for d in $(ls /dev/disk/by-id/ata* /dev/disk/by-id/cciss* /dev/disk/by-id/scsi* /dev/disk/by-id/usb* 2>/dev/null); do

Comment 13 Mohua Li 2011-04-15 04:23:13 UTC
Created attachment 492274 [details]
pre-pviot ouput

Comment 17 Alan Pevec 2011-04-18 10:00:04 UTC
There's now hpsa driver which shows at least some cciss controllers as normal scsi devices - cciss in ML150 G6 is 103c:323a (rev 01)

This might be confusing for users, to know when it's cciss bus and when scsi,
We'll need to talk to kernel storage to see what's the plan with separate cciss driver, both hpsa and cciss are present in 6.1:

# modinfo hpsa 
filename:       /lib/modules/2.6.32-131.0.1.el6.x86_64/kernel/drivers/scsi/hpsa.ko
license:        GPL
version:        2.0.2-3
description:    Driver for HP Smart Array Controller version 2.0.2-3
author:         Hewlett-Packard Company
srcversion:     7EC69F284931C227989DD2E
alias:          pci:v00000E11d*sv*sd*bc01sc04i*
alias:          pci:v0000103Cd*sv*sd*bc01sc04i*
alias:          pci:v0000103Cd0000323Bsv0000103Csd00003356bc*sc*i*
alias:          pci:v0000103Cd0000323Bsv0000103Csd00003355bc*sc*i*
alias:          pci:v0000103Cd0000323Bsv0000103Csd00003354bc*sc*i*
alias:          pci:v0000103Cd0000323Bsv0000103Csd00003353bc*sc*i*
alias:          pci:v0000103Cd0000323Bsv0000103Csd00003352bc*sc*i*
alias:          pci:v0000103Cd0000323Bsv0000103Csd00003351bc*sc*i*
alias:          pci:v0000103Cd0000323Bsv0000103Csd00003350bc*sc*i*
alias:          pci:v0000103Cd0000323Asv0000103Csd00003233bc*sc*i*
alias:          pci:v0000103Cd0000323Asv0000103Csd0000324Bbc*sc*i*
alias:          pci:v0000103Cd0000323Asv0000103Csd0000324Abc*sc*i*
alias:          pci:v0000103Cd0000323Asv0000103Csd00003249bc*sc*i*
alias:          pci:v0000103Cd0000323Asv0000103Csd00003247bc*sc*i*
alias:          pci:v0000103Cd0000323Asv0000103Csd00003245bc*sc*i*
alias:          pci:v0000103Cd0000323Asv0000103Csd00003243bc*sc*i*
alias:          pci:v0000103Cd0000323Asv0000103Csd00003241bc*sc*i*
depends:        
vermagic:       2.6.32-131.0.1.el6.x86_64 SMP mod_unload modversions 
parm:           hpsa_allow_any:Allow hpsa driver to access unknown HP Smart Array hardware (int)
parm:           hpsa_simple_mode:Use 'simple mode' rather than 'performant mode' (int)

# modinfo cciss
filename:       /lib/modules/2.6.32-131.0.1.el6.x86_64/kernel/drivers/block/cciss.ko
license:        GPL
version:        3.6.28
description:    Driver for HP Smart Array Controllers
author:         Hewlett-Packard Company
srcversion:     2FD0F32234F7AB5CD96D40B
alias:          pci:v0000103Cd00003230sv0000103Csd0000323Dbc*sc*i*
alias:          pci:v0000103Cd00003230sv0000103Csd00003237bc*sc*i*
alias:          pci:v0000103Cd00003238sv0000103Csd00003215bc*sc*i*
alias:          pci:v0000103Cd00003238sv0000103Csd00003214bc*sc*i*
alias:          pci:v0000103Cd00003238sv0000103Csd00003213bc*sc*i*
alias:          pci:v0000103Cd00003238sv0000103Csd00003212bc*sc*i*
alias:          pci:v0000103Cd00003238sv0000103Csd00003211bc*sc*i*
alias:          pci:v0000103Cd00003230sv0000103Csd00003235bc*sc*i*
alias:          pci:v0000103Cd00003230sv0000103Csd00003234bc*sc*i*
alias:          pci:v0000103Cd00003230sv0000103Csd00003223bc*sc*i*
alias:          pci:v0000103Cd00003220sv0000103Csd00003225bc*sc*i*
alias:          pci:v00000E11d00000046sv00000E11sd0000409Dbc*sc*i*
alias:          pci:v00000E11d00000046sv00000E11sd0000409Cbc*sc*i*
alias:          pci:v00000E11d00000046sv00000E11sd0000409Bbc*sc*i*
alias:          pci:v00000E11d00000046sv00000E11sd0000409Abc*sc*i*
alias:          pci:v00000E11d00000046sv00000E11sd00004091bc*sc*i*
alias:          pci:v00000E11d0000B178sv00000E11sd00004083bc*sc*i*
alias:          pci:v00000E11d0000B178sv00000E11sd00004082bc*sc*i*
alias:          pci:v00000E11d0000B178sv00000E11sd00004080bc*sc*i*
alias:          pci:v00000E11d0000B060sv00000E11sd00004070bc*sc*i*
depends:        
vermagic:       2.6.32-131.0.1.el6.x86_64 SMP mod_unload modversions
parm:           cciss_tape_cmds:number of commands to allocate for tape devices (default: 6) (int)

Comment 21 Mohua Li 2011-04-29 06:33:36 UTC
testing on  HP BL465c G5, which has RAID controller, support RAID 0,1, and
using the cciss driver instead hpsa,  and the bus type could be recognised as
cciss,


rhev-hypervisor 6.1-20110427,


auto install from pxe,

storage_init=cciss storage_vol=::::: local_boot firstboot ip=dhcp BOOTIF=$macaddress


auto install fail, and get error at 

mke2fs -t ext2 /dev/cciss/c0d0p1 -L Root

/dev/cciss/c0d0p1 is apparently in use by the system; will not make a filesystem here.


try

mke2fs -n /dev/cciss/c0d0p1,
/dev/cciss/c0d0p1 is apparently in use by the system; will not make a filesystem here.


cat /proc/mounts, could find /root/.ssh,

seems here is also a race condition problem, but try several times, always fail with this error, 



attach the screenshot for your reference,

Comment 23 Mike Burns 2011-04-29 12:17:35 UTC
This bug is for specifically for the dracut plugin that does uninstall and disk cleanup.  Installation problems with storage_init=<bus> should be filed separately.  

This is also captured in bug 681164, so we can track it there instead.  

For this BZ, testing should be done by:

1.  installing (autoinstall, GUI install, doesn't matter how)
2.  specify storage_init=<bus of the install disk (ata, scsi, usb, cciss)> 
3.  specify either firstboot or uninstall on the command line

If firstboot and BOOTIF is not specified, then you should get the GUI.  Go to the console and check if there are PV/VGs

If uninstall, boot again to the gui and check that there are no PV/VGs on the disk

Another option for checking:  you can specify rdbreak which will drop you to a dracut shell.  From there, you should see the output of the pvremove and vgremove commands.  You can check directly there by running

lvm pvs
lvm vgs

Comment 24 Mike Burns 2011-04-29 12:46:53 UTC
> This is also captured in bug 681164, so we can track it there instead.  
> 

Apparently 681164 is for a UI install issue.  Please file a separate bz for this instead.

Comment 26 Mohua Li 2011-05-04 06:44:31 UTC
tested with storage_init=(usb,scsi,ata,cciss) all could be parse successfully, and installed successfully expect cciss, which has the error refer in comment 21, will open a new bug for it,

Comment 28 Mohua Li 2011-05-04 07:27:15 UTC
Bug 701879 - auto install with cciss bus_type fail at disk partition