linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Partition Recovery in LVM
@ 2010-08-16  4:45 Andrew Ragone
  2010-08-16 13:00 ` Bryn M. Reeves
  2010-08-16 13:02 ` Romeo Theriault
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Ragone @ 2010-08-16  4:45 UTC (permalink / raw)
  To: linux-lvm

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

I've been searching like crazy to find an answer to this question to no
avail: when you restore a backup of LVM does the backup contain partition
table information as well? 

 

I recently recovered an LVM that had a partition inside of it, but it has
since been unable to mount. Most recovery utilities such as TestDisk will
only find the LVM so I'm unsure of how to proceed and "recover" the
partition. 

 

-Andrew


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

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

* Re: [linux-lvm] Partition Recovery in LVM
  2010-08-16  4:45 [linux-lvm] Partition Recovery in LVM Andrew Ragone
@ 2010-08-16 13:00 ` Bryn M. Reeves
  2010-08-16 13:02 ` Romeo Theriault
  1 sibling, 0 replies; 4+ messages in thread
From: Bryn M. Reeves @ 2010-08-16 13:00 UTC (permalink / raw)
  To: LVM general discussion and development

On 08/16/2010 05:45 AM, Andrew Ragone wrote:
> I�ve been searching like crazy to find an answer to this question to no avail: 
> when you restore a backup of LVM does the backup contain partition table 
> information as well?

No; LVM2 sits a level above partitioning. If you had a partition table
on the devices that were being used by LVM2 when you backed up you
should put it back before you restore (and back it up separately of course).

Note also that if you were using partitions then you'll need to
re-create the PVs on the appropriate partitions after restoring those
before you can restore the LVM2 metadata.

If you're just using whole-disk devices then there are no partitions or
partition tables to worry about.

If you mean partition tables that are stored _inside_ logical volumes
(e.g. where the LV is a whole-disk image for a virtual machine
containing partitions) then the answer's no as well; in this case the
partition table is just ordinary data on the LV and LVM2 doesn't know or
care about it at all (so you need to back it up separately, just like
any other data stored in an LV).

> I recently recovered an LVM that had a partition inside of it, but it has since 
> been unable to mount. Most recovery utilities such as TestDisk will only find 
> the LVM so I�m unsure of how to proceed and �recover� the partition.

Run the tools agains the logical volume (LV), not the physical volume (PV).

Regards,
Bryn.

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

* Re: [linux-lvm] Partition Recovery in LVM
  2010-08-16  4:45 [linux-lvm] Partition Recovery in LVM Andrew Ragone
  2010-08-16 13:00 ` Bryn M. Reeves
@ 2010-08-16 13:02 ` Romeo Theriault
  2010-08-16 14:25   ` Bryn M. Reeves
  1 sibling, 1 reply; 4+ messages in thread
From: Romeo Theriault @ 2010-08-16 13:02 UTC (permalink / raw)
  To: LVM general discussion and development

On Mon, Aug 16, 2010 at 13:45, Andrew Ragone <ajr9166@rit.edu> wrote:
>
> I�ve been searching like crazy to find an answer to this question to no avail: when you restore a backup of LVM does the backup contain partition table information as well?

What kind of backup are you taking? Agent Client based or SAN snapshot based?

>
> I recently recovered an LVM that had a partition inside of it, but it has since been unable to mount. Most recovery utilities such as TestDisk will only find the LVM so I�m unsure of how to proceed and �recover� the partition.
>
>

I don't know the exact lvm commands off the top of my head, but first
I think you need to import the VG with something like 'vgimportclone'
and then once the volume group is imported you should be able to see
the partitions that reside in the VG. Not sure but you may need to run
a 'kpartx -a' to get the kernel to see the new partitions that are
available in the VG. Then I think it should be a matter of mounting
the partition in /dev/mapper/<VG>



>
> -Andrew
>
> _______________________________________________
> 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/



--
Romeo Theriault
System Administrator
Information Technology Services
Ph#: 207-561-3517
Em@: romeo@maine.edu

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

* Re: [linux-lvm] Partition Recovery in LVM
  2010-08-16 13:02 ` Romeo Theriault
@ 2010-08-16 14:25   ` Bryn M. Reeves
  0 siblings, 0 replies; 4+ messages in thread
From: Bryn M. Reeves @ 2010-08-16 14:25 UTC (permalink / raw)
  To: LVM general discussion and development

On 08/16/2010 02:02 PM, Romeo Theriault wrote:
> On Mon, Aug 16, 2010 at 13:45, Andrew Ragone <ajr9166@rit.edu> wrote:
>>
>> I�ve been searching like crazy to find an answer to this question to no avail: when you restore a backup of LVM does the backup contain partition table information as well?
> 
> What kind of backup are you taking? Agent Client based or SAN snapshot based?
> 
>>
>> I recently recovered an LVM that had a partition inside of it, but it has since been unable to mount. Most recovery utilities such as TestDisk will only find the LVM so I�m unsure of how to proceed and �recover� the partition.
>>
>>
> 
> I don't know the exact lvm commands off the top of my head, but first
> I think you need to import the VG with something like 'vgimportclone'

Only if you're backing up the VG by cloning the storage (SAN clone/snap,
dd image, MD split mirror etc.).

> and then once the volume group is imported you should be able to see
> the partitions that reside in the VG. Not sure but you may need to run
> a 'kpartx -a' to get the kernel to see the new partitions that are
> available in the VG. Then I think it should be a matter of mounting
> the partition in /dev/mapper/<VG>

This is only needed if the LVs contain partition tables themselves (e.g.
VM storage). Any partitions containing PVs on the cloned storage should
be detected automatically by the kernel.

Regards,
Bryn.

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

end of thread, other threads:[~2010-08-16 14:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-16  4:45 [linux-lvm] Partition Recovery in LVM Andrew Ragone
2010-08-16 13:00 ` Bryn M. Reeves
2010-08-16 13:02 ` Romeo Theriault
2010-08-16 14:25   ` Bryn M. Reeves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).