View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 6 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Breaking up an LVM
PostPosted: Tue Feb 19, 2008 10:38 am 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
I have a 2 drive LVM that I'd like to split it back into two separate volumes.

I built my Knoppmyth box with one physical 250GB drive. I then added another physical 250GB drive to the mix via the standard Knoppmyth LVM procedures. I don’t need the extra space anymore and I’d like to remove the LVM and the second drive and go back to the original one drive setup. (So I can put the second drive into another machine.)

I know I obviously need to clear out enough space to get the usage of the combined LVM volume to be less than the smaller of the two original volumes. After doing that, what are the commands to get rid of the LVM? I’m a little afraid I’ll screw something up and lose all of my files if I attempt this.

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject: Re: Breaking up an LVM
PostPosted: Tue Feb 19, 2008 10:53 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
ed3120 wrote:
I have a 2 drive LVM that I'd like to split it back into two separate volumes.
Not done it myself, but http://tldp.org/HOWTO/LVM-HOWTO/commontask.html gives you the rundown.

ed3120 wrote:
I’m a little afraid I’ll screw something up and lose all of my files if I attempt this.
I would be too! :wink:

Start here http://tldp.org/HOWTO/LVM-HOWTO/migrateoffpv.html which points to http://tldp.org/HOWTO/LVM-HOWTO/removeadisk.html

If I were you I would add an additional drive to the system, mounted to some temporary directory (NOT within the VG) and copy over the files you want to keep. If the VG removal goes belly-up you still have your files.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 20, 2008 7:40 am 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
I'm trying to backup my files now, but for some reason it won't let me copy the files in /myth/backup

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 20, 2008 7:57 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Are you doing it as root? Those files are private to root to avoid having people access other read only files via the backup. However you should be copying everything on the disk as root, and in such a way as to preserve ownerships and permissions...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 20, 2008 8:18 am 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
Yeah, I've been doing it as root which is what is confusing me.

Anyway, based on some reading I assume I need to run:
Code:
pvmove -v /dev/hdXX

to move the data from the second drive (the one being removed) to the other drive.

Then I assume I should run:
Code:
vgreduce lvm_name /dev/hdXX

to pull the second physical drive out of the LVM. I can then remove it from my system.

I would then be left with an LVM with a single physical drive. How do I convert that into just a regular old volume and get rid of the LVM?

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 20, 2008 7:17 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Sorry, I've never done this myself, so all I can do is suggest the wiki page: http://www.knoppmythwiki.org/index.php?page=BreakingUpLvmHowTo


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu