[SOLVED] unmounting LUN in linux machine and mouting it to another without losing DATA
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.