[linux-lvm] How do I properly backup and restore / on LVM2

Sébastien Roy sroy.tcs at gmail.com
Tue Apr 13 10:30:35 UTC 2010


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 at 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 at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20100413/defc321b/attachment.htm>


More information about the linux-lvm mailing list