* rootfs snapshots and rollback (i.e. testing updates) @ 2009-11-09 15:00 Tomasz Chmielewski 2009-11-09 16:24 ` John Dong 2009-11-09 16:38 ` Chris Ball 0 siblings, 2 replies; 5+ messages in thread From: Tomasz Chmielewski @ 2009-11-09 15:00 UTC (permalink / raw) To: linux-btrfs Is it possible, with current btrfs: - to take a rootfs snapshot (i.e. prior to a major update), - do changes in the root filesystem (i.e. install major update), - if we don't like what the major update did to the system (rootfs), "rollback" the snapshot and make it the "original" rootfs again (perhaps, with a reboot in between). If it's possible, what would be the steps/commands? -- Tomasz Chmielewski http://wpkg.org ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rootfs snapshots and rollback (i.e. testing updates) 2009-11-09 15:00 rootfs snapshots and rollback (i.e. testing updates) Tomasz Chmielewski @ 2009-11-09 16:24 ` John Dong 2009-11-09 16:38 ` Chris Ball 1 sibling, 0 replies; 5+ messages in thread From: John Dong @ 2009-11-09 16:24 UTC (permalink / raw) To: Tomasz Chmielewski; +Cc: linux-btrfs Hi, I asked this question about a month ago, and the answer is roughly "It's theoretically possible with minor feature implementations to btrfs, though nobody's done it yet" On Nov 9, 2009, at 10:00 AM, Tomasz Chmielewski wrote: > Is it possible, with current btrfs: > > - to take a rootfs snapshot (i.e. prior to a major update), > > - do changes in the root filesystem (i.e. install major update), > > - if we don't like what the major update did to the system (rootfs), > "rollback" the snapshot and make it the "original" rootfs again > (perhaps, with a reboot in between). > > > > If it's possible, what would be the steps/commands? > > > -- > Tomasz Chmielewski > http://wpkg.org > -- > To unsubscribe from this list: send the line "unsubscribe linux- > btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rootfs snapshots and rollback (i.e. testing updates) 2009-11-09 15:00 rootfs snapshots and rollback (i.e. testing updates) Tomasz Chmielewski 2009-11-09 16:24 ` John Dong @ 2009-11-09 16:38 ` Chris Ball 2009-11-10 9:53 ` Tomasz Chmielewski 1 sibling, 1 reply; 5+ messages in thread From: Chris Ball @ 2009-11-09 16:38 UTC (permalink / raw) To: Tomasz Chmielewski; +Cc: linux-btrfs Hi, > Is it possible, with current btrfs: Yes, I think so. > - to take a rootfs snapshot (i.e. prior to a major update), btrfsctl -s newsnap / > - do changes in the root filesystem (i.e. install major update), > > - if we don't like what the major update did to the system > (rootfs), "rollback" the snapshot and make it the "original" > rootfs again (perhaps, with a reboot in between). Before rebooting, edit whatever mounts your root partition (initrd, fstab, kernel argument) to add a "subvol=newsnap" mount argument. An obvious way to make this nicer would be to: * have the package manager create the snapshot before modifying the system, with a timestamp. * modify the bootloader to give a choice of snapshots at boot-time. Note that you're rolling back *all* rootfs changes, not merely the changes that the package manager made, so it wouldn't be correct to think of this as a way to only rollback package manager transactions. - Chris. -- Chris Ball <cjb@laptop.org> One Laptop Per Child ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rootfs snapshots and rollback (i.e. testing updates) 2009-11-09 16:38 ` Chris Ball @ 2009-11-10 9:53 ` Tomasz Chmielewski 2009-11-10 14:13 ` John Dong 0 siblings, 1 reply; 5+ messages in thread From: Tomasz Chmielewski @ 2009-11-10 9:53 UTC (permalink / raw) To: Chris Ball; +Cc: linux-btrfs Chris Ball wrote: > Hi, > > > Is it possible, with current btrfs: > > Yes, I think so. > > > - to take a rootfs snapshot (i.e. prior to a major update), > > btrfsctl -s newsnap / > > > - do changes in the root filesystem (i.e. install major update), > > > > - if we don't like what the major update did to the system > > (rootfs), "rollback" the snapshot and make it the "original" > > rootfs again (perhaps, with a reboot in between). > > Before rebooting, edit whatever mounts your root partition (initrd, > fstab, kernel argument) to add a "subvol=newsnap" mount argument. So, if I understand it correctly, it's not really "rolling back". Rather, with a "failed upgrade", we would mount a "newsnap" snapshot to use the old rootfs again. What's still left here would be: - remove the "failed upgrade" "(sub)volume" (which is "/" now?) - turn everything to such a state, so that you can mount the old/original rootfs without adding any "subvol=newsnap" mount arguments Correct me if I'm wrong. -- Tomasz Chmielewski http://wpkg.org ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rootfs snapshots and rollback (i.e. testing updates) 2009-11-10 9:53 ` Tomasz Chmielewski @ 2009-11-10 14:13 ` John Dong 0 siblings, 0 replies; 5+ messages in thread From: John Dong @ 2009-11-10 14:13 UTC (permalink / raw) To: Tomasz Chmielewski; +Cc: Chris Ball, linux-btrfs On Nov 10, 2009, at 4:53 AM, Tomasz Chmielewski wrote: > Chris Ball wrote: >> Hi, >> > Is it possible, with current btrfs: >> Yes, I think so. >> > - to take a rootfs snapshot (i.e. prior to a major update), >> btrfsctl -s newsnap / >> > - do changes in the root filesystem (i.e. install major update), >> > > - if we don't like what the major update did to the system >> > (rootfs), "rollback" the snapshot and make it the "original" >> > rootfs again (perhaps, with a reboot in between). >> Before rebooting, edit whatever mounts your root partition (initrd, >> fstab, kernel argument) to add a "subvol=newsnap" mount argument. > > So, if I understand it correctly, it's not really "rolling back". > > Rather, with a "failed upgrade", we would mount a "newsnap" snapshot to use the old rootfs again. > > > What's still left here would be: > > - remove the "failed upgrade" "(sub)volume" (which is "/" now?) > > - turn everything to such a state, so that you can mount the old/original rootfs without adding any "subvol=newsnap" mount arguments > > > Correct me if I'm wrong. You're right. What's needed is a way to set the new default subvol ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-11-10 14:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-11-09 15:00 rootfs snapshots and rollback (i.e. testing updates) Tomasz Chmielewski 2009-11-09 16:24 ` John Dong 2009-11-09 16:38 ` Chris Ball 2009-11-10 9:53 ` Tomasz Chmielewski 2009-11-10 14:13 ` John Dong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox