Find out which process has data open on the hard drive that is no longer visible in the directory tree [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0
















This question already has an answer here:



  • How can I diagnose and repair missing drive space?

    2 answers



On my server, the root partition is 73GB, but the disk says, it is full, although there are only about 6GB used on that device:



# df -h
Filesystem Size Used Avail Use% Mounted on
udev 997M 0 997M 0% /dev
tmpfs 202M 41M 162M 20% /run
/dev/mapper/p22server-root 73G 68G 655M 100% /


(I use LVM on the server: /dev/mapper/p22server-root -> ../dm-0)
If I check with



ncdu -x /


I find out that the total usage is just 5.9GB.



My guess is, that there must be files still open, that are not visible in the file-tree.



How can I debug this? I guess, that a reboot will restore the lost space, but rebooting is not possible right now.










share|improve this question















marked as duplicate by Gilles, Stephen Harris, peterh, Michael Homer, Christopher Jan 1 at 21:27


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Files hidden behind a mount point? I'm sure this question has come up before.

    – Gilles
    Dec 31 '18 at 16:35















0
















This question already has an answer here:



  • How can I diagnose and repair missing drive space?

    2 answers



On my server, the root partition is 73GB, but the disk says, it is full, although there are only about 6GB used on that device:



# df -h
Filesystem Size Used Avail Use% Mounted on
udev 997M 0 997M 0% /dev
tmpfs 202M 41M 162M 20% /run
/dev/mapper/p22server-root 73G 68G 655M 100% /


(I use LVM on the server: /dev/mapper/p22server-root -> ../dm-0)
If I check with



ncdu -x /


I find out that the total usage is just 5.9GB.



My guess is, that there must be files still open, that are not visible in the file-tree.



How can I debug this? I guess, that a reboot will restore the lost space, but rebooting is not possible right now.










share|improve this question















marked as duplicate by Gilles, Stephen Harris, peterh, Michael Homer, Christopher Jan 1 at 21:27


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Files hidden behind a mount point? I'm sure this question has come up before.

    – Gilles
    Dec 31 '18 at 16:35













0












0








0









This question already has an answer here:



  • How can I diagnose and repair missing drive space?

    2 answers



On my server, the root partition is 73GB, but the disk says, it is full, although there are only about 6GB used on that device:



# df -h
Filesystem Size Used Avail Use% Mounted on
udev 997M 0 997M 0% /dev
tmpfs 202M 41M 162M 20% /run
/dev/mapper/p22server-root 73G 68G 655M 100% /


(I use LVM on the server: /dev/mapper/p22server-root -> ../dm-0)
If I check with



ncdu -x /


I find out that the total usage is just 5.9GB.



My guess is, that there must be files still open, that are not visible in the file-tree.



How can I debug this? I guess, that a reboot will restore the lost space, but rebooting is not possible right now.










share|improve this question

















This question already has an answer here:



  • How can I diagnose and repair missing drive space?

    2 answers



On my server, the root partition is 73GB, but the disk says, it is full, although there are only about 6GB used on that device:



# df -h
Filesystem Size Used Avail Use% Mounted on
udev 997M 0 997M 0% /dev
tmpfs 202M 41M 162M 20% /run
/dev/mapper/p22server-root 73G 68G 655M 100% /


(I use LVM on the server: /dev/mapper/p22server-root -> ../dm-0)
If I check with



ncdu -x /


I find out that the total usage is just 5.9GB.



My guess is, that there must be files still open, that are not visible in the file-tree.



How can I debug this? I guess, that a reboot will restore the lost space, but rebooting is not possible right now.





This question already has an answer here:



  • How can I diagnose and repair missing drive space?

    2 answers







process disk-usage inode open-files






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 1 at 15:05







rubo77

















asked Dec 31 '18 at 4:15









rubo77rubo77

7,4772571133




7,4772571133




marked as duplicate by Gilles, Stephen Harris, peterh, Michael Homer, Christopher Jan 1 at 21:27


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Gilles, Stephen Harris, peterh, Michael Homer, Christopher Jan 1 at 21:27


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • Files hidden behind a mount point? I'm sure this question has come up before.

    – Gilles
    Dec 31 '18 at 16:35

















  • Files hidden behind a mount point? I'm sure this question has come up before.

    – Gilles
    Dec 31 '18 at 16:35
















Files hidden behind a mount point? I'm sure this question has come up before.

– Gilles
Dec 31 '18 at 16:35





Files hidden behind a mount point? I'm sure this question has come up before.

– Gilles
Dec 31 '18 at 16:35










2 Answers
2






active

oldest

votes


















1














If your suspicion is true, you may have an easier time with lsof.



Look out for "(deleted)" or similar in the output.






share|improve this answer























  • I edited my question. there is no deleted entry in lsof

    – rubo77
    Dec 31 '18 at 17:10


















0














There are two possibilities:



1. There are deleted files still open by some procesces



You can see all open files with lsof. For example those are the TYPEs shown in lsof and how often they appear in the output:



# lsof|cut -c50-54|sort|uniq -c
375 CHR
610 DIR
211 FIFO
32 IPv4
17 IPv6
40 link
419 node
152 nown
6008 REG
9 sock
598 unix


This shows only the File Descriptor column (FD):



# lsof|awk -v field="FD" 'NR==1 c = index($0,field) print substr($0,c-1,length(field)+4)'|sort|uniq -c|sort -n|tail


look for files with the value DEL in the output of lsof to get a hint.




2. Files are hidden behinid a mount point



But more probably, the files are just "hidden" due to a mount point, that was not used while large amount of files was stored in the mount-folder and now they are invisible to ncdu.



mount the root directory in another location and analyze this:



mkdir /temp-root
mount --bind / /temp-root
ncdu -x /temp_root





share|improve this answer































    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    If your suspicion is true, you may have an easier time with lsof.



    Look out for "(deleted)" or similar in the output.






    share|improve this answer























    • I edited my question. there is no deleted entry in lsof

      – rubo77
      Dec 31 '18 at 17:10















    1














    If your suspicion is true, you may have an easier time with lsof.



    Look out for "(deleted)" or similar in the output.






    share|improve this answer























    • I edited my question. there is no deleted entry in lsof

      – rubo77
      Dec 31 '18 at 17:10













    1












    1








    1







    If your suspicion is true, you may have an easier time with lsof.



    Look out for "(deleted)" or similar in the output.






    share|improve this answer













    If your suspicion is true, you may have an easier time with lsof.



    Look out for "(deleted)" or similar in the output.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Dec 31 '18 at 4:38









    std_unordered_mapstd_unordered_map

    1116




    1116












    • I edited my question. there is no deleted entry in lsof

      – rubo77
      Dec 31 '18 at 17:10

















    • I edited my question. there is no deleted entry in lsof

      – rubo77
      Dec 31 '18 at 17:10
















    I edited my question. there is no deleted entry in lsof

    – rubo77
    Dec 31 '18 at 17:10





    I edited my question. there is no deleted entry in lsof

    – rubo77
    Dec 31 '18 at 17:10













    0














    There are two possibilities:



    1. There are deleted files still open by some procesces



    You can see all open files with lsof. For example those are the TYPEs shown in lsof and how often they appear in the output:



    # lsof|cut -c50-54|sort|uniq -c
    375 CHR
    610 DIR
    211 FIFO
    32 IPv4
    17 IPv6
    40 link
    419 node
    152 nown
    6008 REG
    9 sock
    598 unix


    This shows only the File Descriptor column (FD):



    # lsof|awk -v field="FD" 'NR==1 c = index($0,field) print substr($0,c-1,length(field)+4)'|sort|uniq -c|sort -n|tail


    look for files with the value DEL in the output of lsof to get a hint.




    2. Files are hidden behinid a mount point



    But more probably, the files are just "hidden" due to a mount point, that was not used while large amount of files was stored in the mount-folder and now they are invisible to ncdu.



    mount the root directory in another location and analyze this:



    mkdir /temp-root
    mount --bind / /temp-root
    ncdu -x /temp_root





    share|improve this answer





























      0














      There are two possibilities:



      1. There are deleted files still open by some procesces



      You can see all open files with lsof. For example those are the TYPEs shown in lsof and how often they appear in the output:



      # lsof|cut -c50-54|sort|uniq -c
      375 CHR
      610 DIR
      211 FIFO
      32 IPv4
      17 IPv6
      40 link
      419 node
      152 nown
      6008 REG
      9 sock
      598 unix


      This shows only the File Descriptor column (FD):



      # lsof|awk -v field="FD" 'NR==1 c = index($0,field) print substr($0,c-1,length(field)+4)'|sort|uniq -c|sort -n|tail


      look for files with the value DEL in the output of lsof to get a hint.




      2. Files are hidden behinid a mount point



      But more probably, the files are just "hidden" due to a mount point, that was not used while large amount of files was stored in the mount-folder and now they are invisible to ncdu.



      mount the root directory in another location and analyze this:



      mkdir /temp-root
      mount --bind / /temp-root
      ncdu -x /temp_root





      share|improve this answer



























        0












        0








        0







        There are two possibilities:



        1. There are deleted files still open by some procesces



        You can see all open files with lsof. For example those are the TYPEs shown in lsof and how often they appear in the output:



        # lsof|cut -c50-54|sort|uniq -c
        375 CHR
        610 DIR
        211 FIFO
        32 IPv4
        17 IPv6
        40 link
        419 node
        152 nown
        6008 REG
        9 sock
        598 unix


        This shows only the File Descriptor column (FD):



        # lsof|awk -v field="FD" 'NR==1 c = index($0,field) print substr($0,c-1,length(field)+4)'|sort|uniq -c|sort -n|tail


        look for files with the value DEL in the output of lsof to get a hint.




        2. Files are hidden behinid a mount point



        But more probably, the files are just "hidden" due to a mount point, that was not used while large amount of files was stored in the mount-folder and now they are invisible to ncdu.



        mount the root directory in another location and analyze this:



        mkdir /temp-root
        mount --bind / /temp-root
        ncdu -x /temp_root





        share|improve this answer















        There are two possibilities:



        1. There are deleted files still open by some procesces



        You can see all open files with lsof. For example those are the TYPEs shown in lsof and how often they appear in the output:



        # lsof|cut -c50-54|sort|uniq -c
        375 CHR
        610 DIR
        211 FIFO
        32 IPv4
        17 IPv6
        40 link
        419 node
        152 nown
        6008 REG
        9 sock
        598 unix


        This shows only the File Descriptor column (FD):



        # lsof|awk -v field="FD" 'NR==1 c = index($0,field) print substr($0,c-1,length(field)+4)'|sort|uniq -c|sort -n|tail


        look for files with the value DEL in the output of lsof to get a hint.




        2. Files are hidden behinid a mount point



        But more probably, the files are just "hidden" due to a mount point, that was not used while large amount of files was stored in the mount-folder and now they are invisible to ncdu.



        mount the root directory in another location and analyze this:



        mkdir /temp-root
        mount --bind / /temp-root
        ncdu -x /temp_root






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 1 at 15:10

























        answered Dec 31 '18 at 19:06









        rubo77rubo77

        7,4772571133




        7,4772571133












            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?