[linux-lvm] N00b Question: Logical Volume without a Logical Volume Group ?

James Hawtin oolon at ankh.org
Wed Nov 2 10:18:50 UTC 2011


Dan White wrote:
> Is a logical volume group necessary before one can start making mountable partitions ?
>
> I'm trying to work with a SAN.  We were allocated a 10Gb LUN to "play" with. Another admin created a logical volume on the LUN and then made a single partition out of the logical volume.  The flow I am familiar with from Red Hat's GUI is to first make a logical volume group, then make partitions in the group that I can adjust in size as necessary.
>
> Are both workflows valid ?
>
>   

It would have been possible to just build a filesystem directly on the 
disk, to do a single partition with all the space, I would never do the 
first thing as it is possible for other sysadmins easily make the 
mistake of thinking the disk was blank, (particularly if it is not 
mounted all the time). The second one is fine however the problem is if 
you ever with to change to size of the partition, it is possible but it 
is hard work.

Personally even with LVM I would still write a partition table the disk, 
this helps show the disk as being used to other system administrators, 
however there would be one partition on it of type 8e, and on that I 
would create a PV (physical volume), this PV can then be used to create 
a VG (Volume group) or be added to an exisiting one, when i create VGs I 
normally use an ext size of arround 128m->256m to keep down the number 
of disk fragments managed by the kernel. From that VG I can create an LV 
(Logical Volume) Personally I would never allocate the whole space in a 
volume group to an LV, even the volume group was just being used to join 
disks together to make one huge filesystem, I try to keep by 5% of the 
disk space this will allow the use of snapshots which are create for 
keeping things consistent when backups are done.

As other posters have said, LVM always making changes to disk space much 
easier, try the following with a partion table along...

Shrink 10g filesystem to 2g
Create another 2g filesystem
Expand first filesystem back to 8g
And another 10g peice of disk and add the space to the first filesystem.

James




More information about the linux-lvm mailing list