LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   LVM extend size (https://www.linuxquestions.org/questions/linux-general-1/lvm-extend-size-675520/)

bravored 10-10-2008 11:58 AM

LVM extend size
 
Hi Folks

I need to extend /var to max size avaiable.
I know you can using gui or command lvextend to add the avaible size in - via gui I noticed it has only 7gb more free.

I want to extend the /var -

Do I unmount it first?
I have postgress sql running from it
I have a app(with httpd) running from /usr
It's all connected..

PE2850
Red Hat Enterprise Linux ES release 4 (Nahant Update 6)
Linux SaS 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Lin

Thanks
Joe

trickykid 10-10-2008 01:10 PM

lvextend -L +5G /dev/rootvg/var
ext2online /dev/rootvg/var

That's an example. I always name my volgroups to rootvg, yours might differ, just change the name from rootvg to what you have yours setup.

And the above example would add 5GB of space to the existing /var

You can always use vgdisplay to see how much free space is available.

No need to umount anymore, unlike the old days of LVM.

bravored 10-13-2008 09:15 AM

Hi
more questions--

I got PE 2950 which has 4X36gb but I dont see the drives (as you would in sun) How to see all the drives? Any command like iostat -En?

Dell doesnt have 36gb anymore.. they only have 73gb/ is it possible to add other sizes to the mix? If so do I add 73gb to current vg or create new partition. I wanted to split the space between /usr and /var partition.

How to check if this using some kinda raid?

I rather use the drives it has to extend the space without breaking the raid intigerty(if it has it)

This is what I got:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
4.0G 2.2G 1.7G 57% /
/dev/sda3 190M 12M 169M 7% /boot
none 2.0G 0 2.0G 0% /dev/shm
/dev/mapper/VolGroup00-LogVol05
4.0G 45M 3.7G 2% /home
/dev/mapper/VolGroup00-LogVol03
4.0G 41M 3.7G 2% /tmp
/dev/mapper/VolGroup00-LogVol02
7.9G 4.2G 3.3G 56% /usr
/dev/mapper/VolGroup00-LogVol04
4.0G 2.7G 1.1G 71% /var
# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 6
Open LV 6
Max PV 0
Cur PV 2
Act PV 2
VG Size 33.09 GB
PE Size 32.00 MB
Total PE 1059
Alloc PE / Size 832 / 26.00 GB
Free PE / Size 227 / 7.09 GB


# vgdisplay -v
Finding all volume groups
Finding volume group "VolGroup00"
Fixing up missing format1 size (29.09 GB) for PV /dev/sda5
Fixing up missing format1 size (4.01 GB) for PV /dev/sda2
Fixing up missing format1 size (29.09 GB) for PV /dev/sda5
Fixing up missing format1 size (4.01 GB) for PV /dev/sda2
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 6
Open LV 6
Max PV 0
Cur PV 2
Act PV 2
VG Size 33.09 GB
PE Size 32.00 MB
Total PE 1059
Alloc PE / Size 832 / 26.00 GB
Free PE / Size 227 / 7.09 GB
VG UUID Y3uZ8Z-GFo4-Bnwf-6QgX-ZJVt-N666-SznDvC

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID H87JpT-V83h-P0Dc-DnRu-R2Rr-1j20-i8SAqN
LV Write Access read/write
LV Status available
# open 1
LV Size 4.00 GB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol05
VG Name VolGroup00
LV UUID LKuin4-GL1H-ViBb-EeA7-6aWf-hmhQ-IwgKN7
LV Write Access read/write
LV Status available
# open 1
LV Size 4.00 GB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol03
VG Name VolGroup00
LV UUID 1tsgdx-DEob-5JZj-0Gpc-5oIf-GpyF-Ke1Byg
LV Write Access read/write
LV Status available
# open 1
LV Size 4.00 GB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:2

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol02
VG Name VolGroup00
LV UUID wt7OQs-YWyZ-TrgK-Bxnf-yLAd-mM4E-mcFGvL
LV Write Access read/write
LV Status available
# open 1
LV Size 8.00 GB
Current LE 256
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:3

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol04
VG Name VolGroup00
LV UUID HaKy9P-iHBs-lXV5-27no-8f4F-PQ7E-bnwgEP
LV Write Access read/write
LV Status available
# open 1
LV Size 4.00 GB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:4

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID puFOCr-EnZR-haHi-VvS0-e1U5-IjuW-DbvxlQ
LV Write Access read/write
LV Status available
# open 1
LV Size 2.00 GB
Current LE 64
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:5

--- Physical volumes ---
PV Name /dev/sda5
PV UUID K6MwTq-RawB-SFSD-o720-XKUt-Zu5w-t5Tfja
PV Status allocatable
Total PE / Free PE 931 / 99

PV Name /dev/sda2
PV UUID vgV18M-iMqZ-C9rf-dGN7-UY5q-mEXn-29ka2x
PV Status allocatable
Total PE / Free PE 128 / 128

I dont see the other 3 drives...

Any help is greatly appreciated
Joe

trickykid 10-13-2008 09:56 AM

You can use fdisk to view all known drives to the system. This will work if you're using software RAID as well.

LVM is used to span across drives. The pvdisplay command can be used to see what drives are being used in the LVM. If none listed or you don't see 3 drives, most likely you have hardware RAID configured perhaps.

If it's hardware RAID, you'll need to reboot and invoke the administration utility at boot time for the hardware RAID settings to view the drives, configure, etc or if they have available a tool to administer them from within the OS.

bravored 10-13-2008 10:04 AM

This is what I see:
# fdisk -l

Disk /dev/sda: 35.8 GB, 35836133376 bytes
255 heads, 63 sectors/track, 4356 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 10 80293+ de Dell Utility
/dev/sda2 11 533 4200997+ 8e Linux LVM
/dev/sda3 * 534 558 200812+ 83 Linux
/dev/sda4 559 4356 30507435 5 Extended
/dev/sda5 559 4356 30507403+ 8e Linux LVM

Disk /dev/sdb: 35.8 GB, 35836133376 bytes
64 heads, 32 sectors/track, 34176 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System


I guessing /dev/sdb is not encompased into the vg..

Would I be able to the current vg?
If so.. how?
I would liek to split 35gb to 2 of my other partitions.
Thanks
Joe

bravored 01-12-2009 11:27 AM

I solved my issue of adding more space

1- you can install open manage "server administrator" for linux(didnt know that)
2- either do a reconstruct ( dont know if this a good idea)
I created new virtaukl disk with 2 new disks installed - mirrored it
3- ran system-config-lvm
4- added to current volume group
5- initialized and extended size as needed

sachin_shetty 01-14-2009 06:04 PM

Please Help me with LVM
 
Hi all;

I am trying to confgiure LVM on my server

my requiremnets are
EACH DIRECTORY SHOULD HAVE INITIAL SIZE OF 50GIGS. With the capability of growing with demand

fdisk -l
Disk /dev/cciss/c0d0: 1199.9 GB, 1199980951552 bytes
255 heads, 63 sectors/track, 145889 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 12748 102398278+ 83 Linux
/dev/cciss/c0d0p2 12749 12875 1020127+ 82 Linux swap / Solaris
/dev/cciss/c0d0p3 12876 145889 1068434955 8e Linux LVM

Disk /dev/cciss/c1d0: 1199.9 GB, 1199980951552 bytes
255 heads, 63 sectors/track, 145889 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/cciss/c1d0p1 1 145889 1171853361 8e Linux LVM

I have two physical HDD on my server each 1.2 TB
1) ----> /dev/cciss/c0d0
2) ----> /dev/cciss/c1d0

SO please suggest me to deploy a LVM to utilize free disk space


vgdisplay
--- Volume group ---
VG Name ntt-backup-srv-vol1
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 2.09 TB
PE Size 4.00 MB
Total PE 546944
Alloc PE / Size 486400 / 1.86 TB
Free PE / Size 60544 / 236.50 GB
VG UUID G5Wr66-0WCr-4yxI-kMSd-lvdr-2Wb6-Ne9cml


Kinldy help me to conf LVM

bravored 01-21-2009 01:13 PM

Do you have xceed, realvnc or xmanager

-first initialize
-create partitions


All times are GMT -5. The time now is 05:21 PM.