How to umount a busy windows file using Ubuntu in WSL?

6.8k Views Asked by At

I must unmount drvfs and remount it with the ‘metadata’ flag to use a new file system features to WSL that allows making changes in permissions in WSL. But when I do this:

sudo umount /mnt/c

It returns

umount: /mnt/c: target is busy

How can I force the process to stop without lose data? Which process could be running that should not?

1

There are 1 best solutions below

0
vkozyrev On

Try umount -l /mnt/c. According to the man page it does the following

   -l, --lazy
          Lazy unmount.  Detach the filesystem from the file hierarchy now, and clean up all references to this filesystem as soon as it is not busy anymore.