Fix resize-volume on RHEL across all datastores

Bug #1502317 reported by Petr Malik
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
In Progress
Medium
Petr Malik

Bug Description

The issues stems from the operating system auto-remounting the volume after it is attached by the taskmanager which then causes the resize (fsck) operation to fail.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/243279

Changed in trove:
status: New → In Progress
Petr Malik (pmalik)
Changed in trove:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on trove (master)

Change abandoned by Petr Malik (<email address hidden>) on branch: master
Review: https://review.openstack.org/243279
Reason: This fix has appeared to introduce a race-condition, investigating...

Revision history for this message
Joe Chen (joe-chen) wrote :

We encountered the same issue on Debian Jessie guest.

It seems that systemd will create a "var-lib-mysql.mount" (via systemd-fstab-generator) to handle mount/unmount.
Whenever /dev/vdb is attached, this systemd unit will do auto-mounting.

As a workaround, we "mask" this systemd unit BEFORE volume.unmount(mount_point), and "unmask" it AFTER volume.mount(mount_point), then resize function works perfectly.

Revision history for this message
Luigi Toscano (ltoscano) wrote :

But resize should be possible online (at least for ext3, ext4 and xfs). Do you (both :) have more detailed logs? Maybe it's something else...

Revision history for this message
Joe Chen (joe-chen) wrote :

resize2fs is ok, but "e2fsck -f -p /dev/vdb" needs that vdb is unmounted

Revision history for this message
Manoj Kumar (manojnkumar) wrote :

Petr: Do you plan to address the race condition?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.