All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Question on LVM and Bare Metal Restore?
@ 2011-06-11 22:44 Michael D. Setzer II
  2011-06-12  5:40 ` Ray Morris
  2011-06-12  9:01 ` Milan Broz
  0 siblings, 2 replies; 4+ messages in thread
From: Michael D. Setzer II @ 2011-06-11 22:44 UTC (permalink / raw)
  To: linux-lvm

I'm the maintainer for the G4L disk imaging project since version 
0.15 to the current 0.37, and working on 0.38. 

Backing up the regular partitions that contain an LVM has been 
always been available, and backing up the whole disk image. 
Recent versions have added the ability to backup the LVM dm 
partitions as well. Backing up and restore works fine as long as 
the LVM setup is already there, but it a disk completely fails one 
would need to recreate the LVM before being able to restore it.

Similar to how one backs up the MBR and partition table for disks, 
I'd like to have a method that would allow for the recreation of the 
LVM, so that restores could be done. Additionally, with the 
fsarchiver doing backups of files in use, it is generally faster than 
doing a raw dd type backup. 

Is there a script or how to that explains the process of creating a 
script to recreate the LVM from scratch or from an already existing 
partition table?

Thanks.

+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:mikes@kuentos.guam.net                            
  mailto:msetzerii@gmail.com
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
  G4L Disk Imaging Project maintainer 
  http://sourceforge.net/projects/g4l/
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC@HOME CREDITS
SETI        10870621.860383   |   EINSTEIN     6012510.330851
ROSETTA      3240336.813559   |   ABC          6279463.408252

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

* Re: [linux-lvm] Question on LVM and Bare Metal Restore?
  2011-06-11 22:44 [linux-lvm] Question on LVM and Bare Metal Restore? Michael D. Setzer II
@ 2011-06-12  5:40 ` Ray Morris
  2011-06-12  9:01 ` Milan Broz
  1 sibling, 0 replies; 4+ messages in thread
From: Ray Morris @ 2011-06-12  5:40 UTC (permalink / raw)
  To: LVM general discussion and development

See vgcfgrestore.
-- 
Ray Morris
Http://bettercgi.com

"Michael D. Setzer II" <mikes@kuentos.guam.net> wrote:

>I'm the maintainer for the G4L disk imaging project since version 
>0.15 to the current 0.37, and working on 0.38. 
>
>Backing up the regular partitions that contain an LVM has been 
>always been available, and backing up the whole disk image. 
>Recent versions have added the ability to backup the LVM dm 
>partitions as well. Backing up and restore works fine as long as 
>the LVM setup is already there, but it a disk completely fails one 
>would need to recreate the LVM before being able to restore it.
>
>Similar to how one backs up the MBR and partition table for disks, 
>I'd like to have a method that would allow for the recreation of the 
>LVM, so that restores could be done. Additionally, with the 
>fsarchiver doing backups of files in use, it is generally faster than 
>doing a raw dd type backup. 
>
>Is there a script or how to that explains the process of creating a 
>script to recreate the LVM from scratch or from an already existing 
>partition table?
>
>Thanks.
>
>+----------------------------------------------------------+
>  Michael D. Setzer II -  Computer Science Instructor      
>  Guam Community College  Computer Center                  
>  mailto:mikes@kuentos.guam.net                            
>  mailto:msetzerii@gmail.com
>  http://www.guam.net/home/mikes
>  Guam - Where America's Day Begins                        
>  G4L Disk Imaging Project maintainer 
>  http://sourceforge.net/projects/g4l/
>+----------------------------------------------------------+
>
>http://setiathome.berkeley.edu (Original)
>Number of Seti Units Returned:  19,471
>Processing time:  32 years, 290 days, 12 hours, 58 minutes
>(Total Hours: 287,489)
>
>BOINC@HOME CREDITS
>SETI        10870621.860383   |   EINSTEIN     6012510.330851
>ROSETTA      3240336.813559   |   ABC          6279463.408252
>
>_______________________________________________
>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/

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

* Re: [linux-lvm] Question on LVM and Bare Metal Restore?
  2011-06-11 22:44 [linux-lvm] Question on LVM and Bare Metal Restore? Michael D. Setzer II
  2011-06-12  5:40 ` Ray Morris
@ 2011-06-12  9:01 ` Milan Broz
  2011-06-12 15:22   ` Michael D. Setzer II
  1 sibling, 1 reply; 4+ messages in thread
From: Milan Broz @ 2011-06-12  9:01 UTC (permalink / raw)
  To: LVM general discussion and development

On 06/12/2011 12:44 AM, Michael D. Setzer II wrote:

> Backing up the regular partitions that contain an LVM has been 
> always been available, and backing up the whole disk image. 
> Recent versions have added the ability to backup the LVM dm 
> partitions as well. Backing up and restore works fine as long as 
> the LVM setup is already there, but it a disk completely fails one 
> would need to recreate the LVM before being able to restore it.

Recovery is very easy with LVM (once you find how to do that:-)

I suggest you read the LVM documentation, mainly
the section 6. LVM troubleshooting.

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html-single/Logical_Volume_Manager_Administration/index.html

All you need to recover LVM metadata is metadata backup
(automatically maintained in /etc/lvm or directory specified in lvm.conf)
and then something like
pvcreate -u <uuid> --restorefile <backup file> <PV> # only if PV header is lost!
vgcfgrestore -f <backup file> <VG>

Milan

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

* Re: [linux-lvm] Question on LVM and Bare Metal Restore?
  2011-06-12  9:01 ` Milan Broz
@ 2011-06-12 15:22   ` Michael D. Setzer II
  0 siblings, 0 replies; 4+ messages in thread
From: Michael D. Setzer II @ 2011-06-12 15:22 UTC (permalink / raw)
  To: LVM general discussion and development

On 12 Jun 2011 at 11:01, Milan Broz wrote:

Date sent:      	Sun, 12 Jun 2011 11:01:41 +0200
From:           	Milan Broz <mbroz@redhat.com>
To:             	LVM general discussion and development <linux-
lvm@redhat.com>
Copies to:      	"Michael D. Setzer II" 
<mikes@kuentos.guam.net>
Subject:        	Re: [linux-lvm] Question on LVM and Bare Metal 
Restore?

> On 06/12/2011 12:44 AM, Michael D. Setzer II wrote:
> 
> > Backing up the regular partitions that contain an LVM has been 
> > always been available, and backing up the whole disk image. 
> > Recent versions have added the ability to backup the LVM dm 
> > partitions as well. Backing up and restore works fine as long as 
> > the LVM setup is already there, but it a disk completely fails one 
> > would need to recreate the LVM before being able to restore it.
> 
> Recovery is very easy with LVM (once you find how to do that:-)
> 
> I suggest you read the LVM documentation, mainly
> the section 6. LVM troubleshooting.
> 
> http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html-single/Logical_Volume_Manager_Administration/index.html
> 
> All you need to recover LVM metadata is metadata backup
> (automatically maintained in /etc/lvm or directory specified in lvm.conf)
> and then something like
> pvcreate -u <uuid> --restorefile <backup file> <PV> # only if PV header is lost!
> vgcfgrestore -f <backup file> <VG>
> 
> Milan
> 
Thanks for both messages, they will give me a starting point to 
test. 

In doing a backup of a 250GB physical partition with a LVM and 
swap it takes about 1 hour and 40 minutes to backup, but only 20 
minutes to use fsarchiver to backup the lvm root directly. 

Perhaps adding vgcfgbackup and vgcfgrestore options to the mbr 
backup section will work. Will have to setup a test machine, and 
see if I can complete wipe the disk, and have it restore LVM from 
scratch.

Thanks again.


+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:mikes@kuentos.guam.net                            
  mailto:msetzerii@gmail.com
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
  G4L Disk Imaging Project maintainer 
  http://sourceforge.net/projects/g4l/
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC@HOME CREDITS
SETI        10870621.860383   |   EINSTEIN     6012510.330851
ROSETTA      3240336.813559   |   ABC          6279463.408252

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

end of thread, other threads:[~2011-06-12 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-11 22:44 [linux-lvm] Question on LVM and Bare Metal Restore? Michael D. Setzer II
2011-06-12  5:40 ` Ray Morris
2011-06-12  9:01 ` Milan Broz
2011-06-12 15:22   ` Michael D. Setzer II

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.