[Samba] Disk free space, quotas and GPFS

Jonathan Buzzard jonathan at buzzard.me.uk
Wed Jun 8 03:02:23 MDT 2011


On Tue, 2011-06-07 at 10:11 -0700, Jeremy Allison wrote:

[SNIP]

> > I thought I would be able to use the dfree command option of smb.conf to
> > report the correct information gathered through a script of some
> > description. Unfortunately even with a simple shell script that echos a
> > couple of numbers is owned by root and has permissions 700 does nothing
> > (I still see numbers for the entire file system not the specific share)
> > and I can see nothing in the samba logs even at log level 5.
> 
> dfree should work fine. I'd persue this avenue.
> 

I did some experimentation and I have discovered the problem. The manual
page for smb.conf says

    Note: Your script should NOT be setuid or setgid and should be owned
    by (and writeable only by) root!

Which gives the impression that it should have permissions 700. Changing
that to 755 and it works.

> > Am I doing something wrong or is this bust? I tried making it work with
> > a plain CentOS 5.6 with straight samba packages on ext3 with similar
> > results.
> > 
> > Alternatively would it be possible to add some quota support to vfs_gpfs
> > to make this work? There are plenty of errors of the form
> > 
> > [2011/06/07 15:53:15.672182,  3] lib/sysquotas.c:453(sys_get_quota)
> >   sys_get_vfs_quota() failed for mntpath[/lifesci] bdev[/dev/lifesci]
> > qtype[2] id[9651]: No such device
> > 
> > I am guessing that standard quota calls don't work on GPFS file systems.
> 
> Probably true. If you know how GPFS reports quotas we can
> add the code for a later release. We have quota hooks in
> the Samba VFS, so we could add this to the gpfs vfs module.

Well I have not tried anything but the GPFS Administration and
Programming Reference documents the function gpfs_quotactl and the
associated gpfs_quotaInfo_t structure which looks like they would do the
trick.

Is there any documentation on the Samba VFS layer so I can look into
extending the gpfs vfs module? That said I would probably start with a
dfree command written in C and linked to the GPFS libraries.


JAB.

-- 
Jonathan A. Buzzard                 Email: jonathan (at) buzzard.me.uk
Fife, United Kingdom.




More information about the samba mailing list