Operating System - Linux
1748227 Members
4473 Online
108759 Solutions
New Discussion юеВ

Re: tradition partition or LVM ?

 
Tung_1
Advisor

tradition partition or LVM ?

Hi everybody, which kind of configuration i should choice when install Red Hat ES 5.x ? and why ?

Thanks.
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: tradition partition or LVM ?

Shalom,

The answer is it depends.

I just attended a performance class (In November) that said to not put swap in LVM. I've been doing that for years.

What you do, and how you do it completely depends on your application needs and what kind of storage you have available.

Here is a layout of a typical system, 20 GB boot disk 200 GB of storage and a smb mount to a Samba network/NAS device for shared storage.

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg00-lvol1
2.0G 427M 1.5G 23% /
/dev/mapper/vg00-lvol3
7.8G 2.6G 4.9G 35% /usr
/dev/mapper/vg00-lvol4
7.7G 301M 7.0G 5% /var
/dev/mapper/vg01-lvol0
184G 71G 105G 41% /share
/dev/hda1 99M 32M 63M 34% /boot
tmpfs 180M 0 180M 0% /dev/shm
//10.0.0.10/web 465G 364G 102G 79% /web

It works for me, leaves enough software update space laying around plus a generous /var partition for variable data.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: tradition partition or LVM ?

LVM gives you a lot of advantages, like volume resizing and snapshots. I use LVM always. In fact, there is no option on other Unix OS like AIX.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: tradition partition or LVM ?

If the question is whether or not to use LVM, the answer is an unqualified yes.

LVM has saved me a great deal of OS reinstall time due to the ability to completely reconfigure storage while the system is running.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven McCoy
Valued Contributor

Re: tradition partition or LVM ?

I would agree. Being able to resize a filesystem without even unmounting it (with lvextend/resize2fs) is extremely useful for production machines.

Steven, that's interesting about swap within LVM having possible performance problems. Did they mention how much noticeable performance degradation there might be? Perhaps I should update my server deployments to keep swap out of LVM.
Victor Semaska_3
Esteemed Contributor

Re: tradition partition or LVM ?

I'm curous about the swap in LVM as well. I would think that I/O activity on swap would have to be so high for it being in LVM to show a noticable performance difference. But at that point a shortage of memory would be the real issue.
There are 10 kinds of people, one that understands binary and one that doesn't.
Nuwan Alwis
Valued Contributor

Re: tradition partition or LVM ?

Hi Tung,
I dont have much to answer coz other gurus have given u sufficient info regarding this topic.
Adding few more....
LVMs primary purpose is enable flexible disk space management mechanism.
so if you think your servers space requirement will grow in the future and also u want to keep your mount points unchanged LVM is the option.
LVM allows u to expand your file system space on the fly but reducing is not recommended on the fly.
Also it is a best practice to keep /boot & swap out of LVMs.
Yes LVM adds some over head to the file system but it can be ignored when u compare the advantages u gain from it.

Good Luck...!

Technology is there to use so use it when ever u can apply.