How to expand / partition in linux


I have expanded my /partition from 23g to 55g – Oracle VM

1> vboxmanage list hdds

UUID: be13f7f4-8a3f-48da-b03d-6a3200a83a38
Parent UUID: base
State: locked write
Type: normal (base)
Location: /d02/oracle/EBS/exadata3/exadata1-disk001.vmdk
Storage format: VMDK
Capacity: 25600 MBytes
Encryption: disabled

2> clone it

vboxmanage clonemedium –format VDI /d02/oracle/EBS/exadata3/exadata1-disk001.vmdk /d02/oracle/EBS/exadata3/exadata1-disk001.vdi

3> resize it
vboxmanage modifymedium /d02/oracle/EBS/exadata3/exadata1-disk001.vdi –resize 60000

Step 4> Resize the file

use the file – gparted-live-1.1.0-8-i686

Step 5

df -h
Filesystem Size Used Avail Use% Mounted on
26G 20G 4.8G 81% /
/dev/sda1 99M 38M 56M 41% /boot
tmpfs 2.9G 633M 2.3G 22% /dev/shm

[root@exdata2 ~]# pvdisplay
— Physical volume —
PV Name /dev/sda2
VG Name VolGroup00
PV Size 127.65 GB / not usable 29.84 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 4084
Free PE 949
Allocated PE 3135
PV UUID sM8TEK-mrMc-IrxF-5TkV-WwIv-BNmm-l8iIRi

Step 6

[root@exdata2 ~]# lvextend -L +30G /dev/mapper/VolGroup00-LogVol00
Extending logical volume LogVol00 to 66.00 GB
Logical volume LogVol00 successfully resized

Step 7

[root@exdata2 ~]# resize2fs /dev/mapper/VolGroup00-LogVol00
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/mapper/VolGroup00-LogVol00 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/mapper/VolGroup00-LogVol00 to 17301504 (4k) blocks.
The filesystem on /dev/mapper/VolGroup00-LogVol00 is now 17301504 blocks long.

[root@exdata2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
64G 20G 42G 32% /
/dev/sda1 99M 38M 56M 41% /boot
tmpfs 2.9G 0 2.9G 0% /dev/shm



About Author

Leave A Reply