'umount()'에 해당되는 글 1건

  1. 2009.12.07 umount(), umount
Linux2009.12.07 17:17

umount: cannot umount [mount poiunt] "Device or resource busy"

요런 에러를 발생해서 상콤하게 검색 고고싱,

    Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.)
    Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.)

[링크 : http://linux.die.net/man/8/umount] - umount

Linux 2.1.116 added the umount2() system call, which, like umount(), unmounts a target, but allows additional flags controlling the behaviour of the operation:

(since Linux 2.1.116)
    Force unmount even if busy. (Only for NFS mounts.)

MNT_DETACH (since Linux 2.4.11)
    Perform a lazy unmount: make the mount point unavailable for new accesses, and actually perform the unmount when the mount point ceases to be busy.

MNT_EXPIRE (since Linux 2.6.8)
    Mark the mount point as expired. If a mount point is not currently in use, then an initial call to umount2() with this flag fails with the error EAGAIN, but marks the mount point as expi2red. The mount point remains expired as long as it isn't accessed by any process. A second umount2() call specifying MNT_EXPIRE unmounts an expired mount point. This flag cannot be specified with either MNT_FORCE or MNT_DETACH.

[링크 : http://linux.die.net/man/2/umount] - umount()

원인이야, 이미 열린 파일이 있을 경우이지만,
커널 2.4.11 이후부터는 lazy umount를 지원해서 깔끔하게 에러없이 마운트를 해제할 수 있다.
(어떤 문제점이 부가적으로 생길지는..)

2010.02.05 추가
# umount -fl 로 실행하면 묻지도 따지지도 않고 언마운트시킨다.

2014.09.03 추가
ssh로 로그인 중이었는데 fuser로 하니 사용자가 튕기면서 unmount가 된다 ㄷㄷ
그 이후에 많이 엉기니 사용시 주의가 필요한듯

# fuser -km /mountpoint
[링크 : http://www.cyberciti.biz/tips/how-do-i-forcefully-unmount-a-disk-partition.html]

Posted by 구차니

댓글을 달아 주세요