taking lvm backup
Jorge Armando Medina
jmedina at e-compugraf.com
Tue Sep 28 15:20:33 UTC 2010
Tapas Mishra wrote:
> On Tue, Sep 28, 2010 at 2:27 PM, Alvin <info at alvin.be> wrote:
>
>> One way to take a backup is to convert the LVM volumes to compressed qcow2
>> images, like this:
>> # qemu-img convert -c -f raw -O qcow2 /dev/nintendo/lvm1 /backup/lvm1.img
>>
>>
> Hmm but I do not have that much space that if the LVM is 100Gb then
> another 100 Gb of qemu image.
> Or if the filesystem is not completely occupied it is possible to see
> occupying less space.
>
> Is there any other way?
> Since the mount command as above suggested is asking me to specify the
> filesystem type which I gave
> as
> mount -t lvm /dev/nintendo/lvm1 /mnt -o ro
>
> gave following error
> mount: unknown filesystem type 'lvm'
>
LVM is not a filesystem, it is just another block device, you need to
especify the filesistem in the LV.
If you can't mount it with simply mount command, probably it is LV
partitioned, probably you need to use kpartx with the LV.
> mount -t lvm2 /dev/nintendo/lvm1 /mnt -o ro
>
> gave following error
> mount: unknown filesystem type 'lvm2'
>
> mount /dev/nintendo/lvm1 /mnt -o ro
> mount: you must specify the filesystem type
>
> all the above three have given me errors.
>
> There does exist a filesystem but out of 100 Gb only 15 Gb are
> occupied in each case.
> Also
>
It doesnt care, mount the guest filesystem and copy your data with cp,
tar or whatever other method.
For VMs basically I do something like this:
- Stop the VM
- Create a snapshot of LV
- Start the VM
- Mount the snapshot
- backup the data on the snapshot
For informataion about VM management read the documentation of the
product you are using, for more info about LVM read the official howto,
it has a lot of examples, and of course read the kpartx and mount man page.
> It is a Dell Power Edge R710 server with 500Gb of hard disk.450Gb of
> which is available.
> and in this I have used 400 Gb to created the above LVMs I mentioned.
>
>
--
Jorge Armando Medina
Computación Gráfica de México
Web: http://www.e-compugraf.com
Tel: 55 51 40 72, Ext: 124
Email: jmedina at e-compugraf.com
GPG Key: 1024D/28E40632 2007-07-26
GPG Fingerprint: 59E2 0C7C F128 B550 B3A6 D3AF C574 8422 28E4 0632
More information about the ubuntu-server
mailing list