Bug 832884

Summary: using rd.live.overlay.reset only works after a second reboot
Product: [Fedora] Fedora Reporter: Christian Lupien <christian.lupien>
Component: dracutAssignee: dracut-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: dracut-maint, fgrose, harald, jonathan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-20 16:07:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Physically write overlay reset at time of request. none

Description Christian Lupien 2012-06-18 07:01:14 UTC
Description of problem:

When resetting a live overlay with the kernel parameter
rd.live.overlay.reset
the effect only shows up the next boot.

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

This was tested on the Fedora 17 live i686, but I think it happens for many other and older versions.


How reproducible:
All the time.

Steps to Reproduce:
1. Install a Fedora live on a usb key. Boot from it.
2. Create permanent new files (touch test.txt in terminal for example)
3. Reboot. Add the rd.live.overlay.reset kernel boot parameter for this reboot.
4. Check that the previously created file is still there (it should not be).
5. Reboot with the default boot paramter.
6. Check that the overlay has now been reset (the previously created file has disappeared.)
  
Actual results:
The overlay is reset by step 6.

Expected results:
Expected the overlay to have been reset by step 4.


Additional info:
I tried ti understand the problem by looking at 
 /usr/share/dracut/modules.d/90dmsquash-live/dmsquash-live-root
but I could not figure the problem.

If I zero the first 64k of the overlay file myself before a boot, it is properly reset during boot.

So my only guess is that dd is buffered in a way that is bypassed by dmsetup.
This would be either a kernel bug or the script might be designed differently or require a sync.

Comment 1 Frederick Grose 2012-08-31 00:07:36 UTC
Created attachment 608335 [details]
Physically write overlay reset at time of request.

Tested to work in Fedora 17 x86_64 Live Desktop.

Comment 2 Harald Hoyer 2012-09-06 09:33:40 UTC
upstream commit 0db77f5a2b32ed0bc3587fa54bc078e286f16947

Comment 3 Fedora Update System 2012-09-27 10:22:36 UTC
dracut-018-60.git20120927.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/dracut-018-60.git20120927.fc16

Comment 4 Fedora Update System 2012-09-27 10:23:36 UTC
dracut-018-105.git20120927.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/dracut-018-105.git20120927.fc17

Comment 5 Fedora Update System 2012-09-27 10:31:04 UTC
dracut-018-105.git20120927.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/dracut-018-105.git20120927.fc17

Comment 6 Fedora Update System 2012-09-28 08:20:46 UTC
Package dracut-018-105.git20120927.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dracut-018-105.git20120927.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14953/dracut-018-105.git20120927.fc17
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-12-20 16:07:04 UTC
dracut-018-105.git20120927.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.