Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] Backuping "special" snapshots
@ 2007-10-03  8:47 Marc Patino Gómez
  2007-10-03  9:09 ` Bryn M. Reeves
  0 siblings, 1 reply; 7+ messages in thread
From: Marc Patino Gómez @ 2007-10-03  8:47 UTC (permalink / raw)
  To: LVM general discussion and development

Hi  list,

I am searching a way to backup a "special" logical volume. This special 
lv doesn't contains a filesystem, it contains a hole image disk of a 
running server (MBR,Partition Table, Partitions and filesystems), in 
fact it is a VBD (Virtual Block Device) of a HVM Xen Guest.

I want to be able to make the backup without shutting down the Virtual 
Machine, but the traditional way :

- make a snapshot
- mount snapshot
- backup the snapshots
- umount snapshot
- remove snapshot

is not suitable for this kind of logical volumes.

I search some information about it, but the only clue is:

fdisk -l -u /dev/vg00/lv00

after looking the partition table, mount a partition with mount with the 
corresponding offset parameter...

Exists a way to do this using a snapshot? Any other advice to backup 
this kind of logical volume?

Many thanks in advance,

Cheers,

Marc

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

* Re: [linux-lvm] Backuping "special" snapshots
  2007-10-03  8:47 [linux-lvm] Backuping "special" snapshots Marc Patino Gómez
@ 2007-10-03  9:09 ` Bryn M. Reeves
  2007-10-03  9:20   ` Marc Patino Gómez
  2007-10-03 11:23   ` Marc Patino Gómez
  0 siblings, 2 replies; 7+ messages in thread
From: Bryn M. Reeves @ 2007-10-03  9:09 UTC (permalink / raw)
  To: LVM general discussion and development

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marc Patino G�mez wrote:
> Hi  list,
> 
> I am searching a way to backup a "special" logical volume. This special
> lv doesn't contains a filesystem, it contains a hole image disk of a
> running server (MBR,Partition Table, Partitions and filesystems), in
> fact it is a VBD (Virtual Block Device) of a HVM Xen Guest.
> 
> I want to be able to make the backup without shutting down the Virtual
> Machine, but the traditional way :
> 
> - make a snapshot
> - mount snapshot
> - backup the snapshots
> - umount snapshot
> - remove snapshot
> 
> is not suitable for this kind of logical volumes.
> 
> I search some information about it, but the only clue is:
> 
> fdisk -l -u /dev/vg00/lv00

Hi Marc,

You can use the kpartx tool for this. It was originally written as part
of multipath-tools and it allows you to map the partitions on a
device-mapper device like an LVM2 logical volume.

E.g. you would run:

# kpartx -a /dev/vg00/lv00

And that will scan lv00 for partitions and create new devices in
/dev/mapper named lv00p1, lv00p2, ... that you can then use to access
the content of the partitions.

When you're done, run:

# kpartx -d /dev/vg00/lv00

To remove the temporary kpartx maps.

Regards,
Bryn.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHA1w96YSQoMYUY94RAhW3AKC9n8+5tzN/FW38+qIUj0a82vvAMQCg0qYb
bAWnKGAuyZnMoZZz089I2qg=
=+xgZ
-----END PGP SIGNATURE-----

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

* Re: [linux-lvm] Backuping "special" snapshots
  2007-10-03  9:09 ` Bryn M. Reeves
@ 2007-10-03  9:20   ` Marc Patino Gómez
  2007-10-03 11:23   ` Marc Patino Gómez
  1 sibling, 0 replies; 7+ messages in thread
From: Marc Patino Gómez @ 2007-10-03  9:20 UTC (permalink / raw)
  To: LVM general discussion and development

Hi Bryn,

many thanks for the info. I'm going to read kpartx documentation.

Regards,

Marc
Bryn M. Reeves wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Marc Patino G�mez wrote:
>   
>> Hi  list,
>>
>> I am searching a way to backup a "special" logical volume. This special
>> lv doesn't contains a filesystem, it contains a hole image disk of a
>> running server (MBR,Partition Table, Partitions and filesystems), in
>> fact it is a VBD (Virtual Block Device) of a HVM Xen Guest.
>>
>> I want to be able to make the backup without shutting down the Virtual
>> Machine, but the traditional way :
>>
>> - make a snapshot
>> - mount snapshot
>> - backup the snapshots
>> - umount snapshot
>> - remove snapshot
>>
>> is not suitable for this kind of logical volumes.
>>
>> I search some information about it, but the only clue is:
>>
>> fdisk -l -u /dev/vg00/lv00
>>     
>
> Hi Marc,
>
> You can use the kpartx tool for this. It was originally written as part
> of multipath-tools and it allows you to map the partitions on a
> device-mapper device like an LVM2 logical volume.
>
> E.g. you would run:
>
> # kpartx -a /dev/vg00/lv00
>
> And that will scan lv00 for partitions and create new devices in
> /dev/mapper named lv00p1, lv00p2, ... that you can then use to access
> the content of the partitions.
>
> When you're done, run:
>
> # kpartx -d /dev/vg00/lv00
>
> To remove the temporary kpartx maps.
>
> Regards,
> Bryn.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFHA1w96YSQoMYUY94RAhW3AKC9n8+5tzN/FW38+qIUj0a82vvAMQCg0qYb
> bAWnKGAuyZnMoZZz089I2qg=
> =+xgZ
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> 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] 7+ messages in thread

* Re: [linux-lvm] Backuping "special" snapshots
  2007-10-03  9:09 ` Bryn M. Reeves
  2007-10-03  9:20   ` Marc Patino Gómez
@ 2007-10-03 11:23   ` Marc Patino Gómez
  2007-10-03 11:25     ` Bryn M. Reeves
  2007-10-03 15:16     ` Stuart D. Gathman
  1 sibling, 2 replies; 7+ messages in thread
From: Marc Patino Gómez @ 2007-10-03 11:23 UTC (permalink / raw)
  To: LVM general discussion and development

Hi again,

I try kpartx and it's so cool, but I can't make snapshots of 
/dev/vg00/lv00p1 ... so I can't solve the problem of making backup 
without stopping the Virtual Machine.

Any advice?

Regards,

Marc


Bryn M. Reeves wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Marc Patino G�mez wrote:
>   
>> Hi  list,
>>
>> I am searching a way to backup a "special" logical volume. This special
>> lv doesn't contains a filesystem, it contains a hole image disk of a
>> running server (MBR,Partition Table, Partitions and filesystems), in
>> fact it is a VBD (Virtual Block Device) of a HVM Xen Guest.
>>
>> I want to be able to make the backup without shutting down the Virtual
>> Machine, but the traditional way :
>>
>> - make a snapshot
>> - mount snapshot
>> - backup the snapshots
>> - umount snapshot
>> - remove snapshot
>>
>> is not suitable for this kind of logical volumes.
>>
>> I search some information about it, but the only clue is:
>>
>> fdisk -l -u /dev/vg00/lv00
>>     
>
> Hi Marc,
>
> You can use the kpartx tool for this. It was originally written as part
> of multipath-tools and it allows you to map the partitions on a
> device-mapper device like an LVM2 logical volume.
>
> E.g. you would run:
>
> # kpartx -a /dev/vg00/lv00
>
> And that will scan lv00 for partitions and create new devices in
> /dev/mapper named lv00p1, lv00p2, ... that you can then use to access
> the content of the partitions.
>
> When you're done, run:
>
> # kpartx -d /dev/vg00/lv00
>
> To remove the temporary kpartx maps.
>
> Regards,
> Bryn.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFHA1w96YSQoMYUY94RAhW3AKC9n8+5tzN/FW38+qIUj0a82vvAMQCg0qYb
> bAWnKGAuyZnMoZZz089I2qg=
> =+xgZ
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> 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] 7+ messages in thread

* Re: [linux-lvm] Backuping "special" snapshots
  2007-10-03 11:23   ` Marc Patino Gómez
@ 2007-10-03 11:25     ` Bryn M. Reeves
  2007-10-03 11:56       ` Marc Patino Gómez
  2007-10-03 15:16     ` Stuart D. Gathman
  1 sibling, 1 reply; 7+ messages in thread
From: Bryn M. Reeves @ 2007-10-03 11:25 UTC (permalink / raw)
  To: LVM general discussion and development

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marc Patino G�mez wrote:
> Hi again,
> 
> I try kpartx and it's so cool, but I can't make snapshots of
> /dev/vg00/lv00p1 ... so I can't solve the problem of making backup
> without stopping the Virtual Machine.
> 
> Any advice?
> 
> Regards,
> 
> Marc
> 

Sorry, I thought that lv00 was the snapshot. Just create a snapshot of
it (e.g. lv00-snap) and run kpartx against that instead.

Cheers,
Bryn.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHA3wt6YSQoMYUY94RArTrAJ9jq6qz/upa2iacWkBlGA6tI95S3wCghRRu
qOVm/ledC8AaycR1PZlEAWY=
=Bn6e
-----END PGP SIGNATURE-----

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

* Re: [linux-lvm] Backuping "special" snapshots
  2007-10-03 11:25     ` Bryn M. Reeves
@ 2007-10-03 11:56       ` Marc Patino Gómez
  0 siblings, 0 replies; 7+ messages in thread
From: Marc Patino Gómez @ 2007-10-03 11:56 UTC (permalink / raw)
  To: LVM general discussion and development

Thanks a lot Bryn! It works like a charm :)

cheers,

Marc

Bryn M. Reeves wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Marc Patino G�mez wrote:
>   
>> Hi again,
>>
>> I try kpartx and it's so cool, but I can't make snapshots of
>> /dev/vg00/lv00p1 ... so I can't solve the problem of making backup
>> without stopping the Virtual Machine.
>>
>> Any advice?
>>
>> Regards,
>>
>> Marc
>>
>>     
>
> Sorry, I thought that lv00 was the snapshot. Just create a snapshot of
> it (e.g. lv00-snap) and run kpartx against that instead.
>
> Cheers,
> Bryn.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
>
> iD8DBQFHA3wt6YSQoMYUY94RArTrAJ9jq6qz/upa2iacWkBlGA6tI95S3wCghRRu
> qOVm/ledC8AaycR1PZlEAWY=
> =Bn6e
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> 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] 7+ messages in thread

* Re: [linux-lvm] Backuping "special" snapshots
  2007-10-03 11:23   ` Marc Patino Gómez
  2007-10-03 11:25     ` Bryn M. Reeves
@ 2007-10-03 15:16     ` Stuart D. Gathman
  1 sibling, 0 replies; 7+ messages in thread
From: Stuart D. Gathman @ 2007-10-03 15:16 UTC (permalink / raw)
  To: LVM general discussion and development

On Wed, 3 Oct 2007, Marc Patino G�mez wrote:

> I try kpartx and it's so cool, but I can't make snapshots of 
> /dev/vg00/lv00p1 ... so I can't solve the problem of making backup 
> without stopping the Virtual Machine.

> Any advice?

Run kpartx on your snapshot.

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

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

end of thread, other threads:[~2007-10-03 15:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-03  8:47 [linux-lvm] Backuping "special" snapshots Marc Patino Gómez
2007-10-03  9:09 ` Bryn M. Reeves
2007-10-03  9:20   ` Marc Patino Gómez
2007-10-03 11:23   ` Marc Patino Gómez
2007-10-03 11:25     ` Bryn M. Reeves
2007-10-03 11:56       ` Marc Patino Gómez
2007-10-03 15:16     ` Stuart D. Gathman

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