LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-20-2015, 12:11 PM   #1
geekslinux
Member
 
Registered: Jun 2013
Posts: 63

Rep: Reputation: Disabled
lvm migration


In RHEL 6.5 I have a lvm(lv_data) which is a lun coming from IBM storage v7000 and I have another lun which is coming from EMC as lv_data_new.

lv_data mounted to /data which is currently holding the data of the app
lv_data_new mounted as /data_new

Now I want to migrate the data from this the old lun to new lun and remove the old lun. what steps need to be followed for it.

Last edited by geekslinux; 02-21-2015 at 04:47 AM.
 
Old 02-21-2015, 05:16 PM   #2
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
I would use the following which will
recursively transfer all files from the directory lv_data into the lv_data_new directory on the local
machine. The files are transferred in "archive" mode, which ensures that symbolic links, devices, attributes, permissions, ownerships, etc.
are preserved in the transfer. Additionally, compression will be used to reduce the size of data portions of the transfer.

the above was pulled from the rsync manual but with a little editing to add your directories to it.


Code:
rsync -avz /lv_data lv_data_new
 
Old 02-21-2015, 09:24 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
When I first read this (before the edit), the OP indicated the data had been sync'd to /data_new already.

Shut down the application, copy the data, umount both, mount lv_data_new as /data, restart the application.
 
Old 02-23-2015, 12:57 AM   #4
geekslinux
Member
 
Registered: Jun 2013
Posts: 63

Original Poster
Rep: Reputation: Disabled
Thanks for the reply the above method was followed. But in some articles I read for LUN migration they used lvconvert. please find the links below

http://storagemeat.blogspot.in/2010/...linux-lvm.html
http://www.unixarena.com/2012/07/red...using-lvm.html

Can you please clarify what is the difference in method described in the links and rsync the data, unmounting and remounting. I think they can be used to do online without unmounting the application.
 
Old 02-23-2015, 04:45 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Yes, mirroring is another good option. Note the comment re breaking the pair in the first link you posted.
pvmove is another option - it can be resumed from an interruption, but the source is not a valid backup once the move starts.

Depends on individual requirements which is "better".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to do kvm live migration under lvm? siranee.ja Linux - Virtualization and Cloud 1 03-31-2012 01:04 AM
LVM San migration pafoo Linux - Server 5 08-23-2011 12:22 AM
LVM migration m3lyan Linux - Enterprise 1 12-07-2010 03:55 PM
lvm and data migration Simon Bridge Fedora 3 07-17-2007 01:48 AM
LVM migration to regular volume Delta-9 Fedora 18 08-24-2006 12:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration