• 其他栏目

    王帮耀

    • 性别:男
    • 毕业院校:电子科技大学
    • 学历:硕士研究生毕业
    • 学位:工学硕士学位
    • 在职信息:辞职
    • 所在单位:信息中心(历史)
    • 办公地点:清水河校区主楼A2-301
    • 联系方式:
    • 电子邮箱:
    访问量:

    开通时间:..

    最后更新时间:..

    linux及unix服务器下umount目录时无法卸载的处理方法

      
    发布时间:2017-07-24   点击次数:

    有些时候,我们在umount某个目录(这里距离为根目录下wby目录)(可能是NFS挂在的目录或是CD-ROM)时的时候,显示/wby正在使用,用fuser -k /wby 时 杀不掉.这是可用如下方式处理:

    1.在solaris下如下处理:

    umount -f /wby 强制卸载即可


    2.在redhat下如下如下处理:


    Every wonder why sometimes you get this message when you try to un-mount a NFS drive or cdrom drive


    CODEroot@homer:~# umount /mnt/cdrom

    umount: /mnt/cdrom: device is busy

    umount: /mnt/cdrom: device is busy

    root@homer:~#


    Well chances a process is running that is using that directory. To find out run


    CODEroot@homer:~# fuser -m /mnt/cdrom/

    /mnt/cdrom/: 24066c


    That shows you what process is using that directory. Now lets do a ps aux and see whats running


    CODEroot@homer:~# ps aux | grep 24066

    root 24066 0.0 0.5 2244 1284 pts/10 S 14:04 0:00 -su

    root@homer:~#

    Looks like a the root user is in that directory. If you cannot find the term that is in that directory then kill that process


    CODEroot@homer:~# kill -9 24066

    root@homer:~#

    now you can un-mount


    CODEroot@homer:~# umount /mnt/cdrom/

    root@homer:~#


    This tip brought to you by the letter J and the letter Y

    在Solaris 下用root账户进行加载

                mount -F nfs 192.168.0.104:/data/nfsshare /nfs 

    问题:当我在Solaris下进行mount 时出现如下错误, nfs mount: mount: /nfs: Not owner


      mount -f nfs 202.112.150.180:/test3 /exlibris/dtl/streamingvideo2 nfs mount: 安装:/exlibris/dtl/streamingvideo2: 不是所有者


    由于linux和solaris10使用了不同版本的NFS导致的,solaris10默认使用的是NFS4,而linux可能是nfs2或nfs3(具体哪个版本我没研究过).

    所以假如要在solaris10 上mount linux上的目录或fs,可以使用如下命令:

    #mount -o ro,vers=3 192.168.0.1:/exportfs /mount-point