[mythtv-users] MythTV updates, back out plan, lvm snapshots
Brian J. Murrell
brian at interlinx.bc.ca
Sun Feb 26 15:13:06 UTC 2012
On 12-02-26 08:05 AM, Brent Bolin wrote:
> Hello All,
> I've know about lvm snapshots for a while but haven't used it.
Welcome to 1990. :-)
> Assuming core OS is all in a single lv.
Not a requirement. I have my /usr and /var in separate LVs from / and
just snapshot all of them. i.e.:
$ sudo lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
,,, ubuntu_root rootvol_tmp owi-ao 500.00m
ubuntu_root-20111213 rootvol_tmp swi-a- 500.00m ubuntu_root 49.09
ubuntu_root-20120209 rootvol_tmp swi-a- 500.00m ubuntu_root 43.17
ubuntu_root-20120214 rootvol_tmp swi-a- 500.00m ubuntu_root 36.15
ubuntu_root-20120220 rootvol_tmp swi-a- 500.00m ubuntu_root 15.43
ubuntu_usr rootvol_tmp owi-ao 2.49g
ubuntu_usr-20111213 rootvol_tmp swi-a- 2.49g ubuntu_usr 34.00
ubuntu_usr-20120209 rootvol_tmp swi-a- 2.49g ubuntu_usr 29.71
ubuntu_usr-20120214 rootvol_tmp swi-a- 2.49g ubuntu_usr 25.40
ubuntu_usr-20120220 rootvol_tmp swi-a- 2.49g ubuntu_usr 14.20
ubuntu_var rootvol_tmp owi-ao 1.99g
ubuntu_var-20111213 rootvol_tmp swi-a- 1.99g ubuntu_var 60.55
ubuntu_var-20120209 rootvol_tmp swi-a- 1.99g ubuntu_var 47.15
ubuntu_var-20120214 rootvol_tmp swi-a- 2.49g ubuntu_var 30.73
ubuntu_var-20120220 rootvol_tmp swi-a- 2.49g ubuntu_var 22.28
[ Please nobody lecture me on the performance impacts of the above
number of snapshots. I fully understand, and yes, probably do need
to do some snapshot pruning ].
> lvcreate -L8G -s -n rootsnapshot /dev/vol00/root ( in my case )
Yup, repeat for as many mount points as you normally have per above.
> And to back out if needed -
> lvconvert --merge /dev/vol00/rootsnapshot ; init 6
It's even easier than that. Simply boot the snapshot (assuming you
upgraded the origin). To be more clear, add a new grub entry and
change the root= on the kernel command line in the new entry to
point to your snapshot. If you do as I do and have a separate /usr
and /var, you of course need to make sure you update /etc/fstab on
the snapshot to boot the snapshotted version of those.
> Granted I've had a back end running for 4 years now. Never really had
> a problem doing updates other then when changing MythtV releases
> (tweaking etc...).
Well, I run master (for the moment, will switch to 0.25-fixes when 0.25
is released) so I like having the backout plan.
> Don't know how much simpler it can get; to get back to go.
Well, per above, it is even simpler if you simply boot the snapshot.
I've never used the lvconvert --merge facility. Does it have a time
penalty while it merges the snapshot back up into the origin?
I'd just as soon keep my forks open though so that I can do a port-
mortem should I need to.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://www.mythtv.org/pipermail/mythtv-users/attachments/20120226/689f8149/attachment.bin
More information about the mythtv-users