hello all,
Hoping for some help on copying Logical Volumes.
I would like to copy an existing LV to a newly formed LV.
I don't want to do a snapshot of an existing LV.
Only way I've seen is to mount the to LV and: mount /dev/vg00/lv00 /mnt/orig mount /dev/vg00/lv01 /mnt/copy
cd /mnt/orig tar cf - ./ |(cd /mnt/copy; tar xf - )
Is there a LV tool to do this? Or an option used with lvcreate, such as --autobackup? Or maybe pvmove, but that seems more for moving To LV from PV or vesa versa?
Thanks in advance,
Jesse Waters
Haven't actually tried it, but how about just a
dd if=/dev/vg00/lv00 of=/dev/vg00/lv01
Assuming both are unmounted/unchanging while you do it.
-jim
Jesse Waters wrote:
hello all,
Hoping for some help on copying Logical Volumes.
I would like to copy an existing LV to a newly formed LV.
I don't want to do a snapshot of an existing LV.
Only way I've seen is to mount the to LV and: mount /dev/vg00/lv00 /mnt/orig mount /dev/vg00/lv01 /mnt/copy
cd /mnt/orig tar cf - ./ |(cd /mnt/copy; tar xf - )
Is there a LV tool to do this? Or an option used with lvcreate, such as --autobackup? Or maybe pvmove, but that seems more for moving To LV from PV or vesa versa?
Thanks in advance,
Jesse Waters _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, 2005-10-14 at 12:23 -0400, Jesse Waters wrote:
hello all,
Hoping for some help on copying Logical Volumes.
<snip>
cd /mnt/orig tar cf - ./ |(cd /mnt/copy; tar xf - )
Is there a LV tool to do this? Or an option used with lvcreate, such as --autobackup? Or maybe pvmove, but that seems more for moving To LV from PV or vesa versa?
To my knowledge, a comparable (better, faster, more/less * who knows) way is
find . | cpio -pduma /mnt/copy
There are other newer params to cpio, some of which *may* be needed for some devices, etc. Since I haven[t read a cpio man page in about 20+ years, I suggest you give it a browse.
Cpio has/was/is always been preferred by many admins for many reasons. But tar got all the GNU press so bias ruled over reason, as normal. Try cpio and you might like it.
It does have a tar compatibility mode, which is relatively new to me. Shows how long I've been involved with *(IX and how far I fall behind when I stop reading stuff.
<snip>
Bill
Quoting Jesse Waters jesse.waters@gmail.com:
hello all,
Hoping for some help on copying Logical Volumes.
I would like to copy an existing LV to a newly formed LV.
I don't want to do a snapshot of an existing LV.
Only way I've seen is to mount the to LV and: mount /dev/vg00/lv00 /mnt/orig mount /dev/vg00/lv01 /mnt/copy
cd /mnt/orig tar cf - ./ |(cd /mnt/copy; tar xf - )
Is there a LV tool to do this? Or an option used with lvcreate, such as --autobackup? Or maybe pvmove, but that seems more for moving To LV from PV or vesa versa?
Hm, maybe using that new mirroring feature in LVM. Mirror the thing, let it sync, and than break the mirror. You can have the thing online and available while syncing, and just unmount it for the short period of time when breaking the mirror (to avoid data corruption). Just an idea to investigate, don't know if it is actually doable (haven't yet had time to play with LVM mirroring, just saw it in list of new features).
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
On Fri, 2005-10-14 at 15:47 -0500, Aleksandar Milivojevic wrote:
Hm, maybe using that new mirroring feature in LVM. Mirror the thing, let it sync, and than break the mirror. You can have the thing online and available while syncing, and just unmount it for the short period of time when breaking the mirror (to avoid data corruption). Just an idea to investigate, don't know if it is actually doable (haven't yet had time to play with LVM mirroring, just saw it in list of new features).
Don't know about doing this under Linux, but it's one of the recommended solutions for backing up a system live running HP-UX. Though the people that I've heard doing this usually setup a three way mirror ... a bit wasteful of disk space, but 100% uptime.
Paul
Just wanted to thank everyone that replyed,
I will take a closer look at xfs and its features.
Regards,
Jesse Waters