Alex Schuster <[email protected]> wrote:
> [email protected] writes:
>
> > I have a question -- where would lvm put a snapshot and how could I
> > pass some list of excludes to rdiff-backup. I have an lvm which is
> > taking all the PEs and a snapshot would take up lots of disk space --
> > or would it. Would I need some free pes to put the snapshot?
>
> An LVM snapshot has to be in the same volume group as the LVM. If all your
> physical extends are full, this will not work I'm afraid.
> But you can reduce the size of one LVM with lvreduce. Of course you have
> to resize the file system inside first. This is a little more complicated
> than extending the size, because you have to specify the size when
> reducing the file system and the LVM. And the file system has to be
> unmounted :(
>
> Let's say you want to reduce your data partition of 15G to 10G:
>
> umount /dev/myvg/data
> fsck -f /dev/myvg/data
> resize2fs /dev/myvg/data 9G
> lvresize -L 10G /dev/myvg/data
> resize2fs /dev/myvg/data
> mount /dev/myvg/data
>
> The 2nd resize2fs maximizes the size of the fs inside the LVM. I do not
> know (does anyone else?) if you could skip this and reduce it to 10G in
> the first resize2fs step. Just to be on the safe side I reduce it a little
> more, and let it adapt do the reduced LVM size afterwards.
>
> The snapshot itself takes nearly no space at all - it only keeps the
> changes that occur in the LVM while the snapshot is in place. So it grows
> when you modify the LVM you snapshotted. When you do not much
> modifications, 15-20% is enough according to the lvcreate man page. And I
> think I had it much lower without problems. I would expect that it can be
> really small when you do not change the original LVm much. snackup uses 2G
> as default, change this with option -s. Of course, when you do large
> modifications, like creating larger files, this may be too small.
>
> Excludes can be given with the -x option (multiple times). And have a look
> at the config template that snackup -T gives you. Near the bottom, the
> variable oXclude is defined. It is an array, just change it to your needs.
> it already excludes things like ccache, kdecache-* directories,
> */tmp/portage, and the dreaded nepomuk directory fo KDE4 because this
> sometimes gets really REALLY large here.
>
> snackup -x dip -x dap would exclude the stuff already pre-defined and dip
> and dap. If you want to exclude dip and dap only, call snackup -x "" -x
> dip -x dap. But I find it easier to adapt the oXclude array.
Thanks, very interesting and I will have a look.
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?
John Covici
[email protected]