1828667 Members
1779 Online
109984 Solutions
New Discussion

Using LVM

 
TimDunton
Advisor

Using LVM

Hi,

I'm running Redhat Fedora 2 on a DL360G4. I've run out of space and needed to increase the drives. I know I go increase the disks using HP Smart Array but how do I go about configuring Linux to see the new space. I presume I need to use LVM but how and is there anything I need to look out for?

Thanks

Tim
8 REPLIES 8
Geoff Wild
Honored Contributor

Re: Using LVM

Try:

http://www.tldp.org/HOWTO/LVM-HOWTO/lvm2faq.html

http://fedora.redhat.com/docs/fedora-install-guide-en/fc5/ch-disk-partitioning.html

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: Using LVM

Shalom,

LVM has a great gui for RH/Fedora.

Point and click and all features at the tip of your mosue.

A good way to learn and the commands are very similar to HP-UX where you posted your query.

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
melvyn burnard
Honored Contributor

Re: Using LVM

Thread posted in wrong forum, moved to more appropriate forum
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
TimDunton
Advisor

Re: Using LVM

Thanks guys for such a quick response. I did notice that the Free PE/Size is quite low. Could that be a problem or is that just because the new disks have not be put in yet?

Alloc PE / Size 2165 / 67.66 GB
Free PE / Size 2 / 64.00 MB
TimDunton
Advisor

Re: Using LVM

Any news guys?
Manuel Wolfshant
Trusted Contributor

Re: Using LVM

You should post the output of pvdisplay, vgdisplay and lvdisplay before anyone could give you any more hints. Anyway, you definitely should read the links posted by Geoff. And after understanding the basics, use the GUI suggested by Steven , assuming it is available for your version of Fedora (which is rather old). If it is not available, you should start here: http://www.tldp.org/HOWTO/LVM-HOWTO/commontask.html and here
http://www.tldp.org/HOWTO/LVM-HOWTO/addpvstovg.html

DO NOT extend/reduce partitions (using resize2fs or equivalant tools) without having a backup !
TimDunton
Advisor

Re: Using LVM

Thanks guys, here's the out put. I've not put the new disk in yet but using HP 6i RAID I'm planning to replace both disks with SCSI 140Gb U320s.

--- Physical volume ---
PV Name /dev/cciss/c0d0p2
VG Name VolGroup00
PV Size 67.72 GB / not usable 0
Allocatable yes
PE Size (KByte) 32768
Total PE 2167
Free PE 2
Allocated PE 2165
PV UUID lJB77l-E7xI-WX3I-kZun-eUcO-Ol0r-STeed8

[root@theabcconnection ~]# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 67.72 GB
PE Size 32.00 MB
Total PE 2167
Alloc PE / Size 2165 / 67.66 GB
Free PE / Size 2 / 64.00 MB
VG UUID Rq9HwR-J9fS-AqEe-asTT-bpfV-fp93-HwStyC

[root@theabcconnection ~]# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 67.72 GB
PE Size 32.00 MB
Total PE 2167
Alloc PE / Size 2165 / 67.66 GB
Free PE / Size 2 / 64.00 MB
VG UUID Rq9HwR-J9fS-AqEe-asTT-bpfV-fp93-HwStyC

[root@theabcconnection ~]# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID 8mVYLW-QAuN-4S1Y-R5nf-J0Qa-DwRT-rcwgUP
LV Write Access read/write
LV Status available
# open 1
LV Size 65.72 GB
Current LE 2103
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID nL2pfg-OrR4-FWjw-zzr1-w6jp-Y05e-ioEda8
LV Write Access read/write
LV Status available
# open 1
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1

Manuel Wolfshant
Trusted Contributor

Re: Using LVM

It's rather obvious that /dev/VolGroup00/LogVol00 (65 GB) takes almost all of the 67 GB of the volume. In order to extend the size of the volume, you have to add another drive to it. http://www.tldp.org/HOWTO/LVM-HOWTO/addpvstovg.html has the answer.