QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1070|回复: 14

提问:umount 时有问题

[复制链接]
发表于 2003-6-24 13:08:25 | 显示全部楼层 |阅读模式

我用下面的命令:
mount /dev/hda5 /mnt/d
然后:
umount /dev/hda5
系统提示:
device is busy
请问何故?
发表于 2003-6-24 13:35:48 | 显示全部楼层
umount /mnt/d
回复

使用道具 举报

发表于 2003-6-24 20:33:24 | 显示全部楼层
可以强制卸载,但不推荐
umount -l /mnt/d

umount -l /dev/hda5
回复

使用道具 举报

发表于 2003-6-24 23:25:12 | 显示全部楼层
in fact
umount /dev/hda5
and
umount /mnt/d
are both ok.

it doesn't work .perhaps
1)your position is now in the /mnt/d/
2)there are some files in the /mnt/d/  being used.
回复

使用道具 举报

发表于 2003-6-25 13:46:06 | 显示全部楼层
umount /dev/hda5 和umount /mnt/d 在这里是等效的,
你不能umount 很可能是你还在/mnt/d下系统认为你还要使用该分区,或有其他程序在使用该目录下的文件,所以不能umount

umount -l /mnt/d 事实上是 lazy umount,他让你umount你正在使用的分区。它不是马上umount,而是在该目录空闲后umount
回复

使用道具 举报

 楼主| 发表于 2003-6-27 12:56:56 | 显示全部楼层
请问:
我到底应该怎么做才能让系统不出现“device is busy”的提示?

umount -l 我用过,好像提示还会出现。

我如果让系统重起,让系统自动卸载,这样对系统是不是不好?
  
回复

使用道具 举报

发表于 2003-6-27 15:37:20 | 显示全部楼层
你是不是在当前目录中umount了?
回复

使用道具 举报

发表于 2003-6-27 15:56:02 | 显示全部楼层
umount -l 需要2.4内核支持。
回复

使用道具 举报

发表于 2003-6-27 18:24:54 | 显示全部楼层
出现“device is busy”,是有的程序在使用其中的文件或目录,用ps aux看一下,杀了它,试试。
回复

使用道具 举报

 楼主| 发表于 2003-7-2 07:51:39 | 显示全部楼层
收到
回复

使用道具 举报

发表于 2003-7-3 12:21:48 | 显示全部楼层
/dev/XXX和/mnt/XXX不能同时做参数,只要其中一个就行了,这点和mount有点不同。
回复

使用道具 举报

发表于 2003-7-3 23:30:37 | 显示全部楼层
1. 你的某个 console 的当前目录正在该 mount 点的目录或子目录;
2. 某个程序可能正在使用着该 mount 点下面的某个文件;
总之是某个(或几个)程序正在使用你mount上的设备,mount 的提示很明白。关于这一点,你可以在 man umount 等文档中看到,有详细的说明,这是 man 中的一段:
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.
回复

使用道具 举报

发表于 2003-7-7 11:06:04 | 显示全部楼层
有一种情况提醒大家一下。有时侯mount了某盘后,就用一般用户在该盘下工作了,然后su成root去umount,因为一般用户仍在使用该盘,所以肯定会出现device is busy。
回复

使用道具 举报

发表于 2003-7-9 21:29:15 | 显示全部楼层
是否正在打开那个盘上的东西?把它关了,应该就not busy了。try it 。
回复

使用道具 举报

发表于 2003-7-18 22:03:45 | 显示全部楼层
我也有类似的情况,我的是rh9,通常情况下我是将所有应用程序关掉,但是还是提示busy。我是用root登录,注销掉用普通用户登录,用su 命令就可以umount,如果注销掉再用root登录,同样会产生busy的提示。估计是有什么程序在对它进行操作,但是始终没有找到原因。:=)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-20 15:39 , Processed in 0.042506 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表