Operating System - HP-UX
1833758 Members
2272 Online
110063 Solutions
New Discussion

Should I use LVM or single disk?

 
SOLVED
Go to solution
Mike Prozinski
Occasional Contributor

Should I use LVM or single disk?

I'm currently in the process of replacing the existing 4GB hard disk on a bunch of machines with an 18GB disk.

The old disks used LVM and had 1 volume group, and several logical volumes. I'm wondering if I should set up the new disks with LVM, or just use the entire disk for the / partition.

Part of the reason for the upgrade is some poor choices that were made in the logical volume sizing. I'm thinking it might be wise to avoid this and just use the whole disk for root partition, (minus swap space of course).

I'm wondering what other peoples opinions are to the advantages/disadvantages of using/not using LVM.

My thoughts are that there is most likely never going to be more than 1 disk on these systems, so why use LVM?
18 REPLIES 18
Craig Rants
Honored Contributor

Re: Should I use LVM or single disk?

Mike,
Go with LVM. With 18GB you should be ok as far as space goes. I would recommend getting OnlineJFS, that will vastly improve you view on using LVM over a single / partition.

Just my thoughts.

C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Carlos Fernandez Riera
Honored Contributor

Re: Should I use LVM or single disk?

LVM provides a flexiblity that whole disk dont.

Do you know what will happen tomorrow?
unsupported
Uday_S_Ankolekar
Honored Contributor

Re: Should I use LVM or single disk?

Hi,

You can use entire disk for root VG but make sure that you have to have a mirror disk to root.
Also have a latest copy of your make_recovery tape handy always.

Goodluck
-USA...
Good Luck..
James R. Ferguson
Acclaimed Contributor

Re: Should I use LVM or single disk?

Hi Mike:

I'd definitely choose LVM. Your requirements may change down-the-road, and then you can grow your logical volume size and/or add more physical volumes to the volume group. One thing that comes to mind immediately is that with LVM you could add mirroring later if you wanted high-availability.

Regards!

...JRF...
Vincent Farrugia
Honored Contributor

Re: Should I use LVM or single disk?

Hello,

You should always go for LVM. Regarding poor lv sizing, you can always increase/decrease them using LVM commands lvextend/lvreduce.

HTH,
Vince
Tape Drives RULE!!!
Patrick Wallek
Honored Contributor

Re: Should I use LVM or single disk?

By all means, use LVM for the disk layout. While some poor choices for the LV layout on a 4GB disk could cause problems, you will have more flexibility with LVM with the 18GB disk.

Consider what would happen is you use whole disk for your / partition and then need more space in /opt, /var, or /usr for some reason. How you going to expand it?

With LVM size your partitions the sizes you think you'll need, just make sure that / and /stand are sized maybe just a bit larger than you think you need. Don't give out the whole 18GB to LVs right away. There is no need for that. You should have some space left on the disk that you can allocate on an emergency basis. That's the beauty of LVM, especially if you have the optional Online/JFS product. You can add space on the fly with no downtime.

You don't have the flexibility with whole disk.
To be honest, I'm not sure whole disk is even an option when you install the OS. It may be, I've never tried it.
Deshpande Prashant
Honored Contributor

Re: Should I use LVM or single disk?

Hello.
Certainly the LVM way.
Use optional ($$) Online JFS to change/resize the logical volumes on-fly, without any down time.

Thanks.
Prashant.
Take it as it comes.
S.K. Chan
Honored Contributor

Re: Should I use LVM or single disk?

Using LVM allows flexibility in filesystem management with added administration overhead for LVM maintenance. In our environment we uses LVM with only 2 filesystem configured (/ and /stand), that way we do not have to deal with individual filesyatem like /tmp,/var if they were mounted separately. Using a single disk configuration has it's advantage when it comes to recovery (no LVM to deal with). Using LVM with ONlineJFS is a good idea to get the maximum flexibility.
harry d brown jr
Honored Contributor

Re: Should I use LVM or single disk?

LVM!!!!!

Without LVM, you have little control over a RUN-AWAY program. Let's say you put everything under "/", then some wacko user decides to write a program that goes beserk and starts writing a log file in the /home/ directory, until you run out of disk, which will cause your system to become TOAST. If you create Logical Volumes, like "/", "/tmp", "/var", "/opt", "/home", "/stand", "/usr", and others, then you REDUCE the chances of a ROGUE process from TOASTING your machine.

If you want, tell us your OS (10.20, 11.00, 11.11), the amount of memory, system type, and some application size info, and we'll help you layout the filesystems!!!


live free or die
harry
Live Free or Die
melvyn burnard
Honored Contributor

Re: Should I use LVM or single disk?

Depends which OS you wish to use. From 11.00 on, I do not believe you are able to use the "whole disk" approach, you must use LVM.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Roger Baptiste
Honored Contributor
Solution

Re: Should I use LVM or single disk?



Adding to the LVM chorus ;-)
Go for LVM. Actually, it gives you more flexibility!
Except for /stand and / filesystems , you can change any of the other filesystem sizes (increasing) in a jiffy.

So, be little liberal in assigning size for /stand and /.
/stand -> 100Mb
/ -> 300MB

HTH
raj
Take it easy.
Santosh Nair_1
Honored Contributor

Re: Should I use LVM or single disk?

Definitely go with LVM. LVM gives you much more flexiblity in managing your filesystems. While its true you can give the whole disk to one big filesystem, you'd be severely restricted once the filesystem starts filling up. Just my 2 cents.

-Santosh
Life is what's happening while you're busy making other plans
Bill McNAMARA_1
Honored Contributor

Re: Should I use LVM or single disk?

well LVM pretty mich sucks in terms of the io perf hit you're going to get when comparing to fixed disk.

Not only that but there is a significant memory impact.

If your server sucks in terms of performance consider changing, although by default go with LVM for ease of administration.

Later,
Bill
It works for me (tm)
Timothy Czarnik
Esteemed Contributor

Re: Should I use LVM or single disk?

Mike,

LVM! If for no other reason then one runaway process can't fill up your root disk and crash the system.

Imagine, giving anyone with write permission ANYWHERE the ability to crash the system because of a poorly written script.

-Tim
Hey! Who turned out the lights!
Darrell Allen
Honored Contributor

Re: Should I use LVM or single disk?

Well, partitions have been around longer than I have. There must be a good reason for having multiple partitions instead of just one or surely every UNIX box around would have just one big root filesystem.

LVM is simply much more flexible than whole disk.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Krishna Prasad
Trusted Contributor

Re: Should I use LVM or single disk?

Even more than that is that if you use a whole disk you will have to make it a HFS filesystem not vxfs because the boot loader requires it. That's way /stand is hfs and of course the kernel is in /stand/system. So if you use a whole disk instead of LVM you can't use JFS or vxfs. Not to mention that you want be able to mirror the disk in case of a crash.
Positive Results requires Positive Thinking
Frank Slootweg
Honored Contributor

Re: Should I use LVM or single disk?

Bill wrote:

> well LVM pretty mich sucks in terms of the io perf hit you're going to get when comparing to fixed disk.

I am sorry to disagree, but as far as I know that is an urban legend, at least for apples to apples comparisons (i.e. comparing the same system with the same disks with the same disk layout with the same filesystem layout with the same application, etc., you get the drift).

If I remember correctly, actual controlled tests have shown a worst case of an about 5% degredation.

> Not only that but there is a significant memory impact.

True. Just generate a kernel with and without LVM to see if the impact is high for your particular system.

Jim Turner
HPE Pro

Re: Should I use LVM or single disk?

Mike,

Always use LVM. Online JFS and some good know-how will solve your "poor choices" problem.

Also . . .
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x316efd3f91d3d5118ff40090279cd0f9,00.html

Cheers,
Jim