LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to separate single LVM partition "/" ? (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-separate-single-lvm-partition-887892/)

DarkSlayer 06-23-2011 05:12 AM

How to separate single LVM partition "/" ?
 
Hi there.
I have installed my server running centos 5.6 on single LVM partiton

scheme is luke this:
/boot - ext3
Volume Group
- System LV - /
- Swap LV - swap

how can i separate devide root partition on several partition for separate directories like

Volume Group
- System - /
- Home - /home
- Var - /var
- Swap - swap

Is there any chance to do this ?
also is there are basic recomendations for server partition sizes ? i will have mail server and virtual host there in /home vmail and vhost
is it ok: 10gb - /; 20gb - /var; 200gb - /home ?

of course after doing separate LVM partitions i can expand them in future, but what are basics ?

nooneknowme 06-23-2011 06:17 AM

You can use the lvreduce command. But using it in / can be risky. If it's a new server, why not reinstall the OS and create partitions at install time as you want it to.

The size of the partitions depends on your requirements. No one other than you can analyze that.

DarkSlayer 06-23-2011 07:01 AM

Thanks for ur response.
I got whole idea about resizing and moving with LVM after reading several article found through google.
I don't want to reinstall whole OS, it's to easy.
Such situations are good to learn some specific tools and tricks, LVM usage in this case.


Quote:

Originally Posted by nooneknowme (Post 4393583)
You can use the lvreduce command. But using it in / can be risky. If it's a new server, why not reinstall the OS and create partitions at install time as you want it to.

The size of the partitions depends on your requirements. No one other than you can analyze that.


syg00 06-23-2011 07:19 AM

Conceptually, LVM doesn't matter at all. Create new lv's for whatever you want to split out. Add pv's in need - this is one advantage of LVM.
To actually move the data is no different to a non-LVM environment. Probably best done from a rescue/liveCD setup for safety.
LVM does offer an advantage if you do have to shrink the lv to create room for the new lv's.
tlpd.org has a good LVM how-to.

As for size(s) - who knows; check your current allocation and add some "fudge factor" - say 30-50%.


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