Created attachment 423009 [details] dracut-lv_snap.patch Description of problem: I'm looking for a way to have a system with disposable storage that can be rebooted and all filesystem changes are thrown away. After reboot, the system starts with a fresh root volume again. The use case is for automated testing. We run test scripts that could potentially not clean up after themselves. This is almost like stateless, but the storage is local to the system (not iSCSI, NFS or NBB). I've experimented with using LVM snapshots and have something that works. I'm not sure how best to maintain this on top of dracut, or whether it should be integrated within dracut. This bug report is intended to track that discussion. Version-Release number of selected component (if applicable): * dracut-005-3.fc13.noarch Steps to Reproduce: 1. Install Fedora 13 using default partition layout NOTE: modify the layout to leave extra room in the LVM volume group 2. Apply attached patch 3. Update grub.conf to enable dracut LVM snapshot support. Add the following boot arguments rd_LVM_SNAPSHOT=vg_test1055/lv_snap (note the VG name will depend on your system). rd_LVM_SNAPSIZE= (optional, defaults to size of volume specified with by rd_LVM_SNAPSHOT) 4. Adjust grub.conf and fstab to use LVM snapshot $ sed -i -e 's|lv_root|lv_snap|' /boot/grub/grub.conf $ sed -i -e 's|lv_root|lv_snap|' /etc/fstab 5. Reboot system Expected results (no value provided for rd_LVM_SNAPSIZE): dracut: Starting plymouth daemon dracut: rd_NO_DM: removing DM RAID activation dracut: rd_NO_MD: removing MD RAID activation dracut: Removing existing LVM snapshot vg_test1055/lv_snap dracut: Logical volume "lv_snap" successfully removed dracut: No LVM snapshot size provided, using size of vg_test1055/lv_root ( 9024.00m) dracut: Creating LVM snapshot vg_test1055/lv_snap ( 9024.00m) dracut: Logical volume "lv_snap" created dracut: Scanning devices sda2 for LVM logical volumes vg_test1055/lv_root vg_test1055/lv_swap dracut: inactive Original '/dev/vg_test1055/lv_root' [8.81 GiB] inherit dracut: inactive '/dev/vg_test1055/lv_swap' [1.00 GiB] inherit dracut: inactive Snapshot '/dev/vg_test1055/lv_snap' [8.81 GiB] inherit dracut: Mounted root filesystem /dev/mapper/vg_test1055-lv_snap dracut: Loading SELinux policy dracut: Switching root Expected results (rd_LVM_SNAPSIZE=100m): dracut: Starting plymouth daemon dracut: rd_NO_DM: removing DM RAID activation dracut: rd_NO_MD: removing MD RAID activation dracut: Removing existing LVM snapshot vg_test1055/lv_snap dracut: Logical volume "lv_snap" successfully removed dracut: Creating LVM snapshot vg_test1055/lv_snap (100m ) dracut: Rounding up size to full physical extent 128.00 MiB dracut: Logical volume "lv_snap" created dracut: Scanning devices sda2 for LVM logical volumes vg_test1055/lv_root vg_test1055/lv_swap dracut: inactive Original '/dev/vg_test1055/lv_root' [8.81 GiB] inherit dracut: inactive '/dev/vg_test1055/lv_swap' [1.00 GiB] inherit dracut: inactive Snapshot '/dev/vg_test1055/lv_snap' [128.00 MiB] inherit dracut: Mounted root filesystem /dev/mapper/vg_test1055-lv_snap dracut: Loading SELinux policy dracut: Switching root Additional info: * Requires fix for bug#602649
dracut-005-4.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/dracut-005-4.fc13
dracut-005-4.fc12 has been submitted as an update for Fedora 12. https://admin.fedoraproject.org/updates/dracut-005-4.fc12
dracut-005-4.fc12 has been pushed to the Fedora 12 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update dracut'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/dracut-005-4.fc12
dracut-005-5.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
dracut-005-5.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.