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

Re: Bug#823465: dpkg: Won't run at all on i586 Pentium MMX due to illegal instruction



On Mon, May 09, 2016 at 10:21:21AM -0700, Nikolaus Rath wrote:
> > Another way is to use btrfs (or zfs or perhaps LVM snapshots): whenever
> > something goes south in a way that's not trivial to recover, you can
> > restore with a couple commands and reboot.  And if unbootable because,
> > for example, someone removed support for your CPU, you boot with
> > subvol=backups/sys-2016-05-07.
> 
> I'd advise against using LVM snapshots. The time for initial activation
> seems to go up exponentially with the amount of data in snapshot
> volumes. I think they are only intended for short-term use
> (e.g. to take a backup).

If what you want to do is a rollback operation after a package
installation goes badly, LVM snapshots are sufficient.  They aren't as
convenient as btrfs, but they do work.  So what you'd do is do is (a)
create the snapshot, (b) inststall the package.  If the package looks
good, then delete the snapshot.

If you discover that the package hoses your system then to rollback,
shutdown the system to single-user mode, and remount the file system
to be read-only, and then use the command lvconvert --merge to restore
your file system back to the state of the snapshot.  This will consume
the snapshot, and leave the file system (presumably ext3 or ext4) in a
potentially confused state, which is why you need to do this with the
file system remounted read-only.   Then reboot, and you're all set.

I there is a yum plugin for Fedora where you reboot, and the lvconvert
--merge is done as part of the reboot (either as the system is
shutting down, or in the initramfs before the file system is mounted).
That's a much more convenient and user-friendly way to do the
rollback; creating such a covenience setup is left as an exercise to
the reader.  :-)

Cheers,

						- Ted


Reply to: