Find out which process has data open on the hard drive that is no longer visible in the directory tree [duplicate]
Clash Royale CLAN TAG#URR8PPP
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.
process disk-usage inode open-files
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.
add a comment |
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.
process disk-usage inode open-files
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
add a comment |
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.
process disk-usage inode open-files
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
process disk-usage inode open-files
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
If your suspicion is true, you may have an easier time with lsof.
Look out for "(deleted)" or similar in the output.
I edited my question. there is no deleted entry in lsof
– rubo77
Dec 31 '18 at 17:10
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If your suspicion is true, you may have an easier time with lsof.
Look out for "(deleted)" or similar in the output.
I edited my question. there is no deleted entry in lsof
– rubo77
Dec 31 '18 at 17:10
add a comment |
If your suspicion is true, you may have an easier time with lsof.
Look out for "(deleted)" or similar in the output.
I edited my question. there is no deleted entry in lsof
– rubo77
Dec 31 '18 at 17:10
add a comment |
If your suspicion is true, you may have an easier time with lsof.
Look out for "(deleted)" or similar in the output.
If your suspicion is true, you may have an easier time with lsof.
Look out for "(deleted)" or similar in the output.
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
add a comment |
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
add a comment |
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
add a comment |
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
add a comment |
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
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
edited Jan 1 at 15:10
answered Dec 31 '18 at 19:06
rubo77rubo77
7,4772571133
7,4772571133
add a comment |
add a comment |
Files hidden behind a mount point? I'm sure this question has come up before.
– Gilles
Dec 31 '18 at 16:35