Installing a server based on LVM on Centos 5.4
This new generation gets over all what I’ve expected. When I was gonna resize a partition I used to do this task either partition magic for Windows or resize2fs for Linux ext3 file systems and sometimes it was resized for breakfast, don’t misunderstood me, but it’s not definitely the most safe way to resize partitions. I know there are many ways to implement it, but for now I’m running for LVM :P
Today there are many tools available to resize a partition, however when we’re talking about a critical server in output which it has incorporated raid and unstoppable services, we need to design better how the information will be stored as well as implementing a file system more dynamic.
Here are the steps for installing a server based on LVM.
Let’s get started.
Throughout this installation process I suppose that you know installing a Linux from scratch.
1- As you can see at this picture, we’ve got a scene where shows 2 disks. the first one 30 GB and de second one 20GB.
2- First of all we should create a bootable partition out of the LVM group. Let’s do it now. the partition /boot must be created on the disk one.
3- Now, select the partition FREE at the disk one and let’s set a physical volume LVM. Do that typing “New”. The proprieties “Allowables Drivers” must be changed to what appears on the picture. The “disk two” has to be unselected leaving just the disk one selected. Fill to maximun allowable size has to be selected as well as Force to be a primary partition must be checked.
4- After that, select the partition FREE at the disk two and let’s set a physical volume LVM. Do that typing “New”. The proprieties “Allowables Drivers” must be changed to what appears on the picture. The “disk one” has to be unselected leaving just the disk two selected. Fill to maximun allowable size has to be selected as well as Force to be a primary partition must be checked.
5- Once the partitions are created as physical volume LVM, it’s time to create the Volume Group where the partitions created into this group will act over LVM. Select the first physical volume LVM created and click on LVM Button (It’s is located on the right side).
A new screen will open and you have to select on “Physical Volume to use” all physical volumes were created. On this example have been created 2 physical volumes LVM, so select these two ones. Notice that TOTAL SPACE will be increased by 2 disks.
6- There must be something missing here…. Whoa!! Of course. Let’s create the partitions. here you are a schema: swap , / , /home, /db: both of these with ((RAM Memory amount * 2) below 2GB or (RAM Memory amount + 2 GB) above 2GBs) must be set for swap, 15 GB for / , 10 GB for /home and 2,5 GB for /db. That’s just illustration, you can create whatever you want.
8- Next picture’s gonna illustrate how the partition’s schema is like.
9- So, I disabled firewall and SELinux and on top of all that I also installed (Administration Tools – System Tools – X Window System)
10 – Open a xterm and type: system-config-lvm. it will appear something like this: As you can see, We find the volume group in two views – Logical and physical. There’s another session called Unitialized Entities with is useful to store the partitions which aren’t LVM.
11 – If we expland VolGroup00 Logical View, we can be able to see partitions created by us at the installation time. As you can see, it’s a / partition and you can find out more details on the right frame.
12 -Here is a main logical volume view. Actually you can see that available space free is zero, until we shrinking some partition and you get this such available space destinated to resize other partitions.
13 -Okay, now I’m gonna add another hard disk at the server. It’s about time C’mon. I put a hard disk of 40 GB. Let’s expand the session Uninitialized Entities. We can see hdd included without entity. Be gentle and click on Initialize Entity. Hold on a couple of seconds and …. here you are! go to 14th step.
14 – Once Initialized, the disk needs to be integrated to VolGroup00 LVM. Click on Add to existing Volume Group. Then select VolGroup00 and click on Add.
16 – Now, there are 12.78 remainding. Let’s fill this gap and put all this rest to /home
17- Checking out what turned out about this experience.
Bye bye folks.. see ya! :O
eeeeee gran tutorial las fotos me suenan jajjajajaja!!!