LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 04-17-2012, 10:41 AM   #1
1300
Member
 
Registered: Nov 2011
Posts: 39

Rep: Reputation: Disabled
Unhappy unmounting LUN in linux machine and mouting it to another without losing DATA


Good Day,,

am planing to do migration to a DataBase using external storage as resource

the question is: after unmounting the filesystem, and making it LUN's scanable by the new server! how can I configure it and mount that filesystem to the new server without losing data ?

Note: am using multipathing in the original server
using RHEL 5.6
 
Old 04-17-2012, 01:50 PM   #2
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 281

Rep: Reputation: 118Reputation: 118
You should be able to just install the same multipath driver & detect the drive. To mount the drive, specify the mount options manually, or copy the /etc/fstab entry from the old server.
 
Old 04-18-2012, 01:43 AM   #3
1300
Member
 
Registered: Nov 2011
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cliffordw View Post
You should be able to just install the same multipath driver & detect the drive. To mount the drive, specify the mount options manually, or copy the /etc/fstab entry from the old server.
I am just disabling the black list in /etc/multipath.conf to get the LUN's automatically configured under /dev/mapper/mpathxx! and how can copy /etc/fstab while it concerned in already configured LUN's to VGs

please correct me if I misunderstood your post
 
Old 04-18-2012, 02:02 AM   #4
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 281

Rep: Reputation: 118Reputation: 118
Hi again. I meant copy the individual relevant entry (one line) from /etc/fstab, not the entire file. I didn't think through this clearly, though, as the device name would most likely be different on the new server. You'll have to change that too, or just mount manually (by specifying the file system type, device name, mount point and any other options you may have used before.
 
Old 04-18-2012, 08:14 AM   #5
1300
Member
 
Registered: Nov 2011
Posts: 39

Original Poster
Rep: Reputation: Disabled
Talking the answer

how to move a filesystem from a server to another?
in case of using LVM! you can do so through exporting and importing the VG it self

((Original Server))
Unmounting the file system:
401 umount /data
De-activating the VG:
404 vgchange -an <VG name>
Exporting the VG so it can be scanable for the new server (the LUN's should be configured by the storage team also to be scanable by the new server)
405 vgexport <VG name>


((newserver))
scanning for new disks and you suppose to view the exported VG
102 pvscan
importing the VG:
103 vgimport <VG name>
activating it:
104 vgchange -ay <VG name>
creating a directory to be mounted to the imported VG (-p --parents no error if existing, make parent directories as needed)
105 mkdir -p /data
display LVs,,
106 lvdisplay
then mount the concerned LV to it specialy created file system
107 mount /dev/<VG name>/<LV name> /data

thanks cliffordw for your kind interest
 
  


Reply

Tags
migration


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 reinstall or upgrade linux without losing data?? cyber.scientist Linux - Newbie 14 04-24-2009 08:04 PM
upgrade system with lvm on software raid-1 data volume w/o losing data BinWondrin Linux - General 1 01-13-2009 04:25 PM
How to uninstall linux without losing data on other partitions? kchandubhai Linux - Newbie 3 12-26-2006 01:13 AM
Resizing of Linux Partitions without losing data sandhyarevuri Linux - General 2 02-11-2006 11:22 AM


All times are GMT -5. The time now is 09:32 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration