We help IT Professionals succeed at work.

linux hard disk increase on vmware guest

mokkan
mokkan used Ask the Experts™
on
I have increased the disk size from 20 GB to  50 GB, but when I try to extend using fdisk, it is only letting me to increase 10 GB.

[root@localhost ~]# fdisk  -l

Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00080e9a

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              64        2611    20458496   8e  Linux LVM
/dev/sda3            2611        3264     5246560   83  Linux
/dev/sda4            3265        3526     2104515    5  Extended
/dev/sda5            3265        3526     2104483+  83  Linux

Disk /dev/mapper/vg_livecd-lv_root: 18.8 GB, 18832424960 bytes
255 heads, 63 sectors/track, 2289 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

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

Disk /dev/mapper/vg_livecd-lv_swap: 2113 MB, 2113929216 bytes
255 heads, 63 sectors/track, 257 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/vg_livecd-lv_swap doesn't contain a valid partition table
[root@localhost ~]# fdisk   /dev/sda

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
No free sectors available

any help ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
try and use

Download Gparted Live CDROM (http://gparted.sourceforge.net/livecd.php).

Author

Commented:
I found the problem,  if you look at my extend the size is only 2GB, that's why it is not letting me to create. I would have selected the default cylinder size for extended partition.

Commented:
Create another disk

convert into pv then add into vg

at last take a part in LV