[SOLVED] moving LVM without access to original server
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
I have a server here at home that uses CentOS 6. It has 1x500gb HD and 3x2tb hdd's. I have what im pretty sure is a linear LVM spanning across the 3 2tb. Now the server that it is currently in will no longer read the drives (pretty sure it is the mobo coz the drives are still confirmed working.) So I don't have access to the Linux os to safely shutdown and export the LVM. If I chucked all these drives in another server that doesn't have an OS on it already and boot from the 500 which has my centos install on it. Will it successfully rebuild/workout that there is an LVM there or is my data gone?
As long as the hardware is similar enough that the OS will boot, the OS should find and access the LVM drives just fine. Since the original server apparently crashed hard, you will likely have some filesystems that need fsck, but that should be all.
Hmm you make a good point. The server it was in is an AMD athlon x2 so pretty old. Can you tell me what hardware is going to play a part in whether I can boot in or not?
Once I get my hands on a new server for it the hardware is going to be pretty new school.
Been a whie since I built Centos, but it should have LVM support in all the right places by default - if not you can instal it and do a "vgchange -a y" to force it to go look for "new" (as in unknown) vgs.
Been a whie since I built Centos, but it should have LVM support in all the right places by default - if not you can instal it and do a "vgchange -a y" to force it to go look for "new" (as in unknown) vgs.
Thanks for all the advice. It is very helpful. Just one last question. Will it matter what ports I plug the drives into? As it is a linear LVM will it work out what order the drives go in or do I require to plug it in, in the same pattern that the drives were in, in the old server?
One would hope the on-disk metadata is suffficient - else make sure you have that 500Gig drive handy; with luck there will be something in /etc/lvm/backup.
I'll second the advice to install a new OS on the new server and let it find the LVM disks. The big issue is the presence of drivers needed to access the root filesystem. If that old 500GB disk was PATA, the initrd would not have included SATA drivers. Your new server might well not even have any PATA ports. so trying to use some SATA<=>PATA adapter would not work for booting without that SATA driver in the initrd.
One more thing - if you do install Centos, and use LVM again, don't accept the default names for vgs and (maybe) lvs. In all probability the names will be the same as the ones you'll be trying to restore.
Can be fixed later, but a PITA you can (and should) avoid easily.
I'll second the advice to install a new OS on the new server and let it find the LVM disks. The big issue is the presence of drivers needed to access the root filesystem. If that old 500GB disk was PATA, the initrd would not have included SATA drivers. Your new server might well not even have any PATA ports. so trying to use some SATA<=>PATA adapter would not work for booting without that SATA driver in the initrd.
The motherboard it is on now is SATA. So if that is the only limitation it will be ok.
Quote:
Originally Posted by syg00
One more thing - if you do install Centos, and use LVM again, don't accept the default names for vgs and (maybe) lvs. In all probability the names will be the same as the ones you'll be trying to restore.
Can be fixed later, but a PITA you can (and should) avoid easily.
I didn't use a default name I don't think. I plugged all the drives into my windows PC and ran EXT2explore to see if the drives were working and EXT2explore saw a LVM named Share01 (which I am pretty sure is what I named it.
Cheers for the advice though. You guys have been immensely helpful in calming my nerves lol.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.