mount points / free disk space / dfree command

Panko, Kevin kevin.panko at pw.utc.com
Wed Mar 5 16:07:51 GMT 2003


> -----Original Message-----
> From: David Lee [mailto:t.d.lee at durham.ac.uk]
> Sent: Wednesday, March 05, 2003 6:30 AM
>
> On Tue, 4 Mar 2003, Panko, Kevin wrote:
> 
> 
> 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".

When an exported directory has mount points under it, samba cannot
tell the client the correct amount of free space available.

Let's say we have a smb.conf as:
[data]
   path = /data

And let's say /data contains two directories, disk1 and disk2, which are
mount points for separate disks.

Now samba will report the total/free disk space on [data] as the space
on the filesystem where /data itself is mounted (let's say the root
filesystem).  If disk1 is FULL, and the root filesystem is not, the
clients will think the disk is not full, and yet writes attempted to
\data\disk1\ will fail.  That is what I am trying to avoid.

> 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)?

Yes, but this solves a different problem than mine.

> Want simple "df"-like functionality?  Present, as the default.
 
> 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.

The dfree command is only useful for platforms where samba does not have
a builtin way to determine free disk space.  My platform is Solaris.

To refer back to my example situation, when I tried using "dfree command"
I saw that samba only calls the external program for /data, never for
/data/disk1.  I was hoping to mount the share on windows, then "cd" to
disk1, and run "dir," but the dfree program never gets told about the
client's current dir.  Samba itself doesn't get told either.

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

That's exactly what I could use, but current-directory is a client side
concept that samba does not know.  Right?

Kevin Panko


More information about the samba-technical mailing list