add additional partition after increasing OS disk size

sheffadmin asked:

As part of add additional partition – sda3 we extend the OS disk from 50g to 120g from the vsphere client ( VM Linux server )

And we perform rescan , instead of reboot

sda                8:0    0  120G  0 disk
├─sda1             8:1    0    1G  0 part /boot
└─sda2             8:2    0  119G  0 part
  ├─Vlpr-lvm_root 253:0    0   10G  0 lvm  /
  ├─Vlpr-lvm_swap 253:1    0  3.9G  0 lvm  [SWAP]
  └─Vlpr-lvm_var  253:2    0  10G  0 lvm  /var

fdisk /dev/sda

Command (m for help): n
Partition type:
   p   primary (2 primary, 0 extended, 2 free)
   e   extended
Select (default p): p0
Partition number (3,4, default 3): 3
No free sectors available

Command (m for help):

As we can see above we have the partitions – sda1 sda2 , but when we select the partition number – 3 from fdisk then its complain about – No free sectors available
In spite we are not use sda3

Any suggestions why fdisk give the error – No free sectors available

I just to mention that we prefer to not do a reboot if this is the solution ?

My answer:

You don’t need to create a third partition because you have already resized the second partition to use the newly allocated space. Now you need to go on to the next steps, resizing the PV, resizing the LV, and finally resizing the filesystem.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.