Bug 1413835 - VHD image for AWS mounts database drive as /mnt
Summary: VHD image for AWS mounts database drive as /mnt
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Build
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: GA
: 5.8.0
Assignee: Satoe Imaishi
QA Contact: Matouš Mojžíš
URL:
Whiteboard:
Depends On:
Blocks: 1416821 1416822
TreeView+ depends on / blocked
 
Reported: 2017-01-17 05:39 UTC by Sachin
Modified: 2020-04-15 15:06 UTC (History)
5 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1416821 1416822 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:14:41 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)

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.


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