Re: What are the advantages of LVM?



If you want to learn more about LVM these two web sites can get you
pointed in the right direction:

http://www.tldp.org/HOWTO/LVM-HOWTO/index.html
http://sourceware.org/lvm2/

I am using LVM2 on one of my machines. I recently described it to a
friend as a next generation way of either partitioning or dealing with
multiple disks. The old way was that you used cfdisk or fdisk (or
PartitionMagic or whatever) to split the disk up into partitions. I
did that ages ago when I did a fresh install, creating /, /usr/, /home
on 3 different partitions, along with another one for windows and yet
another for another linux distribution. But then what happens a few
months later when I realise that /home is WAY too small? Furthermore,
since I don't really use the windows partition, I find out it has a
lot more empty space than it needs. Same story with /. This is one of
the benefits of LVM. With LVM you can dynamically resize partitions.

But for me, it is most useful for it's other use. I have a debian
machine I use as a media center (watching videos through the TV,
listening to music, backing up media files, etc). I had all the media
files on a 200GB hard drive, partitioned into two parts - Music, and
Video. There WAS a good reason for this originally which I won't get
into, but I later decided that it would be better on the same disk.
But by then I had bought a second 200 GB disk. The 'old way' would
involve having all the media files spread over two disks. With LVM I
made both disks into one big 400 GB volume which looks and acts like a
single disk. This is what a lot of people in the mythtv community use
LVM for. When I get another hard drive I can simply extend that volume
to cover 3 big drives... and so on. One caveat - you might want to set
the disks up as a RAID to prevent losing all the data in the future.

I think your problems are that you don't understand what is going on
with LVM. It does NOT create partitions. You can think of it that way
if it helps but they are not partitions and you can't deal with them
in the old way that you did with parttions. Instead you deal with a
volume group (VG), physical volume (PV), logical volume (LV), physical
extent (PE), and logical extent (LE). Read the howto above.

Yes, you can set the bootable flag after the fact. Just boot up from a
live CD, or from another partition and run cfdisk or fdisk to set the
flag on the appropriate partition.

Craig

On 5/21/06, David M <lists2006@xxxxxxxxxxxxxxxxxx> wrote:
A friend very kindly gave me his old computer which had been sitting around
gathering dust for a few years, and so I decided to install Ubuntu on it.

Out of curiosity, I decided to (attempt to) format the hard disk using
LVM, but I found the whole experience very confusing, and I'm afraid
I'm not sure if I could see the point in it..? (using Dapper Beta release)

The LVM setup decided to set up a volume group for /, and another one
for swap, each of which contained a partition for / and swap
respectively. This was followed by stern warnings about how these were
permanent group settings which could not then ever be changed.

So, I decided to try to split / into / and /home, but found I was unable
to do this: I couldn't resize the / partition (which is what I thought
was the point of LVM?), so I'm a bit perplexed as to what I would
actually have gained with LVM: I thought it was supposed to allow more
flexibility in resizing partitions?

After some tussling with the disk partitioner, I finally managed to
eradicate all traces of LVM (it seems a bit hard to remove once the disk
has any sign of it ever having been there) and just partitioned the disk
normally. (This is not really a major issue as I was just trying to
experiment, but I'm curious as to how I should use LVM properly, and
what I would gain from doing so).


Unfortunately, once I did partition the hard disk, I forgot to mark / as
bootable, and so I can't boot from the hard disk directly. Luckily the
install CD's "Boot from hard disk" option rescues me from this mistake. :-)
Is it possible to now subsequently set the bootable flag on the /
partition without having to reinstall the system or trash the existing
partition?


Thanks for any advice,


David.



--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • 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: to lvm or not to lvm?
    ... have the optimal size and this is very doable with LVM, ... cabinet, storage cabinet(s with drawers full of disk), Multi-path SAN ... A typo in a script can do more harm in 20 ... As long as it's not possible for a growing partition to take space away ...
    (Debian-User)
  • Re: undo LVM
    ... vgreduce command will do on my disk. ... As my main problem is the LVM and not the encryption, ... normally use this encrypted partition again. ...
    (Ubuntu)
  • Re: Partitioning a 100gb hard drive as 2 separate drives
    ... I need to split the hard disk for a C and a D ... One for Windows XP, ... load the XP disk and I get to the partition screen, ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: Booting - Enterprise Volume Management System
    ... blocksize of your filesystem and calculate the new size based on those units. ... physical disk partition. ... You manipulate a virtual partition and don't ... Software raid will always be slower than LVM ...
    (Ubuntu)