Friday, June 23, 2017

Linux - Increase A VMware Disk Size (VMDK) Formatted As Linux LVM without rebooting

Increase A VMware Disk Size (VMDK) Formatted As Linux LVM without rebooting

To increase the size of your VMware Virtual Machine, you need
1. Increase the disk's size in your vSphere Client or through the CLI. to increase the "hardware" disk
2. Then, use  partition option to extend it.


Increase from 3GB to 10 Gb

1) Checking if you can extend the current disk or need to add a new one

Note: If disk is already partitioned in 4 primary partitions, you can not extend it. Check with fdisk -l command


# fdisk -l

/dev/sda1   *           1          25      200781   83  Linux
/dev/sda2              26        2636    20972857+  8e  Linux LVM

we saw two partitions, you can extent current disk in a virtual machine.
if you have 4 parititon, you have to add new virtual disk to your system.


2) The "hardware" part, "physically" adding diskspace to your VM

- login to your VMware, go to edit setting of VM
- Highlight the disk you want to expand and change the size.
- If the size section is greyed out, shutdown your VM.
Note: you have snapshot taken of that VM, remove it.
- Reboot  your system, if you have complated without reboot, you have to rescan the scsi device.
# ls -l /sys/class/scsi_device


you should have a disk with update disk geometry.



Source - online
















No comments:

Post a Comment