All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] How do I properly backup and restore / on LVM2
@ 2010-04-12 16:14 Alan Pek
  2010-04-12 16:51 ` Phillip Susi
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Pek @ 2010-04-12 16:14 UTC (permalink / raw)
  To: linux-lvm

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

Hi Folks,

How do I properly backup and restore / on LVM2 , e.g.

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/rootvg-rootlv
                       2621356   1902288    719068  73% /
tmpfs                 25165824         4  25165820   1% /dev/shm
/dev/cciss/c0d0p1       106040     45992     60048  44% /boot

Am running SLES9 , should be similar in Redhat and my pvdisplay looks 
like, HW RAID 1.

 pvdisplay
  --- Physical volume ---
  PV Name               /dev/cciss/c0d1p1
  VG Name               idrwebvg
  PV Size               136.70 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              34994
  Free PE               20914
  Allocated PE          14080
  PV UUID               SFsdRA-ENGD-63KU-MV7x-OvuE-Rx5T-9fFYpb

  --- Physical volume ---
  PV Name               /dev/cciss/c0d0p2
  VG Name               rootvg
  PV Size               68.23 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              17467
  Free PE               16571
  Allocated PE          896
  PV UUID               wq9uRc-Gn9y-BbZI-PMLg-iWaC-PjlE-BsldqC

Regards
Alan

---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.

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

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

* Re: [linux-lvm] How do I properly backup and restore / on LVM2
  2010-04-12 16:14 [linux-lvm] How do I properly backup and restore / on LVM2 Alan Pek
@ 2010-04-12 16:51 ` Phillip Susi
  2010-04-12 18:50   ` Robert Mortimer
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Phillip Susi @ 2010-04-12 16:51 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Alan Pek

On 4/12/2010 12:14 PM, Alan Pek wrote:
> 
> Hi Folks,
> 
> How do I properly backup and restore / on LVM2 , e.g.

The same way you would without LVM2.  Perhaps tar or dump?  If you use
dump then lvm allows you to make a snapshot and back that up instead so
you don't have to boot to single user mode and remount ro.

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

* Re: [linux-lvm] How do I properly backup and restore / on LVM2
  2010-04-12 16:51 ` Phillip Susi
@ 2010-04-12 18:50   ` Robert Mortimer
  2010-04-13  4:11   ` Alan Pek
  2010-04-13 10:03   ` Alan Pek
  2 siblings, 0 replies; 10+ messages in thread
From: Robert Mortimer @ 2010-04-12 18:50 UTC (permalink / raw)
  To: LVM general discussion and development

On 12 April 2010 17:51, Phillip Susi <psusi@cfl.rr.com> wrote:
> On 4/12/2010 12:14 PM, Alan Pek wrote:
>>
>> Hi Folks,
>>
>> How do I properly backup and restore / on LVM2 , e.g.
>
> The same way you would without LVM2. �Perhaps tar or dump? �If you use
> dump then lvm allows you to make a snapshot and back that up instead so
> you don't have to boot to single user mode and remount ro.
>

I take a snapshot and then use rdiff-backup to get a D-2-D backup. It
works well for me and has been used once or twice. We also run a month
end tape backup using Yosemite backup http://www.barracudaware.com/

you can run the rdiff over SSH using pre-exchanged keys for off site
backup. There are also some Amazon cloud based solutions but don't
expect you data to come back in a flash (best used as a fall back in
case of the building burning down).

In short the LVM is not the important part (unless you need the
snapshot) the main things are

Qty of data
Format of backup
On-site or Off-site
Incremental of Full
Acceptable recovery time
Down time during backup
Performance during backup
And all the normal stuff

Rob Mortimer




> _______________________________________________
> 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] 10+ messages in thread

* Re: [linux-lvm] How do I properly backup and restore / on LVM2
  2010-04-12 16:51 ` Phillip Susi
  2010-04-12 18:50   ` Robert Mortimer
@ 2010-04-13  4:11   ` Alan Pek
  2010-04-13 17:54     ` Allen, Jack
  2010-04-13 10:03   ` Alan Pek
  2 siblings, 1 reply; 10+ messages in thread
From: Alan Pek @ 2010-04-13  4:11 UTC (permalink / raw)
  To: linux-lvm

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

Hi 

dump does not come with standard Suse.

Where can I get the rpm.

Have not used dump before and how do I create a snapshot ?

How do I recreate my existing LVM2 structure if my root disk is gone ?

Appreciate as we are using tsm which is tedious/problematic to restore.

One will have pxe build and then install tsm and then restore.

Appreciate your reply.

Regards
Alan

---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.

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

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

* Re: [linux-lvm] How do I properly backup and restore / on LVM2
  2010-04-12 16:51 ` Phillip Susi
  2010-04-12 18:50   ` Robert Mortimer
  2010-04-13  4:11   ` Alan Pek
@ 2010-04-13 10:03   ` Alan Pek
  2010-04-13 10:30     ` Sébastien Roy
                       ` (2 more replies)
  2 siblings, 3 replies; 10+ messages in thread
From: Alan Pek @ 2010-04-13 10:03 UTC (permalink / raw)
  To: linux-lvm

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

Hi Folks,

Read through the doc and tried to create a snapshot lv for rootlv by 
doing, but failed. 

singmrecfp1001:~ # lvcreate -L 2.5g -s -n rsnap rootvg
  Path required for Logical Volume "rootvg"
  The origin name should include the volume group.
  lvcreate: Create a logical volume
lvcreate
        [-A|--autobackup {y|n}]
        [--addtag Tag]
        [--alloc AllocationPolicy]
        [-C|--contiguous {y|n}]
        [-d|--debug]
        [-h|-?|--help]
        [-i|--stripes Stripes [-I|--stripesize StripeSize]]
        {-l|--extents LogicalExtentsNumber |
         -L|--size LogicalVolumeSize[kKmMgGtT]}
        [-M|--persistent {y|n}] [--major major] [--minor minor]
        [-m|--mirrors Mirrors]
        [-n|--name LogicalVolumeName]
        [-p|--permission {r|rw}]
        [-r|--readahead ReadAheadSectors]
        [-R|--regionsize MirrorLogRegionSize]
        [-t|--test]
        [--type VolumeType]
        [-v|--verbose]
        [-Z|--zero {y|n}]
        [--version]
        VolumeGroupName [PhysicalVolumePath...]

lvcreate -s|--snapshot
        [-c|--chunksize]
        [-A|--autobackup {y|n}]
        [--addtag Tag]
        [--alloc AllocationPolicy]
        [-C|--contiguous {y|n}]
        [-d|--debug]
        [-h|-?|--help]
        [-i|--stripes Stripes [-I|--stripesize StripeSize]]
        {-l|--extents LogicalExtentsNumber |
         -L|--size LogicalVolumeSize[kKmMgGtT]}
        [-M|--persistent {y|n}] [--major major] [--minor minor]
        [-n|--name LogicalVolumeName]
        [-p|--permission {r|rw}]
        [-r|--readahead ReadAheadSectors]
        [-t|--test]
        [-v|--verbose]
        [--version]
        OriginalLogicalVolume[Path] [PhysicalVolumePath...]


singmrecfp1001:~ # lvcreate -L 2.5g -s -n rsnap /dev/mapper/rootvg-rootlv
  Volume group "mapper" doesn't exist

singmrecfp1001:~ #  lvcreate -L 2.5g -s -n rsnap /dev/md1
  "/dev/md1": Invalid path for Logical Volume
  The origin name should include the volume group.
  lvcreate: Create a logical volume

lvcreate
        [-A|--autobackup {y|n}]
        [--addtag Tag]
        [--alloc AllocationPolicy]
        [-C|--contiguous {y|n}]
        [-d|--debug]
        [-h|-?|--help]
        [-i|--stripes Stripes [-I|--stripesize StripeSize]]
        {-l|--extents LogicalExtentsNumber |
         -L|--size LogicalVolumeSize[kKmMgGtT]}
        [-M|--persistent {y|n}] [--major major] [--minor minor]
        [-m|--mirrors Mirrors]
        [-n|--name LogicalVolumeName]
        [-p|--permission {r|rw}]
        [-r|--readahead ReadAheadSectors]
        [-R|--regionsize MirrorLogRegionSize]
        [-t|--test]
        [--type VolumeType]
        [-v|--verbose]
        [-Z|--zero {y|n}]
        [--version]
        VolumeGroupName [PhysicalVolumePath...]

lvcreate -s|--snapshot
        [-c|--chunksize]
        [-A|--autobackup {y|n}]
        [--addtag Tag]
        [--alloc AllocationPolicy]
        [-C|--contiguous {y|n}]
        [-d|--debug]
        [-h|-?|--help]
        [-i|--stripes Stripes [-I|--stripesize StripeSize]]
        {-l|--extents LogicalExtentsNumber |
         -L|--size LogicalVolumeSize[kKmMgGtT]}
        [-M|--persistent {y|n}] [--major major] [--minor minor]
        [-n|--name LogicalVolumeName]
        [-p|--permission {r|rw}]
        [-r|--readahead ReadAheadSectors]
        [-t|--test]
        [-v|--verbose]
        [--version]
        OriginalLogicalVolume[Path] [PhysicalVolumePath...]


singmrecfp1001:~ #


---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.

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

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

* Re: [linux-lvm] How do I properly backup and restore / on LVM2
  2010-04-13 10:03   ` Alan Pek
@ 2010-04-13 10:30     ` Sébastien Roy
  2010-04-13 11:47       ` Alan Pek
  2010-04-13 14:32     ` Phillip Susi
  2010-04-13 19:08     ` Stuart D. Gathman
  2 siblings, 1 reply; 10+ messages in thread
From: Sébastien Roy @ 2010-04-13 10:30 UTC (permalink / raw)
  To: linux-lvm

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

Hello,

Maybe you can try

lvcreate -L 2.5g -s -n rsnap /dev/rootvg/rootlv

Already faced this kind of situation on previous RH releases (4.3 ?) where
/dev/mapper could not (yet) be used with some LVM commands.

2010/4/13 Alan Pek <alan.pek@db.com>

>
> Hi Folks,
>
> Read through the doc and tried to create a snapshot lv for rootlv by doing,
> but failed.
>
> singmrecfp1001:~ # lvcreate -L 2.5g -s -n rsnap rootvg
>   Path required for Logical Volume "rootvg"
>   The origin name should include the volume group.
>   lvcreate: Create a logical volume
> lvcreate
>         [-A|--autobackup {y|n}]
>         [--addtag Tag]
>         [--alloc AllocationPolicy]
>         [-C|--contiguous {y|n}]
>         [-d|--debug]
>         [-h|-?|--help]
>         [-i|--stripes Stripes [-I|--stripesize StripeSize]]
>         {-l|--extents LogicalExtentsNumber |
>          -L|--size LogicalVolumeSize[kKmMgGtT]}
>         [-M|--persistent {y|n}] [--major major] [--minor minor]
>         [-m|--mirrors Mirrors]
>         [-n|--name LogicalVolumeName]
>         [-p|--permission {r|rw}]
>         [-r|--readahead ReadAheadSectors]
>         [-R|--regionsize MirrorLogRegionSize]
>         [-t|--test]
>         [--type VolumeType]
>         [-v|--verbose]
>         [-Z|--zero {y|n}]
>         [--version]
>         VolumeGroupName [PhysicalVolumePath...]
>
> lvcreate -s|--snapshot
>         [-c|--chunksize]
>         [-A|--autobackup {y|n}]
>         [--addtag Tag]
>         [--alloc AllocationPolicy]
>         [-C|--contiguous {y|n}]
>         [-d|--debug]
>         [-h|-?|--help]
>         [-i|--stripes Stripes [-I|--stripesize StripeSize]]
>         {-l|--extents LogicalExtentsNumber |
>          -L|--size LogicalVolumeSize[kKmMgGtT]}
>         [-M|--persistent {y|n}] [--major major] [--minor minor]
>         [-n|--name LogicalVolumeName]
>         [-p|--permission {r|rw}]
>         [-r|--readahead ReadAheadSectors]
>         [-t|--test]
>         [-v|--verbose]
>         [--version]
>         OriginalLogicalVolume[Path] [PhysicalVolumePath...]
>
>
> singmrecfp1001:~ # lvcreate -L 2.5g -s -n rsnap /dev/mapper/rootvg-rootlv
>   Volume group "mapper" doesn't exist
>
> singmrecfp1001:~ #  lvcreate -L 2.5g -s -n rsnap /dev/md1
>   "/dev/md1": Invalid path for Logical Volume
>   The origin name should include the volume group.
>   lvcreate: Create a logical volume
>
> lvcreate
>         [-A|--autobackup {y|n}]
>         [--addtag Tag]
>         [--alloc AllocationPolicy]
>         [-C|--contiguous {y|n}]
>         [-d|--debug]
>         [-h|-?|--help]
>         [-i|--stripes Stripes [-I|--stripesize StripeSize]]
>         {-l|--extents LogicalExtentsNumber |
>          -L|--size LogicalVolumeSize[kKmMgGtT]}
>         [-M|--persistent {y|n}] [--major major] [--minor minor]
>         [-m|--mirrors Mirrors]
>         [-n|--name LogicalVolumeName]
>         [-p|--permission {r|rw}]
>         [-r|--readahead ReadAheadSectors]
>         [-R|--regionsize MirrorLogRegionSize]
>         [-t|--test]
>         [--type VolumeType]
>         [-v|--verbose]
>         [-Z|--zero {y|n}]
>         [--version]
>         VolumeGroupName [PhysicalVolumePath...]
>
> lvcreate -s|--snapshot
>         [-c|--chunksize]
>         [-A|--autobackup {y|n}]
>         [--addtag Tag]
>         [--alloc AllocationPolicy]
>         [-C|--contiguous {y|n}]
>         [-d|--debug]
>         [-h|-?|--help]
>         [-i|--stripes Stripes [-I|--stripesize StripeSize]]
>         {-l|--extents LogicalExtentsNumber |
>          -L|--size LogicalVolumeSize[kKmMgGtT]}
>         [-M|--persistent {y|n}] [--major major] [--minor minor]
>         [-n|--name LogicalVolumeName]
>         [-p|--permission {r|rw}]
>         [-r|--readahead ReadAheadSectors]
>         [-t|--test]
>         [-v|--verbose]
>         [--version]
>         OriginalLogicalVolume[Path] [PhysicalVolumePath...]
>
>
> singmrecfp1001:~ #
>
>
> ---
>
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorized copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden.
>
> _______________________________________________
> 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/
>

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

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

* Re: [linux-lvm] How do I properly backup and restore / on LVM2
  2010-04-13 10:30     ` Sébastien Roy
@ 2010-04-13 11:47       ` Alan Pek
  0 siblings, 0 replies; 10+ messages in thread
From: Alan Pek @ 2010-04-13 11:47 UTC (permalink / raw)
  To: linux-lvm

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

Hi Folks,

Thanks.

singmrecfp1001:~ # lvcreate -L 2.5g -s -n rsnap /dev/rootvg/rootlv

  Logical volume "rsnap" created

But why the above work ?

And

singmrecfp1001:~ # mount /dev/mapper/rootvg-rsnap /mnt/rootlv/snap
singmrecfp1001:~ # df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/rootvg-rootlv
                       2621356   1637876    983480  63% /
tmpfs                  4000100         4   4000096   1% /dev/shm
/dev/md0                102712     40056     62656  39% /boot
/dev/mapper/rootvg-rsnap
                       2621356   1636964    984392  63% /mnt/rootlv/snap


However I don't see any lv with lvs

singmrecfp1001:~ # lvs
  LV     VG     Attr   LSize Origin Snap%  Move Log Copy%
  rootlv rootvg owi-ao 2.50G
  swaplv rootvg -wi-ao 1.00G

I will now mount a NFS filesystem and do a tar of this snapshot.

Is there anything I have to take care if now, my rootdisk is gone.

How do I restore from this snapshot , any specific settings like creating 
bootable block ?

The root filesystem is reiserfs and it has software mirrored.

Regards
Alan

---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.

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

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

* Re: [linux-lvm] How do I properly backup and restore / on LVM2
  2010-04-13 10:03   ` Alan Pek
  2010-04-13 10:30     ` Sébastien Roy
@ 2010-04-13 14:32     ` Phillip Susi
  2010-04-13 19:08     ` Stuart D. Gathman
  2 siblings, 0 replies; 10+ messages in thread
From: Phillip Susi @ 2010-04-13 14:32 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Alan Pek

On 4/13/2010 6:03 AM, Alan Pek wrote:
> 
> Hi Folks,
> 
> Read through the doc and tried to create a snapshot lv for rootlv by
> doing, but failed.
> 
> singmrecfp1001:~ # lvcreate -L 2.5g -s -n rsnap rootvg
>   Path required for Logical Volume "rootvg"
>   The origin name should include the volume group.
>   lvcreate: Create a logical volume

You need to specify the name of the logical volume you are trying to
snapshot but you only gave the volume group name.  Try rootvg/rootlv,
assuming your root lv is named "rootlv".

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

* Re: [linux-lvm] How do I properly backup and restore / on LVM2
  2010-04-13  4:11   ` Alan Pek
@ 2010-04-13 17:54     ` Allen, Jack
  0 siblings, 0 replies; 10+ messages in thread
From: Allen, Jack @ 2010-04-13 17:54 UTC (permalink / raw)
  To: LVM general discussion and development

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

 


  _____  

From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com]
On Behalf Of Alan Pek
Sent: Tuesday, April 13, 2010 12:12 AM
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] How do I properly backup and restore / on LVM2



Hi 

dump does not come with standard Suse. 

Where can I get the rpm. 

Have not used dump before and how do I create a snapshot ? 

How do I recreate my existing LVM2 structure if my root disk is gone ? 

Appreciate as we are using tsm which is tedious/problematic to restore. 

One will have pxe build and then install tsm and then restore. 

Appreciate your reply. 

Regards
Alan 

[Jack Allen] I believe TSM has a Bare Metal Restore option. If not there
is Storix which is not very expensive.
 

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

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

* Re: [linux-lvm] How do I properly backup and restore / on LVM2
  2010-04-13 10:03   ` Alan Pek
  2010-04-13 10:30     ` Sébastien Roy
  2010-04-13 14:32     ` Phillip Susi
@ 2010-04-13 19:08     ` Stuart D. Gathman
  2 siblings, 0 replies; 10+ messages in thread
From: Stuart D. Gathman @ 2010-04-13 19:08 UTC (permalink / raw)
  To: LVM general discussion and development

On Tue, 13 Apr 2010, Alan Pek wrote:

> Read through the doc and tried to create a snapshot lv for rootlv by 
> doing, but failed. 
> 
> singmrecfp1001:~ # lvcreate -L 2.5g -s -n rsnap rootvg
>   Path required for Logical Volume "rootvg"
>   The origin name should include the volume group.

You forgot the LV name.  E.g.

singmrecfp1001:~ # lvcreate -L 2.5g -s -n rsnap rootvg/myroot

-- 
	      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] 10+ messages in thread

end of thread, other threads:[~2010-04-13 19:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-12 16:14 [linux-lvm] How do I properly backup and restore / on LVM2 Alan Pek
2010-04-12 16:51 ` Phillip Susi
2010-04-12 18:50   ` Robert Mortimer
2010-04-13  4:11   ` Alan Pek
2010-04-13 17:54     ` Allen, Jack
2010-04-13 10:03   ` Alan Pek
2010-04-13 10:30     ` Sébastien Roy
2010-04-13 11:47       ` Alan Pek
2010-04-13 14:32     ` Phillip Susi
2010-04-13 19:08     ` Stuart D. Gathman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.