LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-21-2013, 04:02 PM   #1
Welchomatic
LQ Newbie
 
Registered: Jun 2013
Posts: 2

Rep: Reputation: Disabled
LVM - 3 drives now, want to move to one single drive


I'm not sure if NEWBIE is the correct place for this question, but am posting it here because this is the first (and hopefully only) time I'll need to do this:

I've got what I'll call a server with 3TB of storage, which is almost full. I have been using LVM, and about two years ago I added a 1TB physical drive to a 500GB and a 1.5TB drive. I also have a RAMdrive for constantly changing data (images on a webcam) which I construct on startup. And the boot partition. So, in summary, here's the DF results:

/dev/mapper/VolGroup00-LogVol00 1921069984 1624088880 199419164 90% /
/dev/sda1 194442 121872 72570 63% /boot
tmpfs 1807604 0 1807604 0% /dev/shm
/dev/ram0 15863 159 15704 2% /media/ramdisk

The drives are a few years old, so I'd like to retire them. I have bought a 4TB drive and want to transfer the boot and LVM partitions over to the single drive, and store the three old drives as a backup. I see plenty of instruction on how to ADD another Physical drive to LVM, but not anything on how to CONSOLIDATE several physical drives/one logical drive into one physical drive.
How is this done? I realize the boot partition makes it more complicated.
 
Old 06-21-2013, 04:14 PM   #2
cbtshare
Member
 
Registered: Jul 2009
Posts: 610

Rep: Reputation: 42
Well the boot partition cant go on the LVM so you'd have to come up with another arrangement and then decide what your gonna do then we can help.
 
Old 06-21-2013, 04:28 PM   #3
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,404

Rep: Reputation: Disabled
LVM is great in that it allows you to manipulate volume groups by adding and removing physical volumes while there are active logical volumes in the group.

If the LVM setup was all you needed to migrate, you could:
  • partition your new disk
  • make that partition into an LVM physical volume with pvcreate
  • add the volume to your existing volume group (VolGroup00) with vgextend
  • remove the existing volumes from the same group with vgreduce (this would take some time, as LVM would need to migrate the volume group data from the old PVs to the new PV)
  • get rid of the old PVs with pvremove
Since you also want to replace the drive with the boot partition (/dev/sda1), that partition will need to be migrated separately.

You should connect the new drive to your system and create two partitions: One to serve as the boot partition (which must be at least as big as the existing boot partition), and one to be your new LVM physical volume. You can then migrate LVM using the procedure outlined above.

Once that is done, you could perhaps boot to a Live CD and migrate the boot partition with dd or something similar. Remember to reinstall the boot loader.

Which distribution are you using?
 
1 members found this post helpful.
Old 06-21-2013, 04:28 PM   #4
Welchomatic
LQ Newbie
 
Registered: Jun 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
I'd like the boot partition reproduced on the 4TB drive alongside the LVM partition which would consume the rest of the physical drive. In simple terms, replace three smaller drives with one very large one.
I'm using Fedora 12.
I'd not considered using Extend and Reduce and then a separate DD using a live CD. That makes so much sense it might just work!

Last edited by Welchomatic; 06-21-2013 at 04:31 PM. Reason: Additional responses - consolidating my answer
 
  


Reply


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
Move to smaller SSD drive with LVM? Katari Linux - General 0 01-23-2013 10:44 PM
Replacing dead drive in an LVM that consisted of 3 drives Bmop Linux - Hardware 5 08-18-2010 06:59 PM
File system corrupted, how to move LVM drives to another machine to recover files? Arodef Linux - Hardware 1 08-07-2009 07:19 PM
Migrating single drive to RAID / LVM? joadoor Linux - Hardware 3 10-14-2005 08:01 AM
using LVM for single hard drive csfalcon Linux - Hardware 2 02-17-2005 12:17 PM


All times are GMT -5. The time now is 12:39 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration