Linux df-h card into a dog

Source: Internet
Author: User


Today encountered a very strange problem, in a Linux execution df-h view disk usage, found that card into a dog, and then proceed to solve:


1, through strace df-h tracking is where the card

[[Email protected]_web ~]# strace df -hexecve ("/bin/df",  ["DF",  "-H"],  [/* 22 vars */])  = 0brk (0)                                     = 0x2307000mmap (null, 4096, prot_read| prot_write, map_private| map_anonymous, -1, 0)  = 0x7fd1715f4000access ("/etc/ld.so.preload",  R_OK)        = -1 ENOENT  (no such file or directory) Open ("/etc/ Ld.so.cache ",  o_rdonly)       = 3fstat (3, {st_mode=s_ifreg|0644,  ST_SIZE=37353,&NBSP, ...})  = 0mmap (null, 37353, prot_read, map_private, 3, 0)  =  0x7fd1715ea000close (3)             &Nbsp;                    = 0open ("/lib64/libc.so.6",  o_rdonly)       = 3read (3,   "\177elf\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\356\1\344=\0\0\0" ...,  832)  = 832fstat (3, {st_mode=s_ifreg|0755, st_size=1926520,  ...})  = 0mmap (0x3de4000000, 3750152, prot_read| prot_exec, map_private| map_denywrite, 3, 0)  = 0x3de4000000mprotect (0x3de418a000, 2097152, prot_none)  = 0mmap (0x3de438a000, 20480, prot_read| prot_write, map_private| map_fixed| map_denywrite, 3, 0x18a000)  = 0x3de438a000mmap (0x3de438f000, 18696, prot_read| prot_write, map_private| map_fixed| map_anonymous, -1, 0)  = 0x3de438f000close (3)                   &Nbsp;              = 0mmap (NULL,  4096, prot_read| prot_write, map_private| map_anonymous, -1, 0)  = 0x7fd1715e9000mmap (null, 4096, prot_read| prot_write, map_private| map_anonymous, -1, 0)  = 0x7fd1715e8000mmap (null, 4096, prot_read| prot_write, map_private| map_anonymous, -1, 0)  = 0x7fd1715e7000arch_prctl (arch_set_fs, 0x7fd1715e8700)  =  0mprotect (0x3de438a000, 16384, prot_read)  = 0mprotect (0x3de3a1f000, 4096,  Prot_read)  = 0munmap (0x7fd1715ea000, 37353)             = 0BRK (0)                                     = 0X2307000BRK (0x2328000)                            = 0x2328000open ("/usr/lib/locale/locale-archive",  O_ rdonly)  = 3fstat (3, {st_mode=s_ifreg|0644, st_size=99158576,  ...})  = 0mmap (null, 99158576, prot_read, map_private, 3, 0)  =  0x7fd16b756000close (3)                                  =  0open ("/etc/mtab",  o_rdonly)               = 3fstat (3, {st_mode=s_ifreg|0644, st_size=366,  ...})  = 0mmap (null, 4096, prot_read| prot_write, map_private| map_anonymous, -1, 0)  = 0x7fd1715f3000read (3,  "/dev/vda1 / ext4 rw,barrier=0 0  "...,  4096)  = 366read (3, " ",  4096)                          = 0close (3)                                  =  0munmap (0x7fd1715f3000, 4096)              = 0statfs ("/",  {f_type= "Ext2_super_magic",  f_bsize=4096, f_blocks=10320720, f_ bfree=8614131, f_bavail=8089869, f_files=2621440, f_ffree=2405901, f_fsid={-102338008,  -1862172196}, f_namelen=255, f_frsize=4096})  = 0open ("/usr/share/locale/locale.alias ",  o_rdonly)  = 3fstat (3, {st_mode=s_ifreg|0644, st_size=2512,  ...})  = 0mmap (Null, 4096,&nbsP prot_read| prot_write, map_private| map_anonymous, -1, 0)  = 0x7fd1715f3000read (3,  "# locale name alias  data base.\n# "...,  4096)  = 2512read (3, " ",  4096)                          = 0close (3)                                  =  0munmap (0x7fd1715f3000, 4096)              = 0open ("/usr/share/locale/en_us. Utf-8/lc_messages/coreutils.mo ",  o_rdonly)  = -1 ENOENT  (no such file  or directory) Open ("/usr/share/locale/en_us.utf8/lc_messages/coreutils.mo",  o_rdonly)  = -1  ENOENT  (no such file or d irectory) Open ("/usr/share/locale/en_us/lc_messages/coreutils.mo",  o_rdonly)  = -1 enoent   (no such file or directory) Open ("/usr/share/locale/en. Utf-8/lc_messages/coreutils.mo ",  o_rdonly)  = -1 ENOENT  (no such file  or directory) Open ("/usr/share/locale/en.utf8/lc_messages/coreutils.mo",  o_rdonly)  = -1  ENOENT  (no such file or directory) Open ("/usr/share/locale/en/lc_messages/ Coreutils.mo ",  o_rdonly)  = 3fstat (3, {st_mode=s_ifreg|0644, st_size=435,  ...})  = 0mmap (null, 435, prot_read, map_private, 3, 0)  =  0x7fd1715f3000close (3)                                  =  0statfs ("/sys",  {f_type= "Sysfs_magic",  f_bsize=4096,&nbsP;f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f _namelen=255, f_frsize=4096})  = 0statfs ("/dev/pts",  {f_type= "Devpts_super_magic",  f_ Bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0,  0}, f_namelen=255, f_frsize=4096})  = 0statfs ("/dev/shm",  {f_type=0x1021994,  f_bsize=4096, f_blocks=2041596, f_bfree=2041596, f_bavail=2041596, f_files=2041596,  f_ffree=2041595, f_fsid={0, 0}, f_namelen=255, f_frsize=4096})  = 0statfs (" /proc/sys/fs/binfmt_misc ",  {f_type=0x42494e4d, f_bsize=4096, f_blocks=0, f_bfree=0, f _bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096})  = 0statfs ("/data",  {f_type= "Ext2_super_magic",  f_bsize=4096, f_blocks=129015406,  f_bfree=46849538, f_bavail=40295938, f_files=32768000, f_ffree=32749794, f_fsid={346710647, -22441262} ,  f_namelen=255, f_frsize=4096})  = 0###  card here Statfs ("/opt",  {f_type=0xff534d42,  f_bsize=0, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid ={0, 0}, f_namelen=4096, f_frsize=0})  = 0###  card here Statfs ("/data1",  {f_type= " Ext2_super_magic ",  f_bsize=4096, f_blocks=129015406, f_bfree=128955560, f_bavail=122401960 ,  f_files=32768000, f_ffree=32767852, f_fsid={1328044912, -550095550}, f_namelen=255,  f_frsize=4096})  = 0statfs ("/data2",  {f_type= "Ext2_super_magic",  f_bsize=4096, f _blocks=129015406, f_bfree=128964770, f_bavail=122411170, f_files=32768000, f_ffree= 32767982, f_fsid={-1295730252, -1655731663}, f_namelen=255, f_frsize=4096})  =  0open ("/USR/LIB64/GCOnv/gconv-modules.cache ",  o_rdonly)  = 3fstat (3, {st_mode=s_ifreg|0644, st_size=26060, &NBSP, ...})  = 0mmap (null, 26060, prot_read, map_shared, 3, 0)  =  0x7fd1715ec000close (3)                                  =  0fstat (1, {st_mode=s_ifchr|0620, st_rdev=makedev (136, 2),   ...})  = 0mmap (null, 4096, prot_read| prot_write, map_private| map_anonymous, -1, 0)  = 0x7fd1715eb000write (1,  "filesystem       size  used avail "...,  49filesystem      size   used avail use% mounted on)  = 49write (1,  "/dev/vda1         40g  6.6g   31G "..., 40/dev/vda1        40g  6.6g    31g  18% /)  = 40write (1,  "tmpfs            7.8g     0  7.8g "..., 47tmpfs            7.8G     0  7.8G    0% /DEV/SHM)  = 47write (1,  "/dev/vdb         493G  314G  154G "..., 44/dev/vdb         493g  314g  154g  68% /data)  = 44write (1,  "/DEV/VDC         493g  234m  467g "...,  45/DEV/VDC         493G  234M  467G   1%  /DATA1)  = 45write (1, "/dev/vdd        493g  198m  467g" ...,  45/dev. /vdd        493g  198m  467g   1%  /DATA2)  = 45close (1)                                   = 0munmap (0x7fd1715eb000, 4096)              = 0close (2)                                   = 0exit_group (0)                             = ?

When I observed it, I found it stuck when I traced it to/opt.


But df-h results, there is no/opt mount information, so entered the/opt, found that is also the odd card incomparable


Then use Mount |column-t to view all mount information

[[email protected]_web /]# mount | column -t/dev/vda1                   on  /                           type  ext4          (rw,barrier=0) proc                        on  /proc                      type  proc           (rw) sysfs                       on  /sys                       type   sysfs         (rw) devpts                      on  /dev/ pts                   type  devpts        (rw,gid=5,mode=620) tmpfs                        on  /dev/shm                   type  tmpfs         (rw) none                        on  /proc/sys/fs/binfmt_misc  type  binfmt_misc   (rw)/dev/vdb                    on   /data                      type  ext4          (rw)// 192.168.2.6/replication  on  /opt                       type  cifs           (rw,username=dba,password=0987654)/dev/vdc                    on  /data1                      type  ext4          (rw)/dev/vdd                    on  /data2                      type  ext4          (rw)

Discover that/OPT mounted a remote NFS system, uninstalling/OPT

Umount/opt

Execute df-h Discovery second open again!!


Cause of the problem:

The NFS system here is no longer in use (hangs), but its mount information is still there, causing the filesystem to keep looking, so it's stuck there all the time.








This article is from the "Help God help!" "Blog, be sure to keep this provenance http://chenyicai.blog.51cto.com/1593876/1924649

Linux df-h card into a dog

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.