How to resize LVMs Fedora 16

techtata

Regular
Messages
598
Location
NA
ISP
Tata Indicom
Hi All,

I am a Fedora/Linux fan and have been learning different things about it on my own for some time now. All my learning can be attributed to online forums like this one. Now I need some serios help. I have just installed Fedora 16 32+ bit OS on my SATA hard drive with 80 GB capacity. It is the only OS on the disk now. It was installed automatically ie all the partitions/LVMs/Volume groups etc, were created by default during the installation, I did not interfere at all. I want to change the size of my root and home partitions which happen to be logical volmes ie LVMs. I have tried doing so using the inbuilt tool called Logical Volume Manager, but could not go any further. So please guide me as to how I should proceed. Step by step. Here is my situations in terms of commands and their output in a terminal.

----------

[[email protected] ~]$ su
Password:
[[email protected] james]#
[[email protected] james]# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4e474e47

Device Boot Start End Blocks Id System
/dev/sda1 1 156301487 78150743+ ee GPT

Disk /dev/mapper/VolGroup-lv_swap: 5536 MB, 5536481280 bytes
255 heads, 63 sectors/track, 673 cylinders, total 10813440 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/VolGroup-lv_swap doesn't contain a valid partition table

Disk /dev/mapper/VolGroup-lv_root: 49.3 GB, 49325015040 bytes
255 heads, 63 sectors/track, 5996 cylinders, total 96337920 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/VolGroup-lv_root doesn't contain a valid partition table

Disk /dev/mapper/VolGroup-lv_home: 24.6 GB, 24628953088 bytes
255 heads, 63 sectors/track, 2994 cylinders, total 48103424 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/VolGroup-lv_home doesn't contain a valid partition table




----------

[[email protected] james]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 46G 5.5G 39G 13% /
devtmpfs 2.0G 0 2.0G 0% /dev
tmpfs 2.0G 1.5M 2.0G 1% /dev/shm
tmpfs 2.0G 42M 2.0G 3% /run
/dev/mapper/VolGroup-lv_root 46G 5.5G 39G 13% /
tmpfs 2.0G 42M 2.0G 3% /run
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 2.0G 0 2.0G 0% /media
/dev/sda2 497M 93M 380M 20% /boot
/dev/mapper/VolGroup-lv_home 23G 9.0G 13G 42% /home
[[email protected] james]#



----------


[[email protected] james]# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup/lv_swap
VG Name VolGroup
LV UUID y1tvC6-aKyc-kYZu-5kz7-08On-f55g-nTse5H
LV Write Access read/write
LV Status available
# open 2
LV Size 5.16 GiB
Current LE 165
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Name /dev/VolGroup/lv_home
VG Name VolGroup
LV UUID KeVvvo-wwgF-aH8E-49UV-9O3v-ZDl3-3rGAyk
LV Write Access read/write
LV Status available
# open 1
LV Size 22.94 GiB
Current LE 734
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Name /dev/VolGroup/lv_root
VG Name VolGroup
LV UUID O0KVrX-V5Vr-4FdM-AiPR-ufvo-VEnz-1SMGqB
LV Write Access read/write
LV Status available
# open 1
LV Size 45.94 GiB
Current LE 1470
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1


----------

[[email protected] james]# vgdisplay
--- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 74.03 GiB
PE Size 32.00 MiB
Total PE 2369
Alloc PE / Size 2369 / 74.03 GiB
Free PE / Size 0 / 0
VG UUID uocxyY-QFHM-u8XV-Kkmf-CKrX-pY5y-0SKmMp

[[email protected] james]#



----------

I want to increase the size of /home partition and decrease the size of /root partition. Can anyone experieced please guide me step by step as to how to accomplish this? Thanks.
 

techtata

Regular
Messages
598
Location
NA
ISP
Tata Indicom
Please help me guys, thanks.