LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-23-2014, 05:56 PM   #1
Jimz0r
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Rep: Reputation: 0
moving LVM without access to original server


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?

Last edited by Jimz0r; 07-23-2014 at 05:57 PM.
 
Old 07-23-2014, 06:15 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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.
 
1 members found this post helpful.
Old 07-23-2014, 06:28 PM   #3
Jimz0r
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
Old 07-23-2014, 07:15 PM   #4
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
A better option would probably be to get a OS on the new server, and let it detect the LVM components.
 
1 members found this post helpful.
Old 07-23-2014, 07:24 PM   #5
Jimz0r
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
A better option would probably be to get a OS on the new server, and let it detect the LVM components.
So if i installed centos on the new PC and plug in the 3 2tbs. It should just read the LVM information without the 500GB in the loop?
 
Old 07-23-2014, 07:44 PM   #6
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
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.
 
1 members found this post helpful.
Old 07-23-2014, 08:12 PM   #7
Jimz0r
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
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?
 
Old 07-23-2014, 08:20 PM   #8
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
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.
 
1 members found this post helpful.
Old 07-23-2014, 08:35 PM   #9
Jimz0r
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Sweet. Thanks heaps.

Put my mind at ease before I go on my rescue mission this weekend
 
Old 07-23-2014, 09:27 PM   #10
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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.
 
Old 07-23-2014, 09:37 PM   #11
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
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.
 
Old 07-23-2014, 09:48 PM   #12
Jimz0r
LQ Newbie
 
Registered: Jan 2011
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rknichols View Post
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 View Post
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.
 
  


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
Moving LVM from disk2 t o disk1 DragonFly2 Linux - Server 14 04-11-2011 02:43 PM
Moving LVM Between Machines... sancho Linux - Server 1 03-01-2008 09:38 AM
Moving linux partition from original hard drive to another, howto??? Fear58 Linux - General 22 02-15-2008 04:26 PM
LVM Moving from one server to another adamski2000 Linux - Server 0 11-15-2007 04:37 PM
Moving a LVM set. Voltar Slackware 4 08-04-2006 04:10 PM

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

All times are GMT -5. The time now is 10:16 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