mount points / free disk space / dfree command

David Lee t.d.lee at durham.ac.uk
Wed Mar 5 11:30:18 GMT 2003


On Tue, 4 Mar 2003, Panko, Kevin wrote:

> I went and read some of the CIFS spec[1], and it seems to me that the
> QUERY_FS_INFO trans2 request only includes an identifier for the current
> connection.  Given this information, samba can only attempt to determine the
> amount of space on the root of the share.  This explains why using the dfree
> command did not give me any different numbers than not using it.

I'm not sure I understand exactly what you want.  But there is the
potential, at least in the future, for doing more than simply a "df".

Did you see my reply of Feb 24th, which mentioned what samba can already
do if quotas are present (and, implicitly, applicable to a filesystem)?
And how this might be generalised?

(By coincidence, another thread has just started about "group quota".)

> If I really understand what is going on here, then what we would have to do
> is create a new share for each mounted device.  That would be hard because
> the root that is exported happens to be an automounter directory, which
> changes.


Want simple "df"-like functionality?  Present, as the default.

Want to use user quotas?  Present, with appropriate compilation and
UN*X-host quota configuration.

Want to use group quotas?  Not yet present; but a recent thread discusses
a possibility.

Want to call an external program?  Present as "dfree command".  I have
never used it.  I suspect it cannot do quota-like per-user stuff, nor
per-subdirectory stuff.


I could well envisage something conceptually similar to "dfree command",
but more flexible, to allow use of username and current-directory:

1. yet another "smb.conf" option.  Like "dfree command" (calling external
program).  This could be hacked up reasonably quickly, but is a "dirty"
solution, expecially in view of current herculean efforts to clean the
Samba code.

2. Generalise (and re-implement) the existing stuff (df, "dfree command",
quota) as VFS modules, allowing sites to write their own modules.  This
would take longer to do, but would be much cleaner, and aligns well with
future development.



Summary:

What you want may not be there right now.  But I think it could be added
if designed reasonably carefully, and in context of the "bigger picture".

Hope that helps (a little, at least!).

-- 

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :


More information about the samba-technical mailing list