Score:0

Sudo Error When Resizing Azure VS Disk

gb flag

I upgraded my disk size from 30G to 2048G. Now I need to resize it from OS and am following this article. https://docs.microsoft.com/en-us/azure/virtual-machines/linux/expand-disks

The problem is when I try to unmount the partition I get error

umount: /: target is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1))

If I try to unmount using umount -l, it unmounts but then I cant use sudo anymore. Getting error

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?

I seem to be stuck here. Can somebody help? Thanks.

Tom Yan avatar
in flag
You can't u(n)mount `/`. If you are not using a filesystem that supports online resizing / extending, then there's probably nothing you can do. (Well, apart from attaching it to another VM as a "secondary" drive and resize there...)
gb flag
Tom, you are correct. I ended up paying for Microsoft support and that is what they ended up doing. Frankly I don't understand how Azure doesn't have an easier way to upgrade root partition size. I also use VM with G cloud and that have a very straight forward way of doing this. Anyway thanks for your help.
ws flag
There are lots of other solutions. But none of them involve trying to unmount /. This case is (perhaps unusually) not Microsoft's fault.
Michael Hampton avatar
cz flag
Nope, not being able to unmount the root partition is a well understood limitation of Linux (just as not being able to unmount the C drive is a well understood limitation of Windows). Azure has nothing to do with that. Anyway, those linked instructions are not appropriate for the OS disk, only data disks, and it's unfortunate that MS didn't make this more explicit.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.