LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   unmounting LUN in linux machine and mouting it to another without losing DATA (https://www.linuxquestions.org/questions/linux-newbie-8/unmounting-lun-in-linux-machine-and-mouting-it-to-another-without-losing-data-940260/)

1300 04-17-2012 09:41 AM

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

cliffordw 04-17-2012 12:50 PM

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.

1300 04-18-2012 12:43 AM

Quote:

Originally Posted by cliffordw (Post 4655285)
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

cliffordw 04-18-2012 01:02 AM

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.

1300 04-18-2012 07:14 AM

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


All times are GMT -5. The time now is 02:10 PM.