backup system for RHEL

Geofrey Rainey Geofrey.Rainey at tvnz.co.nz
Fri Jul 24 10:25:00 UTC 2009


For the Xen images made of partitions, you'd do:

# dd if=/dev/sda? of=/backup/xen-backup-image.img bs=1M

(where /dev/sda? is the partition which your /etc/xen/<xen-config>:disk='phy:.....' refers to.

Make sense?

-----Original Message-----
From: redhat-list-bounces at redhat.com [mailto:redhat-list-bounces at redhat.com] On Behalf Of ESGLinux
Sent: Friday, 24 July 2009 10:18 p.m.
To: General Red Hat Linux discussion list
Subject: Re: backup system for RHEL

2009/7/24 Geofrey Rainey <Geofrey.Rainey at tvnz.co.nz>

> You could extend the volume group by creating another physical volume
> (using fdisk if you've got spare disk), then extending your volume group
> using the
> New physical volume.
>
> Are your Xen images LVs or partitions?
>
> If they're LVs, then you have to do as I suggested (with a snapshot). If
> they're partitions, just use dd.


I have some with LVs and some in partitions.

I have systems with a directory /home/images an there several images, how I
do a backup of one image in particular?

dd if=/home/images/? of=? bs=1M

thanks,

ESG



>
>
> -----Original Message-----
> From: redhat-list-bounces at redhat.com [mailto:
> redhat-list-bounces at redhat.com] On Behalf Of ESGLinux
> Sent: Friday, 24 July 2009 10:11 p.m.
> To: General Red Hat Linux discussion list
> Subject: Re: backup system for RHEL
>
> 2009/7/24 TYURIN Aleksey <Aleksey.TYURIN at raiffeisen.ru>
>
> > Hi
> >
> > To create the snapshot you need to have enough unpartitioned space in LVM
> > value group.
> > Alternatively, you can take this space from exists LVM-logical volume to
> > valume group
> >
> > umount /dev/VolGroup00/LogVol00
> >
> > resize_reiserfs -s-1G /dev/VolGroup00/LogVol00
> > (for riserfs)
> > or
> > resize2fs /dev/VolGroup00/LogVol00 18G
> > (for ext3)
> >
> > lvreduce -L-1G /dev/VolGroup00/LogVol00
> > mount /dev/VolGroup00/LogVol00
> >
> > Can you show?:
> > vgdisplay
> >
>
> yes of course:
>
> vgdisplay
>  --- Volume group ---
>  VG Name               VolGroup00
>  System ID
>  Format                lvm2
>  Metadata Areas        2
>  Metadata Sequence No  6
>  VG Access             read/write
>  VG Status             resizable
>  MAX LV                0
>  Cur LV                1
>  Open LV               1
>  Max PV                0
>  Cur PV                2
>  Act PV                2
>  VG Size               19,06 GB
>  PE Size               32,00 MB
>  Total PE              610
>  Alloc PE / Size       610 / 19,06 GB
>  Free  PE / Size       0 / 0
>  VG UUID               nlbCIt-jUrq-d0qk-pnN8-tM90-B3w1-0vVVEL
>
>
> The fs is ext3.
>
> I´m going to try to reduce the filesystem as you suggested.
>
> One thing, what happens If I dont use LVM at all, (I  have a lot of system
> with out it). How can I make a snapshot of a Xen Image?
>
> Greetings,
>
> ESG
>
>
>
> >
> >
> > ??
> >
> > -----Original Message-----
> > From: redhat-list-bounces at redhat.com [mailto:
> > redhat-list-bounces at redhat.com] On Behalf Of ESGLinux
> > Sent: Friday, July 24, 2009 10:40 AM
> > To: General Red Hat Linux discussion list
> > Subject: Re: backup system for RHEL
> >
> > Hi,
> > this sounds interesting, I didn´t know the -s option of lvcreate.
> > I have a problem with this. In my VG I haven´t free space. When I run the
> > command:
> >
> >  lvcreate -s -L 1G -n MySnap1 /dev/VolGroup00/LogVol00
> >  Insufficient free extents (0) in volume group VolGroup00: 32 required
> >
> > I have this:
> >
> > /dev/mapper/VolGroup00-LogVol00
> >                      19360436  13805512   4555620  76% /home
> >
> > and lvdisplay:
> >  lvdisplay
> >  --- Logical volume ---
> >  LV Name                /dev/VolGroup00/LogVol00
> >  VG Name                VolGroup00
> >  LV UUID                8BRqMo-K9g5-2Pym-SZfS-Wte3-ZMvM-cqYMCv
> >  LV Write Access        read/write
> >  LV Status              available
> >  # open                 1
> >  LV Size                19,06 GB
> >  Current LE             610
> >  Segments               2
> >  Allocation             inherit
> >  Read ahead sectors     auto
> >  - currently set to     256
> >  Block device           253:0
> >
> >
> > what can I do in this situation? I´m not an expert with LVM
> >
> > Thanks
> >
> > ESG
> >
> >
> >
> >
> >
> > 2009/7/23 Geofrey Rainey <Geofrey.Rainey at tvnz.co.nz>
> >
> > > Oh and by the way, after the dd is finished you can lvremove the
> > > snapshot file.
> > >
> > > -----Original Message-----
> > > From: redhat-list-bounces at redhat.com [mailto:
> > > redhat-list-bounces at redhat.com] On Behalf Of Geofrey Rainey
> > > Sent: Friday, 24 July 2009 9:16 a.m.
> > > To: General Red Hat Linux discussion list
> > > Subject: RE: backup system for RHEL
> > >
> > > I use Xen snapshot like so:
> > >
> > > 1. create a snapshot file - this can probably be quite small
> > > (depending on usage but 1G is probably enough)
> > >
> > > lvcreate -s -L 1G -n <name of snapshot>
> > > /dev/<volume_group>/<logical_volume_name>
> > >
> > > 2. then backup your partition with something like this:
> > >
> > > dd if=/dev/<volume_group>/<name of snapshot> of=<path/lvm_backup.img>
> > > bs=1M
> > >
> > > 3. if you need to restore, do the following:
> > >
> > > dd if=< path/lvm_backup.img
> > > of=/dev/<volume_group>/<logical_volume_name>
> > >
> > > Of course you'll need as much space as the original partition for this
> > > but that's the only solution I think.
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: redhat-list-bounces at redhat.com [mailto:
> > > redhat-list-bounces at redhat.com] On Behalf Of ESGLinux
> > > Sent: Friday, 24 July 2009 12:46 a.m.
> > > To: General Red Hat Linux discussion list
> > > Subject: Re: backup system for RHEL
> > >
> > > Thanks for your answer,
> > > I´ll take a look at openfiler, it looks great.
> > >
> > > One question, how do I make a Xen snapshot? With vmware I see the
> > > option, but with Xen not.
> > >
> > > any help?
> > >
> > > thanks,
> > >
> > > ESG
> > >
> > >
> > > >
> > > --
> > > redhat-list mailing list
> > > unsubscribe mailto:redhat-list-request at redhat.com?subject=subscribe
> > > https://www.redhat.com/mailman/listinfo/redhat-list
> > > ==========================================================
> > > For more information on the Television New Zealand Group, visit us
> > > online at tvnz.co.nz
> > > ==========================================================
> > > CAUTION:  This e-mail and any attachment(s) contain information that
> > > is intended to be read only by the named recipient(s).  This
> > > information is not to be used or stored by any other person and/or
> > organisation.
> > >
> > >
> > > --
> > > redhat-list mailing list
> > > unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> > > https://www.redhat.com/mailman/listinfo/redhat-list
> > > ==========================================================
> > > For more information on the Television New Zealand Group, visit us
> > > online at tvnz.co.nz
> > > ==========================================================
> > > CAUTION:  This e-mail and any attachment(s) contain information that
> > > is intended to be read only by the named recipient(s).  This
> > > information is not to be used or stored by any other person and/or
> > organisation.
> > >
> > >
> > > --
> > > redhat-list mailing list
> > > unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> > > https://www.redhat.com/mailman/listinfo/redhat-list
> > >
> > --
> > redhat-list mailing list
> > unsubscribe mailto:redhat-list-request at redhat.com?subject=subscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
> >
> > -----------------------------------
> > This message and any attachment are confidential and may be privileged or
> > otherwise protected from disclosure.  If you are not the intended
> recipient
> > any use, distribution, copying or disclosure is strictly prohibited. If
> you
> > have
> > received this message in error, please notify the sender immediately
> either
> > by telephone or by e-mail and delete  this message and any attachment
> from
> > your system. Correspondence via e-mail is for information purposes only.
> >  ZAO Raiffeisenbank neither makes nor accepts legally binding statements
> by
> > e-mail unless otherwise agreed.
> > -----------------------------------
> >
> > --
> > redhat-list mailing list
> > unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
> >
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=subscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
> ==========================================================
> For more information on the Television New Zealand Group, visit us
> online at tvnz.co.nz
> ==========================================================
> CAUTION:  This e-mail and any attachment(s) contain information that
> is intended to be read only by the named recipient(s).  This information
> is not to be used or stored by any other person and/or organisation.
>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=subscribe
https://www.redhat.com/mailman/listinfo/redhat-list
==========================================================
For more information on the Television New Zealand Group, visit us
online at tvnz.co.nz 
==========================================================
CAUTION:  This e-mail and any attachment(s) contain information that
is intended to be read only by the named recipient(s).  This information
is not to be used or stored by any other person and/or organisation.





More information about the redhat-list mailing list