0

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.

Armen Geo
  • 1
  • 2
  • 2
    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...) – Tom Yan Aug 16 '21 at 17:39
  • 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. – Armen Geo Aug 16 '21 at 20:32
  • There are lots of other solutions. But none of them involve trying to unmount /. This case is (perhaps unusually) not Microsoft's fault. – symcbean Aug 16 '21 at 23:52
  • 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. – Michael Hampton Aug 18 '21 at 01:00

0 Answers0