Backuping "special" snapshots
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
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 16 lines · Marc Patino G�mez
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
Quoted 5 lines
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-----
Hi Bryn,
many thanks for the info. I'm going to read kpartx documentation.
Regards,
Marc
Quoted 66 lines · Bryn M. Reeves
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 16 lines · Marc Patino G�mez
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 snapshotQuoted 6 lines
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/lv00Hi 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/lv00And that will scan lv00 for partitions and create new devices in
/dev/mappernamed lv00p1, lv00p2, ... that you can then use to access the content of the partitions.When you're done, run:
# kpartx -d /dev/vg00/lv00To 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.orgiD8DBQFHA1w96YSQoMYUY94RAhW3AKC9n8+5tzN/FW38+qIUj0a82vvAMQCg0qYb bAWnKGAuyZnMoZZz089I2qg=
=+xgZ
-----END PGP SIGNATURE-----_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
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
Quoted 66 lines · Bryn M. Reeves
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 16 lines · Marc Patino G�mez
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 snapshotQuoted 6 lines
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/lv00Hi 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/lv00And that will scan lv00 for partitions and create new devices in
/dev/mappernamed lv00p1, lv00p2, ... that you can then use to access the content of the partitions.When you're done, run:
# kpartx -d /dev/vg00/lv00To 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.orgiD8DBQFHA1w96YSQoMYUY94RAhW3AKC9n8+5tzN/FW38+qIUj0a82vvAMQCg0qYb bAWnKGAuyZnMoZZz089I2qg=
=+xgZ
-----END PGP SIGNATURE-----_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 6 lines · Marc Patino G�mez
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.
Quoted 6 lines
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-----
Thanks a lot Bryn! It works like a charm :)
cheers,
Marc
Quoted 40 lines · Bryn M. Reeves
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Quoted 6 lines · Marc Patino G�mez
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.Quoted 7 lines
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.orgiD8DBQFHA3wt6YSQoMYUY94RArTrAJ9jq6qz/upa2iacWkBlGA6tI95S3wCghRRu qOVm/ledC8AaycR1PZlEAWY=
=Bn6e
-----END PGP SIGNATURE-----_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Quoted 5 lines · Marc Patino G�mez
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.
Signature · 4 lines
Stuart D. Gathman <[email protected]> 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.