LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to swap one hard drive with another when using LVM? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-swap-one-hard-drive-with-another-when-using-lvm-895462/)

martdj 08-04-2011 02:10 AM

How to swap one hard drive with another when using LVM?
 
As my harddisks are completely full I want to swap a 1,5TB drive with a 2TB drive to give me some breathing space. The 1,5TB is part of a LVM spanned volume. My simple question, how do I move all data from the one drive to the other drive without ruining my spanned volume?

mpapet 08-04-2011 04:49 AM

Quote:

Originally Posted by martdj (Post 4433293)
My simple question, how do I move all data from the one drive to the other drive without ruining my spanned volume?

Add the new drive to the LVM. Make enough space available in the LVM so the old drive's data can be moved. There's a command to move the data off the old drive. Moving the data off might be slow. Then remove the old drive from the LVM.

I don't remember the commands, but that's how you do it.

martdj 08-04-2011 05:08 AM

Thanks. That could be the way to do it. One thing which makes this method less handy is that I don't have any free Sata ports which means I would have to connect the drive using USB so that slows down the stuff considerably. I was hoping for a method where I could just put the 2 drives in a standalone computer and run some cloning program that copies the data from drive 1 to drive 2, but I'm afraid I break my LVM that way.

EDDY1 08-04-2011 05:17 AM

I would think that you should be able to clone the drive
& resize it after testing.


All times are GMT -5. The time now is 01:15 AM.