Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

incorrect filesystem space shown in df

Ninad_1
Honored Contributor

incorrect filesystem space shown in df

Hi,

I have 2 ES40 servers in cluster with Tru64 5.1B PK2 .
Few days ago while creating some datafiles for tablespace in database our DBA created a datafile in one of the filesystems and for some reason he deleted the dbf file directly instead of unconfiguring it properly.
From then when I do a df -k I see that the boot disk for the 2nd server is showing 100% Capacity, whereas if I do a du to see which files are occupying the space it shows just 43 MB full out of 262 MB.
This is strange. Why is it showing so ?
Here is the output of df and du commands
# df -k root2_domain#root
Filesystem 1024-blocks Used Available Capacity Mounted on
root2_domain#root 262144 262144 0 100% /cluster/members/member2/boot_partition

# du -sk -x /cluster/members/member2/boot_partition
43450 /cluster/members/member2/boot_partition


Thanks in advance

Ninad
10 REPLIES
Mobeen_1
Esteemed Contributor

Re: incorrect filesystem space shown in df

Ninad,
Can u confirm the following

1. Does the data file still appears as
configured?
2. What does lsfs (list file system) command
show ?


I would advise that

1. After making appropiate changes depending
on the output above, dismount the file
system and mount it back.

Let me know if this works.

Thanks
Mobeen
Ninad_1
Honored Contributor

Re: incorrect filesystem space shown in df

The datafile was later on dropped and the filesystem which was having the datafile is showing correct space in df. only the problem is with the boot disk of 2nd server. Also I am not sure whether this incorrect space was shown was because of the datafile deletion or not , its just that after this problem I had checked with df command and came to know about this problem.
By the way what is this lsfs command ? Is it in Tru64 Unix 5.1B ? I was unable to find such command.

Thanks
Ninad
Johan Brusche
Honored Contributor

Re: incorrect filesystem space shown in df


One cannot umount the boot_partition of a running cluster member. To avoid rebooting the member associated with this partition, you could check with lsof or fuser if any process has still an open filedescriptor to a now deleted file in /cluster/members/member2/boot_partition and kill that process.

Note; "showfdmn -k root2_domain" and "/sbin/advfs/vdf -k root2_domain" are usually more accurate in showing the used space.

Rgds,
Johan.

_JB_
Michael Schulte zur Sur
Honored Contributor

Re: incorrect filesystem space shown in df

Hi Ninad,

the file system acted very normal. When you rm a file, you just delete the directory entry. As long as oracle had an open on the datafile, it was still existent. The moment, it was dropped, the last reference to it was gone and the file space released.

Michael
Mobeen_1
Esteemed Contributor

Re: incorrect filesystem space shown in df

Ninad,
Ok :)) lsfs (is AIX command), run any command on your True Unix that lists filesystems ...

this command basically lists the filesystems from /etc/filesystem

if you cannot figure out the equivalent command let me know. I should be able to get that for you

regards
Mobeen
Ralf Puchner
Honored Contributor

Re: incorrect filesystem space shown in df

Btw. "du" counts the sizes of each file and does not honor fillbytes etc. "df" took the information from the quota files.

Use "showfdmns" to get the real counters on an advfs filesystem!



Help() { FirstReadManual(urgently); Go_to_it;; }
Ninad_1
Honored Contributor

Re: incorrect filesystem space shown in df

Thanks Johan , Ralf
heres the showfdmn output
# showfdmn -k root2_domain

Id Date Created LogPgs Version Domain Name
3fc452e0.0109464d Wed Nov 26 12:44:40 2003 512 4 root2_domain

Vol 1K-Blks Free % Used Cmode Rblks Wblks Vol Name
1L 262144 213760 18% on 256 256 /dev/disk/dsk5a

Here it is showing proper results. But why it is not showing correctly in df output. As Ralf said df refers quota files, so is there any way to correct this problem so that df also shows correct status.

Thanks Michael - you rightly pointed out that untill oracle released the file it still showed as space occupied, because I remember that after deleting the datafile entry from tablespace it was showing free space in that filesystem

So finally shall I conclude that actually there is no problem with the root2_domain#root fileset ?

Regards
Ninad
Johan Brusche
Honored Contributor

Re: incorrect filesystem space shown in df


Yes Ninad, the root2_domain is OK, and no, df will not be corrected because it has to comply wih UNIX standards that were developped sometime in the past where UFS was 'the' filesystem.
If you want you can define an alias for your shell so that when you type 'df' it really calls /sbin/advfs/vdf.

Johan.

_JB_
Ralf Puchner
Honored Contributor

Re: incorrect filesystem space shown in df

to be sure the quota files are correct, use quotacheck (see man page for proper fstab values).

So you can check and verify the quota files.

Help() { FirstReadManual(urgently); Go_to_it;; }
Ninad_1
Honored Contributor

Re: incorrect filesystem space shown in df

Thanks everyone for their guidance
Now I will remember to use showfdmn or vdf for Advfs domains and I will check for quotas.

Regards
Ninad