LinHES Forums http://forums.linhes.org/ |
|
Breaking up an LVM http://forums.linhes.org/viewtopic.php?f=5&t=17919 |
Page 1 of 1 |
Author: | ed3120 [ Tue Feb 19, 2008 10:38 am ] |
Post subject: | Breaking up an LVM |
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. |
Author: | slowtolearn [ Tue Feb 19, 2008 10:53 am ] |
Post subject: | Re: Breaking up an LVM |
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! ![]() 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. |
Author: | ed3120 [ Wed Feb 20, 2008 7:40 am ] |
Post subject: | |
I'm trying to backup my files now, but for some reason it won't let me copy the files in /myth/backup |
Author: | tjc [ Wed Feb 20, 2008 7:57 am ] |
Post subject: | |
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... |
Author: | ed3120 [ Wed Feb 20, 2008 8:18 am ] |
Post subject: | |
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? |
Author: | tjc [ Wed Feb 20, 2008 7:17 pm ] |
Post subject: | |
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 |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |