FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 05-07-2010, 07:35 PM
Alex Schuster
 
Default snackup

covici@ccs.covici.com 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.

Wonko
 
Old 05-07-2010, 07:55 PM
 
Default snackup

Alex Schuster <wonko@wonkology.org> wrote:

> covici@ccs.covici.com 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
covici@ccs.covici.com
 
Old 05-11-2010, 10:02 AM
Alex Schuster
 
Default snackup

I wrote:

> Still not on sourceforge, but here:
> http://www.wonkology.org/utils/snackup

Whoops, access denied. After a chmod o+r snackup, it is accessible now.

In case anyone already wrote me about this issue, I had lost my domain for
two days, and all the e-mails going to wonkology.org.

Wonko
 

Thread Tools




All times are GMT. The time now is 04:04 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org