Showing results for 
Search instead for 
Did you mean: 

Question about LVM setup

Go to solution
Occasional Visitor

Question about LVM setup

Hello, I have a question about the LVM setup in Linux.

I have 1 iscsi lun attached to my server, which I want to resize next year. Now I can create a volume group on this lun, so I can resize later.
But ....

Should I create a partition on this lun ? I have seen configurations that have one (type 83) partition, or a (8e Linux LVM) ?
But I have also seen configurations which has NO partition, but the volume group is working.

Can anyone explain me this ?

Thank you ... greetings ...
Esteemed Contributor

Re: Question about LVM setup

Hi Richard,

partition or not is mostly a cosmetic thing.

LVM works with both partitions and "whole disks".

I personally prefer ( on linux ) 8e "Linux LVM" partitions. Without partition you get a warning on every boot ( and partprobe ) that there is no valid partition table on the disk. Second its clear that the disk is in use and not free. This is a point in mixed environments with servers configured with LVM and some without and a team of more admins.

Steven E. Protter
Exalted Contributor

Re: Question about LVM setup


If you are planning on expanding the LUN and you don't need the space now, you should set up the disk as 8e LVM

That will enable you to expand it later

pvcreate the disk

Then vgextend a volume group onto it or vgcreate a new volume group on the disk.

Steven E Protter
Owner of ISN Corporation
Richard Smits
Occasional Visitor

Re: Question about LVM setup

Ah ok, clear, but ...
I have read that resizing plain ext3 partitions is also possible with the newer linux versions ?
We use RHEL5 and there is a resise2fs command now ?

So because my lun is only one disk, it is not nesscesary to create a lvm setup ?

Greetings ...
Valued Contributor

Re: Question about LVM setup

Hi Richard,

What is the LVM (8e)version in your server.

As of my experience it is very easy to extend VG & LV online with out much difficulty in Linux .

I Think you only wanted to resize the LUN ( No VG) in future as the SCSI lun is having enough size.

You can extend the lvsize by the command lvextend and can resize the FS size by ext2online command.

Thanks and Regards,
Manoj K
Thanks and Regards,
Manoj K
John McNulty_2
Frequent Advisor

Re: Question about LVM setup

Hi Richard.

Yes there is a resize2fs for ext3 on RHEL5 now. ext2online I believe is depreciated and doesn't exist on RHEL5 any more.

Growing an ext3 filesystem online after extending the LV its on works fine. Have done it a number of times.

And my vote goes with adding a partition for the entire disk, for the reasons mentioned above.


Occasional Visitor

Re: Question about LVM setup


Because it is one lun, and it will stay one lun, I will not make a lvm setup. I will create a standard type 83 partition, with a ext3 filesystem.

If I expand the lun, I can delete/create the partition, and keep the data.
With resize2fs I can resize the filesystem.

LVM is not nescesary here I think, but is also possible.

Right ?
Greetings....and thank you all for the hints/tips.