Re: BTRFS/Rollback & Yum Snapshot Plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/30/2014 09:02 PM, Jorge Fábregas wrote:
> Now, here's the thing.  I wanted to permanently run off these snapshots
> so I wanted to delete the parent "subvolumes" for these snapshots (e.g.
> "commit" the snapshot) by doing:
> 
> # mount -o subvolid=5 /dev/vda3 /mnt
> # btrfs subvolume delete /mnt/root
> Delete subvolume '/mnt/root'
> ERROR: cannot delete '/mnt/root' - Device or resource busy

Well, I found out you can rename the subvolumes and not only that;  you
can also rename them ("move" them) while they're being used.  This is
what I'm doing when I want to rollback my system to the previous state:

1) Modify GRUB2:  Change "rootflags=subvol=root/yum_*" accordingly & reboot

2) Make sure you're running off the snapshot subvolume:
# cat /proc/selfmountinfo | grep btrfs

3) Move/Rename snapshot subvol & delete old root fs
# mount -o subvolid=5 /dev/vda3 /mnt
# mv /mnt/root/yum_20140203080009 /mnt
# btrfs subvolume delete /mnt/root
# mv /mnt/yum_20140203080009 /mnt/root

4) Modify GRUB2:  revert rootflags=subvol=root/yum_* to subvol=root

Since I used the default setup for btrfs, Anaconda created a /boot of
its own (ext4). (I presume a btrfs /boot is not ready yet).  This
creates some time paradox issues when I want to run "yum upgrade" again:

- yum wants to install a kernel that I already have (the one I'm
currently running with)
- yum wants  to remove the oldest kernel (which it already removed on
previous existence)

All of this due to the fact that I restored the previous RPM database
when I rollbacked my system.

There is more to this yum-plugin/btrfs/rollback than meets the eye :(

-- 
Jorge
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux