zoukankan      html  css  js  c++  java
  • 执行df hang住

    突然有一天发现df执行卡住了,一直不显示结果。

    $ df -h
    Filesystem              Size  Used Avail Use% Mounted on
    /dev/sda3               221G  100G  121G  46% /
    devtmpfs                 16G     0   16G   0% /dev
    tmpfs                    16G     0   16G   0% /dev/shm
    tmpfs                    16G  1.6G   14G  11% /run
    tmpfs                    16G     0   16G   0% /sys/fs/cgroup
    /dev/sda1               494M  204M  291M  42% /boot

    已知情况是,我挂载了/dev/sdb到/mnt下,而df执行的时候一直卡住,/mnt也没显示,怀疑是/mnt卡住了。

    解决方法:

    umount -l -f /mnt

    问题解决。

    下面查看一下umount执行的参数

    $ umount -h
    
    Usage:
     umount [-hV]
     umount -a [options]
     umount [options] <source> | <directory>
    
    Options:
     -a, --all               unmount all filesystems
     -A, --all-targets       unmount all mountpoins for the given device
                             in the current namespace
     -c, --no-canonicalize   don't canonicalize paths
     -d, --detach-loop       if mounted loop device, also free this loop device
         --fake              dry run; skip the umount(2) syscall
     -f, --force             force unmount (in case of an unreachable NFS system)
     -i, --internal-only     don't call the umount.<type> helpers
     -n, --no-mtab           don't write to /etc/mtab
     -l, --lazy              detach the filesystem now, and cleanup all later
     -O, --test-opts <list>  limit the set of filesystems (use with -a)
     -R, --recursive         recursively unmount a target with all its children
     -r, --read-only         In case unmounting fails, try to remount read-only
     -t, --types <list>      limit the set of filesystem types
     -v, --verbose           say what is being done
  • 相关阅读:
    Ubuntu 18.04.4 系统优化
    Ubuntu 18.04.4 LTS 更换国内系统源
    django 数据库迁移
    django2.0解决跨域问题
    python requests get请求传参
    python 常用排序方法
    python 电脑说话
    centos6.x配置虚拟主机名及域名hosts
    php 合并,拆分,追加,查找,删除数组教程
    PHP统计在线用户数量
  • 原文地址:https://www.cnblogs.com/cptao/p/13215263.html
Copyright © 2011-2022 走看看