Hide Forgot
Description of problem: dracut wiped the disk although the disk didn't match any storage_init bus type, installed with the following parameter in a vm with emulated virtio disk(installed with wrong bus type cciss) rootflags=loop root=live:/rhev-hypervisor.iso rootfstype=auto ro liveimg nomodeset check rootflags=ro crashkernel=512M-2G:64M,2G-:128M elevator=deadline processor.max_cstate=1 install quiet rd_NO_LVM rhgb rd_NO_LUKS rd_NO_MD rd_NO_DM storage_init=cciss storage_vol=::::: local_boot firstboot console=ttyS0,115200n8 get the following output, [%G^[%GWiping LVM from device: /dev/vda3^M Logical volume "Swap" successfully removed^M Logical volume "Config" successfully removed^M Logical volume "Logging" successfully removed^M Logical volume "Data" successfully removed^M Volume group "HostVG" successfully removed^M Labels on physical volume "/dev/vda3" successfully wiped^M Wiping LVM from device: ^M Starting ovirt-firstboot: Device specified in storage_init does not exist^M Sep 09 07:24:48 Automatic installation failed. Please review console messages.^M Sep 09 07:24:48 Press Enter to drop to emergency shell.^M How reproducible: always with the wrong bus type Steps to Reproduce: 1.installed rhev-hypervisor on the disk before 2.reinstall again with the above parameter, and wrong bus type 3. Actual results: Expected results: Additional info: this only could reproduce with rhev-hypervisor installed before, could not reproduce on a clean disk,
actually, dracut module ovirt-cleanup.sh didn't consider about the bus type, storage_init="$(getargs storage_init)" if [ $? -eq 1 ]; then storage_init="$(getargs ovirt_init)" if [ $? -eq 1 ]; then info "storage_init or ovirt_init arguments not found" else info "Found storage_init: $storage_init" fi fi # Check for HostVG lvm pvscan >/dev/null 2>&1 for hostvg in $(lvm pvs --noheadings -o vg_name,pv_name 2>/dev/null | +awk '/^ HostVG/{print $2}'); do storage_init="$hostvg,$storage_init" info "Found HostVG on $hostvg" done
Created attachment 522268 [details] console output
Existing HostVG is wiped when only reinstall/uninstall/firstboot is provided, see bug 733274 comment 4
this mean will wipe the hostvg if reinstall/uninstall/firstboot specify although the hostvg disk not in the storage_init list? if so, we might risk to wipe the wrong disk?
good point from mburns: wipe HostVG (op.ed. unconditionally) only if storage_init is NOT passed
Created attachment 522388 [details] Patch
rhev-hypervisor 6.2-0.16.2, specify "storage_init=cciss(wrong bus type) reinstall" this won't wipe the HostVG disk(vda), but only "uninstall" without "storage_init" this will wipe the HostVG disk, so it's fixed, but here we have another problem, we only wipe the lvs, but didn't wipe the root/rootbackup, this will make the rhev-hypervisor still bootable, but fail to load any lv(can't login, no /etc/), if we also need wipe the boot disk?
(In reply to comment #10) > but here we have another problem, we only wipe the lvs, but didn't wipe the > root/rootbackup, this will make the rhev-hypervisor still bootable, but fail to > load any lv(can't login, no /etc/), if we also need wipe the boot disk? Please open separate BZ for this, but it's not critical since reinstall will work.
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