关于umount命令的问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
ryt
帖子: 95
注册时间: 2014-10-08 20:50
系统: ubuntu 14.04

关于umount命令的问题

#1

帖子 ryt » 2014-12-10 21:51

有时候常常会出现umount不成功的情况,这是怎么回事?

遇到这种情况该怎么办呢?
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

Re: 关于umount命令的问题

#2

帖子 astolia » 2014-12-10 23:44

有程序正在使用,用

代码: 全选

sudo lsof 挂载点
查看,退出相应程序
googleray
帖子: 2
注册时间: 2013-08-07 15:27
系统: ubuntu

Re: 关于umount命令的问题

#3

帖子 googleray » 2014-12-27 9:20

试试这个。

代码: 全选

umount -l /device
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于umount命令的问题

#4

帖子 poloshiao » 2014-12-27 11:06

http://manpages.ubuntu.com/manpages/uto ... unt.8.html
umount - unmount file systems

it will fail in case this device was mounted on more than one directory.

Note that a file system cannot be unmounted when it is 'busy' - for
example, when there are open files on it, or when some process has its
working directory there, or when a swap file on it is in use. The
offending process could even be umount itself - it opens libc, and libc
in its turn may open for example locale files. A lazy unmount avoids
this problem.

-f, --force
Force an unmount (in case of an unreachable NFS system).
(Requires kernel 2.1.116 or later.)

-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. (Requires kernel 2.4.11 or later.)

-v, --verbose
Verbose mode.
回复