I have a VM with 2 virtual machine scale set. There's a requirement to expand the datadisk. I have successfully expanded the VM's datadisk (attached disk). After which I am trying to expand the size of scale set data disks but with failure.
This is what I have done to expand the VM attached disk:
az disk update --resource-group e4s --name e4s-vm-0_disk2_a3d99285cfbc4f0987c8a9c8e4c1f7ef --size-gb 130
ssh to the instance and executed:
sudo mdadm --assemble --update=devicesize /dev/md0 /dev/sdc
sudo mount /dev/md0 /mnt/data
sudo xfs_growfs /mnt/data
After which df -h
had shown the expanded size correctly.
For the VMSS, this is what I have done:
az vmss update -n e4s-ss -g e4s --set virtualMachineProfile.storageProfile.dataDisks[0].diskSizeGb=130
Checked the scale set model:
az disk update --resource-group e4s -n e4s-vm-0_disk2_a3d99285cfbc4f0987c8a9c8e4c1f8ef --size-gb 130
[
{
"caching": "None",
"createOption": "empty",
"diskSizeGb": 130,
"lun": 0,
"managedDisk": {
"storageAccountType": "Premium_LRS"
},
"name": null
}
]
In portal also it's showing the size as 130
Updated the sc
Since the upgrade policy is manual so updated it:
az vmss update-instances -n e4s-ss -g e4s --instance-ids 1
az vmss update-instances -n e4s-ss -g e4s --instance-ids 2
After ssh connection to one of the vmss executed the same commands which were executed after expanding the VM disk. But the newly expanded size is not being displayed.