Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] Backup/Recovery Strategies
@ 2004-11-06 22:16 Axel Schweiger
  2004-11-08 17:33 ` Heinz Mauelshagen
  0 siblings, 1 reply; 5+ messages in thread
From: Axel Schweiger @ 2004-11-06 22:16 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

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?
2) How do I recover from a loss or corrpution of the LVM data.
3) What happens if the LVM filesystems have changed since the last backup of
the metadata?
 
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?

Thanks much
Axel

[-- Attachment #2: Type: text/html, Size: 1670 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Backup/Recovery Strategies
  2004-11-06 22:16 [linux-lvm] Backup/Recovery Strategies Axel Schweiger
@ 2004-11-08 17:33 ` Heinz Mauelshagen
  2004-11-17 21:54   ` [linux-lvm] LVM Config Files Krzysztof
  0 siblings, 1 reply; 5+ messages in thread
From: Heinz Mauelshagen @ 2004-11-08 17:33 UTC (permalink / raw)
  To: LVM general discussion and development

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@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

-- 

Regards,
Heinz    -- The LVM Guy --

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] Backup/Recovery Strategies
@ 2004-11-08 18:40 Axel Schweiger
  0 siblings, 0 replies; 5+ messages in thread
From: Axel Schweiger @ 2004-11-08 18:40 UTC (permalink / raw)
  To: linux-lvm

Heinz,
Thanks for your reply. Couple of clarification questions:
Lets say the disk that holds the the lvm metadata (and system files) dies
and I have to rebuild from scratch:

1) I restore the system disk
2) restore the /etc/lvm* files from backup ?
3) Am I done? 
 
Lets say I have another a couple of other LVs that don't include PVs from
the crashed disk. Lets say the data on 
the filesystem have changed. since the last backup of the /etc/lvm* data.
Will those filesystems be OK after the
restore of the /etc/lvm* data?

Besten Dank
Axel

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
=-

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [linux-lvm] LVM Config Files
  2004-11-08 17:33 ` Heinz Mauelshagen
@ 2004-11-17 21:54   ` Krzysztof
  2004-11-17 23:59     ` Jetkins
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof @ 2004-11-17 21:54 UTC (permalink / raw)
  To: 'LVM general discussion and development'

Hi.

One small question. I have googled, but don't find any news about configs in
lvm.
I understand that they are locate in /etc/lvm*, but is there any options in
lvm to specify another
location of configs like /home/jail/etc/lvm* ? for example. Or i just need
recompile lvm1 from 
source and play with location of configs files ? (i don't want do this). :\


I have lvm1 on my debian ;)
- (lvm-common v1.5.5)
- (lvm10 v1.0.4-5woody1)


Another question is about disk in lvm.

# pvscan
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- ACTIVE   PV "/dev/hdg1"  of VG "lvm" [20.22 GB / 0 free]
pvscan -- ACTIVE   PV "/dev/hde1"  of VG "lvm" [60.77 GB / 0 free]
pvscan -- ACTIVE   PV "/dev/hdb1" of VG "lvm" [82.73 GB / 0 free]

I created one big ;) volumegroup and then i create another one big logical
volume. Now i have problem.
One of disk (hdb1) is showing errors, and smart show me that it will die. Is
there any chance to free _exacly_ all pe from hdb1, and only from this disk
?
.it seems that lvm free pv from volume in strage order. Can i tell lvm that
i want free only this disk ?


Kris.

Ps. I know. My english isn't perfect. Sorry for that.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] LVM Config Files
  2004-11-17 21:54   ` [linux-lvm] LVM Config Files Krzysztof
@ 2004-11-17 23:59     ` Jetkins
  0 siblings, 0 replies; 5+ messages in thread
From: Jetkins @ 2004-11-17 23:59 UTC (permalink / raw)
  To: LVM general discussion and development


"Krzysztof" <kris@grabki.3c.pl>  wrote on 11/17/2004 03:54:26 PM:

> One of disk (hdb1) is showing errors, and smart show me that it will die.
Is
> there any chance to free _exacly_ all pe from hdb1, and only from this
disk

Doubtless others will correct me if I have this wrong, but I believe what
you want is:

      pvchange -x n /dev/hdb1
to prevent any new allocations on that PV, followed by
      pvmove /dev/hdb1
to move existing PE's from that PV to the others.

Check the manpages for options such as -v (verbose), and as always, having
a good backup is highly recommended.

> Ps. I know. My english isn't perfect. Sorry for that.

Your English is a darned sight better than my Polish! :)

Jon Etkins
IT Administration & Support
Austin Logistics, Inc
ph:  (512) 651-5641
fax: (512) 329-5625

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-17 23:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-06 22:16 [linux-lvm] Backup/Recovery Strategies Axel Schweiger
2004-11-08 17:33 ` Heinz Mauelshagen
2004-11-17 21:54   ` [linux-lvm] LVM Config Files Krzysztof
2004-11-17 23:59     ` Jetkins
  -- strict thread matches above, loose matches on Subject: below --
2004-11-08 18:40 [linux-lvm] Backup/Recovery Strategies Axel Schweiger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox