Re: [RFC][PATCH] xfs: adjust size/used/avail information for quota-df

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

 



On 3/20/18 9:49 AM, cgxu519@xxxxxxx wrote:

...

> No, not really. Assume if we have 100GB xfs filesystem(/mnt/test2) and we have
> 3 directories(pq1, pq2, pq3) inside the fs, each directory sets project quota. 
> (size limit up to 10GB)
> 
> When avail space of total filesystem is only left 3.2MB, but when running df for
> pg1,pg2,pg3 then avail space is 9.5GB, this is much more than real filesystem. 
> What do you think?
> 
> Detail output [1]. (without this fix patch)
> 
> $ df -h /mnt/test2
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/vdb2       100G  100G  3.2M 100% /mnt/test2
> 
> $ df -h /mnt/test2/pq1
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/vdb2        10G  570M  9.5G   6% /mnt/test2
> 
> $ df -h /mnt/test2/pq2
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/vdb2        10G  570M  9.5G   6% /mnt/test2
> 
> $ df -h /mnt/test2/pq3
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/vdb2        10G  570M  9.5G   6% /mnt/test2

I agree that this is a confusing result.
 
> Detail output [2]. (with this fix patch)
> 
> $ df -h /mnt/test2
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/vdb2       100G  100G  3.2M 100% /mnt/test2
> 
> $ df -h /mnt/test2/pq1
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/vdb2       574M  570M  3.2M 100% /mnt/test2
                   ^           ^
                   |           |
                   |           +-- This makes sense 
                   |
                   +-- This is a little bit odd

So you cap the available project space to host filesystem
available space, and also use that to compute the
total size of the "project" by adding used+available.

The slightly strange result is that "size" will shrink
as more filesystem space gets used, but I'm not
sure I have a better suggestion here... would the below
result be too confusing?  It is truthful; the limit is 10G,
570M are used, and only 3.2M is currently available due to
the host filesystem freespace constraint:

$ df -h /mnt/test2/pq1
Filesystem      Size  Used Avail Use% Mounted on
/dev/vdb2       10G   570M  3.2M 100% /mnt/test2

-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux