Size of Mount Point

Hi,
On Solaris 5.10, I have a following mount point:

/dev/dsk/emcpower0a 492G 369G 118G 76% /u02

In /u02, from the du -h command, I can see that only 110G is used by couple of directories. I am wondering where the rest of 259G has gone? Any ideas please?

How can I check that are there any hidden files and what's there size?
How can we get top 5 biggest directories size wise?

regards

The usual reason is deleted but still open files.

Please let me know how I can check that, and how to delete those files?

regards

You cannot deleted them as they are already deleted. To recover the size they use, you need to stop (or restart) all the applications that have them open.

fuser /u02

might help identifying these applications.

fuser /u02 is just showing me two processes, and one is oracle listener and the other is passwd.

Any other ideas please?

regards

I don't think that "du -h" shows you the size or any information about hidden file or directory.So, may be there is some large hidden file or directory containing large files.

You can have a look at these processes open files with:

pfiles <pid> ...

For each file descriptor used by the process, look for S_IFREG entries where the filename isn't shown like the next one. That is characteristic of a deleted still open file.

   0: S_IFREG mode:0644 dev:559,2 ino:1026863754 uid:10000 gid:10000 size:1048576
      O_RDONLY|O_LARGEFILE

Non deleted files will show the file path and offset:

   0: S_IFREG mode:0644 dev:559,2 ino:1026863754 uid:10000 gid:10000 size:1048576
      O_RDONLY|O_LARGEFILE
      /tmp/a/1meg
      offset:0

---------- Post updated at 07:06 ---------- Previous update was at 07:04 ----------

What makes you think that ? Hidden files and directories, i.e. those which have a name starting with a dot are definitely taken into account by "du".

---------- Post updated at 07:08 ---------- Previous update was at 07:06 ----------

Sure. There might be an overlay mount on a subdirectory of /u02 that wasn't empty.
What says:

df -k | grep /u02

Sorry, I was wrong as I analysed the result of :

du -h * ----->>> When executed in a directory having hidden files will not tell the size of those hidden files...

Thanks jlliagre for making me correct...:D:b:

Your test was only showing "*" doesn't expand to hidden files but this is a shell feature unrelated to "du".

Proper ways are to run:

du -h /u02

or

cd /u02
du -h .
df -k | grep /u02

/dev/dsk/emcpower0a  516326993 387990416 123173308    76%    /u02

If you can reboot you System then this problem can be resolved.But this should be last option.

So there is no overlay mount. Have a look at pfiles output as I already suggested.

I have checked and there are just couple of processes and each one has opened 1 or 2 files. Any other suggestions please?

regards

One or two files can make 259 GB. Alternatively, you might have a corrupted filesystem.

Please post these commands output:

df -h /u02
du -hs /u02
mount -p | grep /u02
mount -v | grep /u02
ls -sl /proc/*/fd/* | sort -n | tail -20

oracle@test # df -h /u02
Filesystem size used avail capacity Mounted on
/dev/dsk/emcpower0a 492G 370G 117G 76% /u02

oracle@test # du -hs /u02
368G /u02

oracle@test # ls -sl /proc/*/fd/* | sort -n | tail -20
/proc/3421/fd/255: No such file or directory
/proc/3421/fd/3: No such file or directory
/proc/3421/fd/4: No such file or directory
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/2100/fd/6
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/2100/fd/7
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/2125/fd/6
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/21358/fd/12
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/21358/fd/6
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/21358/fd/7
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/25906/fd/12
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/25906/fd/6
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/25906/fd/7
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/26083/fd/6
173360 --w------- 1 oracle oinstall 88695235 Apr 29 12:18 /proc/26083/fd/7
180496 --w------- 1 oracle oinstall 92350748 Apr 29 19:13 /proc/2107/fd/3
195264 --w------- 1 oracle oinstall 99915177 Apr 28 08:06 /proc/16294/fd/1
195264 --w------- 1 oracle oinstall 99915177 Apr 28 08:06 /proc/16294/fd/2
195264 --w------- 1 oracle oinstall 99915177 Apr 28 08:06 /proc/2235/fd/1
195264 --w------- 1 oracle oinstall 99915177 Apr 28 08:06 /proc/2235/fd/2
195264 --w------- 1 oracle oinstall 99915177 Apr 28 08:06 /proc/2235/fd/3
195264 --w------- 1 oracle oinstall 99915177 Apr 28 08:06 /proc/27773/fd/1
195264 --w------- 1 oracle oinstall 99915177 Apr 28 08:06 /proc/27773/fd/2
528384 --w------- 1 oracle oinstall 270381606 Apr 29 19:13 /proc/16294/fd/8

Please pardon my ignorance. As it's a production server, please tell me that is it safe to run the following commands:
mount -p | grep /u02
mount -v | grep /u02

Thanks and regards and I am so indebted.

Hmm, df and du agree so what is the problem you are trying to fix ??

The problem is that I have calculated the size of directories present in /u02, and they make up total of 110GB, where as the df command shows that the total used space is 369G.

I am trying to find out where the 259G space is?

regards

Then please explain the method you used to calculate it. "du" reports a size equal to 368GB, not 110GB.