Umount doesn't work

I can not understand what the problem is

I tried umount -f 'path' and umount -l 'path' is also nothing, writes device is busy

I also tried to look at the PID of the process through lsof, nothing showed there either ...

What is interesting, if you manually write sudo umount 'path' in the SHELE, then everything works, but in the sh script there is no ..

  • and under sudo too? - Senior Pomidor
  • Yes, I corrected the question - hovdev
  • and from which directory did the team get called when it didn't work and when it worked? - Senior Pomidor
  • hmm ... strange, the script is in the bin folder, after completing the work, it should unmount the partition, now added the line "cd .." to the end of the script and then umount, and now the error does not get out ... - hovdev
  • one
    I feel you called commands from the directory that you had to unmount, for example, you wanted to /mnt/cdrom unmount from the /mnt/cdrom . need to try from another ass. and your script was called from another one just - Senior Pomidor

1 answer 1

You called commands from the directory that you had to unmount, for example, you wanted to /mnt/cdrom unmount from the /mnt/cdrom . It is necessary to try from another ass, and your script was called from another one just

ps after sudo -s you go to another directory, so you managed to unmount from there