Re: to lvm or not to lvm?



On Mon, Apr 30, 2007 at 09:30:02PM +0800, Bob wrote:
Stefan Monnier wrote:
crash, given this, what would be really cool would be to partition the
system at install time using a slightly mean, but granular, best guess
layout [0] so things should fit in their partitions without too much
wasted
space, then configure each partition as one mount point on one logical
volume consisting of one physical volume [1] and then partition up the
rest
of the drive in 1GB chunks that sit in a pool of unused logical
volumes so
they can be assigned to any mount point when needed,
preferably automatically.


Huh? Why on earth use physical partitions for that?
LVM is a perfect fit for such a situation.

Put your whole disk as a single LVM physical volume.
Carve it into the few partitions you need (with little space left on
each)
and leave the rest of the space unused in your volume group.

You can then later on grow any partition that needs to with a simple
lvextend&resize2fs. That part can also be done with a 1GB granularity
if
you want.

Ah, didn't know that, I'll have to tinker with LVM again, it's been a
while. How easy would it be to automate the process of adding space to a
partition when it's nearly full, and how easy is it to reclaim it when
you've cleared the logs or whatever?

Why are you after this complexity of automatically growing partitions?
disk space is cheap. recovering from problematic fs resizes is NOT. I
understand the idea of tuning your partition sizes so that you can
have the optimal size and this is very doable with LVM, but if you've
got portions of your directory tree that might grow really big, then
just give them the space and be done with it. It you later determine
that you don't need it all, you can adjust then with LVM with relative
ease.

And if your logs are getting so big, then you need to look into other
solutions: do you really need all the stuff you are logging; are you
using logrotate; is there some problem that is spewing out errors into
your logs etc etc etc.

that said, you may of course do whatever you like to your system. And
the idea sounds cool on the face of it. I just think you're asking for
trouble and unneeded complexity.

.02

A

Attachment: signature.asc
Description: Digital signature



Relevant Pages

  • When LVM Goes Bad
    ... I believe LVM is the default on Fedora partitioning now, at least I didn't love it that much that I would have selected it, and it is on all my boxes now. ... However LVM makes less sense on, say, a laptop which has and will only ever have a single 2.5" HDD for storage that is permanently available with the laptop. ... The resulting symptom was that the partition contents were no longer recognized as containing a logical volume or a volume group, nor pvscan, although pvdisplay could see it was a physical volume if pointed directly at the partition. ... Whether this explained the loss of LVMness or a subsequent logical brain damage that happened elsewhere did it I don't know. ...
    (Fedora)
  • Re: Hosed Grub with the push of a button
    ... occupies part of the LVM. ... I don't think the developers of the program counted on some crazy button changing the partition table with one touch. ... Did it write over that portion of the disk or did it actually format the portion and place information from some storage chip on the mother board. ... My guess would be that the motherboard has a chip inside that has a compressed image of what was originally installed on the computer, like what a install CD would have. ...
    (Fedora)
  • Re: What are the advantages of LVM?
    ... If you want to learn more about LVM these two web sites can get you ... PartitionMagic or whatever) to split the disk up into partitions. ... or from another partition and run cfdisk or fdisk to set the ... Unfortunately, once I did partition the hard disk, I forgot to mark / as ...
    (Ubuntu)
  • RE: lvm on RH8 _ SOLVED_
    ... Apparently, the lvm module wasn't getting initialised at boot, so I ... Using fdisk, change the partition usage to 0x8e (free space, logical ... Next the filesystem needs to be created in the logical volumes. ...
    (RedHat)
  • Re: USB memory keys -- the plot thickens
    ... and that those all require a hard-disk type partition of some ... Partitioning a USB memory key works only if LVM sees the correct ... in the Drives folder, and no drive F: would appear in LVM's logical view. ...
    (comp.os.os2.bugs)