Bug 1413835

Summary: VHD image for AWS mounts database drive as /mnt
Product: Red Hat CloudForms Management Engine Reporter: Sachin <sacpatil>
Component: BuildAssignee: Satoe Imaishi <simaishi>
Status: CLOSED CURRENTRELEASE QA Contact: Matouš Mojžíš <mmojzis>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.7.0CC: cpelland, jhardy, jocarter, mmojzis, obarenbo
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1416821 1416822 (view as bug list) Environment:
Last Closed: 2017-06-12 16:14:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1416821, 1416822    

Description Sachin 2017-01-17 05:39:13 UTC
Description of problem:

(All went fine till VHD image was imported as AMI EC2 according to documentation)

Prior to starting the EC2 instance, the customer added a 50GB EBS block device as /dev/sdb, to be used as the internal database store.

However, when the instance was rebooted, it did not come back up. From the console and saw that /dev/sdb had been mounted as /mnt, so the logical volume that was created on /dev/sdb for the database could not be imported and mounted. The system did not finish booting and prompted for root password for maintenance (the console cannot be accessed interactively under Amazon AWS, only viewed).



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


How reproducible:

Always


Steps to Reproduce:

The system attempts to mount /dev/sdb as /mnt instead of letting LVM import the LV and mounting the postgres mountpoint.

Problem can be fixed by:

* Shutting down CloudForms appliance
* Detaching /dev/sda1 EBS volume, and attaching to an existing RHEL 7 AWS EC2 instance
* Run pvscan and lvactivate -ay VG-CFME/lv_os
* mount /dev/mapper/VG--CFME-lv_os /mnt
* Remove /mnt from /mnt/etc/fstab
* Unmount /mnt and shut down system
* Reattach EBS volume as /dev/sda1 on CloudForms appliance

The culprit that causes this to happen is cloud-init. To stop it happening again, customer commented out the "  - mounts" line in /etc/cloud/cloud.cfg.


Actual results:


Expected results:


Additional info:

You might want to rebuild the VHD image without the "  -mounts" line in /etc/cloud/cloud.cfg

Feel free to correct component type(I've set it to 'build') if that is wrong.

Comment 5 Matouš Mojžíš 2017-01-19 16:12:16 UTC
I could reproduce and the problem is that there is in /etc/fstab 
this line by default(even when having only single drive):
/dev/xvdb	/mnt	auto	defaults,nofail,comment=cloudconfig	0	2

Comment 9 Matouš Mojžíš 2017-04-19 13:45:20 UTC
Verified in 5.8.0.9. Appliance deployed in aws ec2 enviroment works with database drive even after reboot.