05-12-2011
Removing the inode pointing to a file doesn't mean the file is really removed. As long as a process still has an open handle to that file it can continue to read
and write to that file. Only when that handle is closed too, the space is reclaimed.
The difference between df and du is also explained by this. df checks for used/unused inodes and blocks (asking the FS module for that data), while du just checks the directory indexes for files. If a file is removed but still in use, that space is marked used in the file system (seen by df), while du can't see it anymore.
Next time, check with
lsof or
fuser which process and user is accessing that file.
9 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
When I try to log in as root I get the following message
realloccg /: file system full sendmail :NO Queue:low on space (have 0,SMTP-DAEMON needs 101 in /var/spool/mqueue) What should I do? (1 Reply)
Discussion started by: hopeless
1 Replies
2. UNIX for Advanced & Expert Users
Hi All,
There was a background process running on a Solaris 2.8 machine, and appeared to have filled all available disk-space. I done a killall, and upon re-booting found that the file system had filled up, and will not boot as normal as a result. For example, I'm getting
/usr/adm/messages: No... (8 Replies)
Discussion started by: Breen
8 Replies
3. Filesystems, Disks and Memory
Hi
I have a Solaris 2.5.1 system. Recently my file system is full and i couldn't find what flood my root file system.
Anyone can suggext any directories i should look out for.
I am using Samba and Patrol agent. I am just usng this server as a file server, users cannot login into the system,... (1 Reply)
Discussion started by: owls
1 Replies
4. Solaris
Hi, I just started working with UNIX on an old semi-fossilized Sun workstation which I use to process LOTS of images,however, I just started to get an error message that the file system is full and then my shell tool or/and text editor freeze up. Help? (8 Replies)
Discussion started by: Bend
8 Replies
5. Solaris
I read the sticky and thought of a script I use on a regular basis. Since unless you patch/upgrade the df command on solaris you have a very tought time teling how full the system truly is.
Output looks like
$ biggest.sh /tmp
Filesystem kbytes used avail capacity Mounted... (0 Replies)
Discussion started by: meyerder
0 Replies
6. Solaris
I am receving following Error message in /var/adm/messages
"NOTICE: alloc: /: file system full"
Disk space usage is as beklow:
df -k
$ Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d10 76678257 56962561 18948914 76% /
/proc ... (8 Replies)
Discussion started by: Asteroid
8 Replies
7. Solaris
hello
Even though I am not out of inodes or of space, the /var/adm/messages shows messages:
file system full
I am doing now fcsk -m (400G) and I am still waiting to see the fragmentation results (should I add another option to df to have a faster output?)
Do you have any other hints... (6 Replies)
Discussion started by: melanie_pfefer
6 Replies
8. Solaris
Hi All,
This is Babu working as a system administrator.
Here I am getting one problem with one of my Sun server's root (/) file system.
In df -h command / file system showing 7.8 GB used space.But in du -hd command it showing 5.2 gb only.
Please can any one help me resolve this issue... (2 Replies)
Discussion started by: lbreddy
2 Replies
9. UNIX for Advanced & Expert Users
Can anyone help me in cleaning /opt filesystem..
i have checked all the options and i have cleared all the logs and the total size of the files in /opt is shown as 1.8GB were as the size of /opt is 4.8GB
but wen i run the command
# df -h /opt
it gives
capacity
99%
Please help... (17 Replies)
Discussion started by: kjamsheed
17 Replies
LEARN ABOUT XFREE86
remove
REMOVE(3) Linux Programmer's Manual REMOVE(3)
NAME
remove - remove a file or directory
SYNOPSIS
#include <stdio.h>
int remove(const char *pathname);
DESCRIPTION
remove() deletes a name from the filesystem. It calls unlink(2) for files, and rmdir(2) for directories.
If the removed name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made
available for reuse.
If the name was the last link to a file, but any processes still have the file open, the file will remain in existence until the last file
descriptor referring to it is closed.
If the name referred to a symbolic link, the link is removed.
If the name referred to a socket, FIFO, or device, the name is removed, but processes which have the object open may continue to use it.
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
The errors that occur are those for unlink(2) and rmdir(2).
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+----------+---------------+---------+
|Interface | Attribute | Value |
+----------+---------------+---------+
|remove() | Thread safety | MT-Safe |
+----------+---------------+---------+
CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C89, C99, 4.3BSD.
BUGS
Infelicities in the protocol underlying NFS can cause the unexpected disappearance of files which are still being used.
SEE ALSO
rm(1), unlink(1), link(2), mknod(2), open(2), rename(2), rmdir(2), unlink(2), mkfifo(3), symlink(7)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU
2017-09-15 REMOVE(3)