[linux-lvm] Backup/Recovery Strategies

Heinz Mauelshagen mauelshagen at redhat.com
Mon Nov 8 17:33:15 UTC 2004

On Sat, Nov 06, 2004 at 02:16:46PM -0800, Axel Schweiger wrote:
> Can anyon  suggest backup/recovery strategies for filesystems under LVM.
> (Version 1 and 2)
> 1) If I loose the data in the /etc/lvm directory (or lvm.d) do I loose the
> filesystems controlled by lvm?

No, those are work files which can be recreated running vgscan
for LVM1. LVM1 keeps metadata archive files in /etc/lvmconf/ which
needs to be covered by your backup.

By default, /etc/lvm/ contains subdirectory for metadata archive in
the case of LVM2.

Best practice therefore is to backup /etc/lvm*

> 2) How do I recover from a loss or corrpution of the LVM data.

vgcfgrestore the recent metadata archive (from /etc/lvmconf/ for LVM1
or from /etc/lvm/backup/ for LVM2.

> 3) What happens if the LVM filesystems have changed since the last backup of
> the metadata?

You are refering to VGs and LVs here.

If you don't have an actual backup of /etc/lvm* *and*
corrupt your LVM metadata on the defices after a change, you can
restore the most recent archive from your last /etc/lvmconf/ backup (LVM1)
or from /etc/lvm/backup/ (LVM2) which might be ok still or not, depending
on your changes.

> Sorry if this shows a profound lack of understanding of LVM but I''m new to
> this and haven't been able to find any recipes for doing 
> backups?

The only LVM related backup is about its metadata archives and covered
in 'man lvm'.
Of course all data stored in LVs should be subject to regular backups
as with any block devices.

> Thanks much
> Axel

> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


Heinz    -- The LVM Guy --


Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
                                                  56242 Marienrachdorf
Mauelshagen at RedHat.com                            +49 2626 141200
                                                       FAX 924446

More information about the linux-lvm mailing list