首页 > 其他 > 详细

执行df hang住

时间:2020-06-30 19:45:32      阅读:49      评论:0      收藏:0      [点我收藏+]

突然有一天发现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   dont 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     dont call the umount.<type> helpers
 -n, --no-mtab           dont 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

 

执行df hang住

原文:https://www.cnblogs.com/cptao/p/13215263.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!