Operating System - Linux
1753855 Members
7252 Online
108808 Solutions
New Discussion юеВ

Re: Question about LVM setup

 
SOLVED
Go to solution
Richard_Smits_1074
New Member

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 ...
6 REPLIES 6
Hemmetter
Esteemed Contributor
Solution

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.

rgds
HGH
Steven E. Protter
Exalted Contributor

Re: Question about LVM setup

Shalom,

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.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Richard Smits
New Member

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 ...
ManojK_1
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.

John

Richard_Smits_1074
New Member

Re: Question about LVM setup

Ok,

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.