- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Discrepancy is disk usage
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2000 12:13 AM
11-16-2000 12:13 AM
When I do du -ks /opt it gives 2153590
When I do df -k /opt its gives
3223552 allocated
0 free
3223552 used
100% allocation used.
So on a 3GB file systems though du say only 2GB is used df say 3GB is used. Why is this diescrepancy.
Actually I have deleted some files of total 1 GB a little while ago. Has this caused the problem.
Please help
Thanks in advance
Praveen
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2000 12:29 AM
11-16-2000 12:29 AM
Re: Discrepancy is disk usage
Drop to a single user status and try:-
fuser -u /dev/VG??/opt
and look to see if any areas are locked.
See also man fuser.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2000 12:30 AM
11-16-2000 12:30 AM
Re: Discrepancy is disk usage
Discrepancies between 'du' and 'df' will happen if the directory isn't a mount point or if there are mount points below it.
With a standard installation, /opt should be a separate filesystem, so, as far as there are no filesystems mounted below /opt, 'du' and 'df' should report the same figures.
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2000 12:33 AM
11-16-2000 12:33 AM
Re: Discrepancy is disk usage
Use
du -sxk /opt
this will not go to any other mount point within /opt and the result should be the same as df -k /opt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2000 03:18 PM
11-18-2000 03:18 PM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2000 04:14 PM
11-18-2000 04:14 PM
Re: Discrepancy is disk usage
It is possible to create a sparse file with:
dd if=/etc/issue of=/var/tmp/sparse bs=2048k seek=1
where you will see the original file is just a few dozen bytes, the result with ls -l or wc -c shows a 2 meg file, but du(1) will show the file as occupying just a bit more than the original /etc/issue file. A cp(1) of the file will create a new file that is the same size (using ls -l or wc -c) but du(1) will now show a much larger size.
A common file that is often sparse is a core file from a crashed program. Another file that might be sparse is /etc/mail/aliases.pag. And of course, any programmer could write special code that creates a sparse file.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2000 10:27 PM
11-20-2000 10:27 PM
Re: Discrepancy is disk usage
the space is not released yet. This can happen when you try to remove active files.
A reboot will clean this up or if you can find the process which was using the files you might be lucky by killing the process that it will release the space.
This might be tricky and I would recommedn the usage of the shareware program lsof for this.
But in anycase a reboot will help you,
Steffi jones