PHP fuser,HP-UX中umount文件系统时报device busy--之fuser用法

如何umount目前device busy的文件系统(fuser简单用法)?

(1)用fuser命令的四步:

1.确认挂接点有那些进程需要杀掉

# fuser -cu /mount_point

2.向进程发出SIGKILL信号:

# fuser -ck /mount_point

3.确认看是否还有进程在访问挂接点

# fuser -c /mount_point

4.umount挂接点

#  umount /mount_point

# fuser -u /dev/vg01/lvol1

This lists process IDs and login names of processes using /dev/vg01/lvol1.

# fuser -u /etc/passwd

This lists process IDs and login names of processes that have the passwd file open.

# fuser -uc /opt

This lists process IDs and login names of processes that have open files in the /opt file system.

# fuser -ku /dev/vg01/lvol1

This terminates all processes that are preventing logical volume lvol1 of volume group vg01

很多时候,不能umount,除了检查是否有应用程序尚在该目录打开文件之外,还要注意是否有用户远程登录在系统上,当前目录在该文件系统中,实在不行,就fuser -k吧。总能解决的,但要跟应用端确认。

方法二:

------------------------------------------------------------------------------------------------------

c6ccbc96c20bebb0d73e8e6368158ef5.png

mount: Device busy

c6ccbc96c20bebb0d73e8e6368158ef5.png

Problem(Abstract)

This technote explains why attempts to mount or umount an IBM® Rational® ClearCase® VOB on UNIX® or Linux® results in the error message Device busy.

Symptom

Cause

Mount Example:

$ /usr/atria/bin/cleartool mount /vobs/myvob

Mounting MVFS filesystem /vobs/myvob

mount: Device busy

Unmount Example:

$ /usr/atria/bin/cleartool umount /vobs/myvob

Unmounting MVFS filesystem /vobs/myvob

mount: Device busyNote: Running the above commands as root also results in the same error.

The message device busy is not a ClearCase error rather the message is being passed from the underlying operating system and indicates one of two scenarios:

If the Device Busy error message is received while attempting to mount a directory, this indicates that a user is in the mount point or the directory is already mounted.

If the Device Busy error message is received while attempting to unmount a directory, this indicates that a user or a process has an open file on that filesystem.

Resolving the problem

Determine which user is utilizing the mounted directory:

Use one of the operating system commands (such as fuser) to return a list of process IDs and user names that are currently using the directory mounted under the local_mount_point. This will help determine whether the process can be killed or to wait until it completes.

Example: fuser -uc /vobs/myvobNote: This command works on Solaris®, IRIX®, HP-UX®, Linux®, and AIX®. The above example assumes the fuser utility is defined in your path variable.

If fuser -uc /vobs/myvob returns an Invalid argument error, it might mean the VOB is already unmounted. Run the command ps -ef | grep/vobs/myvob to confirm.

Make sure that/vobs/myvob is not the user's current working directory or anyone else's on that same client host when unmounting.

Run the command mount with no options to check the table of mounts and search for any possible problems, or grep for /vobs/myvob.

If the above steps do not help then try restarting ClearCase.

If step #4 does not help, attempt to reboot the host.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值