Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am installing a server on a KVM-virtualized cloud server.
I only have a handful of websites and things being hosted on it, and won't need too much out of my disks. I'll probably be using two drives, one for O/S and one for user data. I don't expect in the short term that I will need to change or re-size them once I make my initial decisions.
BUT, in the long term, there is a chance the server could get more heavy use and the storage needs could change. From what I understand, that's where LVM fits in, allowing for easy re-sizing and changes on the fly.
Right now my feeling is if it comes to that, I wouldn't mind installing LVM at that time instead of now (if I had to temporarily move my data and mounts at that time, add a third drive and put LVM on top, I don't think that'd be too much of a problem).
--- Main Question---
Am I correct to assume LVM incurs at least a small performance hit? Keep in mind, I'm already taking a disk performance hit by being in a virtualized environment (actually, I wonder, are my "drives" likely to already be LVM volumes, so I'd be doing LVM on LVM?).
I'm also considering that I may use the encryption option that my provider uses for my drives, so that may be yet another performance hit to add up, so you can see, if LVM is even a small hit, it might be good to avoid unless I really need it.
If my short-to-medium term projections that I won't need to do any dynamic resizing, is there any reason at all that I'd want to use LVM?
Does it offer me any other benefits? (I already get "snapshot" capability of my drives from my cloud provider, so that one's already taken care of)
LVM gives you the flexibility to manage the file system, I finally got an understanding of it after a Red Hat week long course a few years ago.
I am not sure of the performance hit if any, as you can adjust the extent sizes for better performance. I use the defaults as I use other mount options like 'noatime' and such to help control endless file accessing email/web servers.
In a SAN environment LVM would really need to be mandatory, since it would give you the file system flexibility and you can create larger volumes and use (thin-provisioning) to over subscribe your LUNs.
I would not worry about LVM on LVM as you are getting flexibility of your file system. I always use a separate /, /home, /tmp, /var and /opt (on email servers) and /swap. All within the LVM itself, it is easier to manage and make more sense longterm.
As far as fdisk I still use it, I had to expand the file systems on Oracle Unbreakable servers. I carved out the storage out of the fiber channel san, assigned it to the correct servers. Ran fdisk -l discovered the storage, formatted it, and expanded the physical volumes can't remember which ones it was.
There is another command called diskpart I have used it a little but mostly fdisk it is up to the end user.
Last edited by rhbegin; 02-06-2012 at 08:08 PM.
Reason: added doc link
@rhbegin I agree that LVM is versatile in more complex environments (sounds like your answer has that in mind). However, I'm only working with a server instance hosted at a cloud provider that, if it does grow, still won't grow into anything too complex. Again, I value your answer a lot, but I'm getting the feeling that LVM is more than I need in a simple environment.
(but YES! definitely noatime on the web and email mounts!)
IIRC, relatime updates the atime on files only if the current atime is older than the last mtime. This allows certain applications that rely on the atime attribute to still work yet still eliminates the same performance loss (unless something is constantly modifying your files).
I think a quick google should verify this. I think newer versions of Debian might even default to relatime on its mounts.
There's good information about relatime vs. noatime here and more detail in the pages linked from that page. Nothing new and I don't use the softwares that need atime so I'll continue with noatime.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.