Increase VMware or Cloud existing disk size for Linux without rebooting Part 1
To increase the existing size of your VMware Virtual Machine or cloud Virtual Machine. First, you need to increase the disk’s size in your vSphere Client or through cloud portal if it’s in cloud. This will increase the existing disk space that you’re Virtual Machine or Cloud VM have. but you cannot utilize that extra space before partitioning it. If you want to resizing your Linux LVM, follow the below steps.
Add and Create partition to unallocated space: if you have increased the disk size
Once you’ve changed the disk’s size in VMware or in Cloud, reboot the VM if you rebooted the VM, you won’t have to rescan your SCSI devices as that happens on boot. If you did not reboot your server, rescan your SCSI devices as such.
Run Command fdisk -l to check and verify your current disk space. In my case it is 53.7 GB
To Add newly added space follow below steps
First, check the name of your SCSI devices.
sample output : 1:0:0:0 2:0:0:0
Then rescan the SCSI bus. Below you can replace the ‘2\:0\:0\:0’ with the actual scsi bus name found with the previous command. Each colon is prefixed with a slash,
#echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan
That will rescan the current scsi bus and the disk size that has changed will show up.
once the above command is executed run fdisk -l command to verify. you will notice that your existing disk space got increased, see the below screen it shows 64.4GB.
Scan the hard disk device if you’ve added a new disk
If you have added a new disk on the server, the actions are similar to above. But instead of re-scanning an already existing scsi bus we have to rescan the host to detect the new scsi bus as you’ve added a new disk.
if Your host device is called ‘host0’, rescan it as such:
#echo “- – -” > /sys/class/scsi_host/host0/scan
It won’t show any output, but running ‘fdisk -l’ will show the new disk.
you can now run fdisk -l to check the new device added and scanned into server.
Once you scan the disk you need to create partition Read part 2 of this article.
Your Profile can also be listed here, Want to share you Experience, become a TecGeeks Author Submit here
Latest posts by Rahul Kansi (see all)
- Top 10 Linux supporting Laptops in India with Best Price and features - March 30, 2017
- Former US president admits he ordered cyber attacks on North Korea - March 6, 2017
- Deny SSH Access to Particular User and Group - February 25, 2017