Moving a disk and it's data from one LVM to another

Associate
Joined
19 Jun 2003
Posts
1,680
Location
West Yorks, UK
Hi all,
I am trying to simplify my storage on a Ubuntu 7.04 server that I run. It currently has 2 x 500GB SATA drives in a RAID-1, setup as an LVM (called "user_data"). I've also got 2 x 300GB SATA drives in a RAID-1, which I have split in half, and started to build up a new LVM from (called "users"). Therefore, there is now a 600GB LVM, with 300GB free space.

What I want to do, is move one of the 500GB disks into the new LVM, but without trashing the data, and having to re-copy it. Is this possible? I know it would be easier to use fresh disks and re-copy the data, but that isn't possible in the situation.

Cheers,
Matt
 
tar -cjvf all the contents from 600GB to 300GB LVM, if it's mostly docs, spreadsheets and office stuff it should easily cram into half the size, once finished, wipe 600GB LVM, downsize it to 1x 500GB drive, copy tar.bz2 for safe keeping onto that single 500Gb and try expanding the 300Gb one, if it fails, you still have zipped data on the other LVM, if it goes ok, just tar -xjvf it and off you go...
 
Sounds like a plan. Not sure why I didn't think of compressing it all :S Silly me. I guess I just assumed there would be some command that would move the complete LVM and merge it in with the new one.

Matt
 
feenster99 said:
What I want to do, is move one of the 500GB disks into the new LVM

so to break the raid-1?
pull it out of raid config, pvcreate it, vgextend it into the VG you want to put it into, lvextend/resize the filesystem if needed, copy the data from the (degraded raid-1)?

feenster99 said:
but without trashing the data, and having to re-copy it. Is this possible
It's not possible if they're on seperate filesystems, but that's the whole point anyway, isn't it?
 
Back
Top Bottom