[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Q: 'df' reports partition is full but 'du' shows not full partition -- how to find where the problem

On Tue, Apr 7, 2015, at 19:47, Snow Leopard wrote:
> You have a web server and monitoring system reports that you short on 
> disk space. You login into web server computer and command 'df' indeed 
> shows that some partition is almost full.
> How would you resolve the issue if 'du' does not confirm that disk is full.
> You 'du' all directories in the root of the partition but sum does not 
> adds up to match 'Use%' reported by 'df'.

That depends.  Is it btrfs?  If so, well, I'd kick myself for using that in the first place, and proceed to rebalance it.

Otherwise, I'd hunt down unlinked but open files using lsof, and deal with whatever caused extremely large, unlinked but still in use datafiles:  "lsof +aL1 /the/filesystem"

After the emergency is over, I'd deploy proper user quotas and reserved space, reduce/remove oversubscription, and add new storage space as required.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique de Moraes Holschuh <hmh@debian.org>

Reply to: