[Samba] Re: samba quotas

Tilo Lutz TiloLutz at gmx.de
Mon May 10 18:29:17 GMT 2004


Hi

> >> Hi guys, we need to update our samba service from 2.2.8a 
> >> to samba 3.0.x (so that we can upgrade our AD from Win2k 
> >> to Win2k3).  The problem I am having is with the quotas.

> > I was never able to use the quota functions of samba. I use
> > Suse 8.2 with Samba 3.0.3 and XFS. Even the latest samba 
> > version doesn't recognize quotas correctly. For me quota 
> > code is broken since beginning in samba.

> I didn't know it was broken. What's broken? It works fine
> for me.
I don't know if quotas are broken in general but I was never able
to get them work. I tried both compile options, --with-quotas and
--with-sys-quotas

> I don't limit users. I limit projects (groups).
I only use user quotas.

Samba take care of quota restrictions. Users can't write more data
than allowed by quotas.
But clients don't show used space and free space correctly.
It shows complete disk usage and complete free space
instead of space used by user and max. space allowed by quotas

> By the way, I think your script is broken.
Thank you for your tip. I don't know much about
shell programming with tail, cat, awk, ....
I set soft and hard quota to the same value.

> But I digress. What did you think was wrong with quotas in samba?
Thats the reason I've written it seems broken for me and not in general.
I don't know why it's exactly not working.

I don't know why they don't work for me.
I use Suse 8.2 standard installtion with all updates.
filesystem is XFS.
Samba is 3.0.3, self compiled.
Quotas are working fine but not in samba.

I've atached quota relevant parts of config.log.
I would be glad if you find an error in my configuration.

Regards, Tilo

config.log:
configure:27602: checking whether to try disk-quotas support
configure:27640: result: no
configure:27645: checking whether to try the new lib/sysquotas.c interface
configure:27653: result: yes
[...]
configure:27851: checking sys/fs/vx_quota.h usability
configure:27860: gcc -c -O  -I/usr/include/heimdal -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -I/usr/include/heimdal conftest.c >&5
configure:27888:29: sys/fs/vx_quota.h: No such file or directory
configure:27863: $? = 1
[...]
#include <sys/fs/vx_quota.h>
configure:27878: result: no
configure:27882: checking sys/fs/vx_quota.h presence
configure:27889: gcc -E -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE  -I/usr/include/heimdal conftest.c
configure:27885:29: sys/fs/vx_quota.h: No such file or directory
configure:27895: $? = 1
configure: failed program was:
#line 27884 "configure"
#include "confdefs.h"
#include <sys/fs/vx_quota.h>
configure:27913: result: no
configure:27931: checking for sys/fs/vx_quota.h
configure:27938: result: no
configure:27967: checking sys/quota.h usability
configure:27976: gcc -c -O  -I/usr/include/heimdal -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -I/usr/include/heimdal conftest.c >&5
configure:27979: $? = 0
configure:27982: test -s conftest.o
configure:27985: $? = 0
configure:27994: result: yes
configure:27998: checking sys/quota.h presence
configure:28005: gcc -E -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE  -I/usr/include/heimdal conftest.c
configure:28011: $? = 0
configure:28029: result: yes
configure:28047: checking for sys/quota.h
configure:28054: result: yes
configure:28070: checking for XFS QUOTA in <sys/quota.h>
configure:28104: gcc -c -O  -I/usr/include/heimdal -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -I/usr/include/heimdal conftest.c >&5
configure: In function `main':
configure:28096: error: `Q_XGETQUOTA' undeclared (first use in this
function)
configure:28096: error: (Each undeclared identifier is reported only once
configure:28096: error: for each function it appears in.)
configure:28107: $? = 1
configure: failed program was:
#line 28076 "configure"
#include "confdefs.h"
[...]
configure:28827: checking whether the sys_quota interface works
configure:28861: gcc -c -O  -I/usr/include/heimdal -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -I/usr/include/heimdal -I./ -I.
-I./include -I.
/ubiqx -I./popt  -I./smbwrapper -I./nsswitch conftest.c >&5
In file included from configure:28842:
lib/sysquotas.c: In function `command_get_quota':
lib/sysquotas.c:185: warning: assignment makes pointer from integer without
a cast
lib/sysquotas.c:213: warning: assignment makes pointer from integer without
a cast
In file included from configure:28842:
lib/sysquotas.c: In function `command_set_quota':
lib/sysquotas.c:306: warning: assignment makes pointer from integer without
a cast
lib/sysquotas.c:349: warning: assignment makes pointer from integer without
a cast
configure:28864: $? = 0
configure:28867: test -s conftest.o
configure:28870: $? = 0
configure:28882: result: yes
configure:28885: checking whether to use the new lib/sysquotas.c interface
configure:28899: result: yes
configure:28977: checking whether the old quota support works
configure:29009: gcc -c -O  -I/usr/include/heimdal -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -I/usr/include/heimdal -I./ -I.
-I./include -I.
/ubiqx -I./popt  -I./smbwrapper -I./nsswitch conftest.c >&5
configure:29012: $? = 0
configure:29015: test -s conftest.o
configure:29018: $? = 0
configure:29030: result: yes
configure:29033: checking whether to use the old quota support
configure:29049: result: no
[...]
samba_cv_HAVE_SYS_QUOTA_XFS=no
samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
samba_cv_HAVE_UNSIGNED_CHAR=no
samba_cv_HAVE_UTIMBUF=yes
samba_cv_HAVE_UT_UT_ADDR=yes
samba_cv_HAVE_UT_UT_EXIT=yes
samba_cv_HAVE_UT_UT_HOST=yes
samba_cv_HAVE_UT_UT_ID=yes
samba_cv_HAVE_UT_UT_NAME=yes
samba_cv_HAVE_UT_UT_PID=yes
samba_cv_HAVE_UT_UT_TIME=yes
samba_cv_HAVE_UT_UT_TV=yes
samba_cv_HAVE_UT_UT_TYPE=yes
samba_cv_HAVE_UT_UT_USER=yes
samba_cv_HAVE_UX_UT_SYSLEN=no
samba_cv_HAVE_VA_COPY=yes
samba_cv_HAVE_WORKING_AF_LOCAL=no
samba_cv_HAVE_Werror=yes
samba_cv_PUTUTLINE_RETURNS_UTMP=yes
samba_cv_QUOTA_WORKS=yes
samba_cv_REPLACE_GETPASS=yes
samba_cv_REPLACE_INET_NTOA=no
samba_cv_RUN_QUOTA_TESTS=yes
samba_cv_SEEKDIR_RETURNS_VOID=yes
samba_cv_SIZEOF_INO_T=yes
samba_cv_SIZEOF_OFF_T=yes
samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
samba_cv_SYSCONF_SC_NPROC_ONLN=no
samba_cv_SYSQUOTA_FOUND=yes
samba_cv_SYSQUOTA_WORKS=yes
samba_cv_TRY_QUOTAS=no
samba_cv_TRY_SYS_QUOTAS=yes
samba_cv_USE_SETRESUID=yes
samba_cv_WE_USE_SYS_QUOTAS=yes
samba_cv_WITH_AFS=no
samba_cv_WITH_FAKE_KASERVER=no
samba_cv_WITH_QUOTAS=auto
samba_cv_WITH_SYS_QUOTAS=yes
samba_cv_compiler_supports_ll=yes
samba_cv_have_longlong=yes
samba_cv_have_setresgid=yes
samba_cv_have_setresuid=yes
samba_cv_immediate_structures=yes
samba_cv_optimize_out_funcation_calls=yes
samba_cv_sig_atomic_t=yes
samba_cv_socklen_t=yes
samba_cv_sysquotas_file=lib/sysquotas_4A.c
[...]
#define HAVE_SYS_QUOTA_H 1
#define HAVE_QUOTACTL_4A 1
#define HAVE_MNTENT_H 1
#define HAVE_SETMNTENT 1
#define HAVE_GETMNTENT 1
#define HAVE_ENDMNTENT 1
#define WITH_QUOTAS 1
#define HAVE_SYS_QUOTAS 1
#define WITH_UTMP 1
#define STAT_STATVFS64 1
#define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
#define HAVE_POSIX_ACLS 1
#define HAVE_SENDFILE64 1
#define LINUX_SENDFILE_API 1
#define WITH_SENDFILE 1
#define WITH_WINBIND 1
#define static_init_pdb { pdb_ldap_init(); pdb_smbpasswd_init();
pdb_tdbsam_init(); pdb_guest_init();}
#define static_init_rpc { rpc_lsa_init(); rpc_reg_init(); rpc_lsa_ds_init();
rpc_wks_init(); rpc_net_init(); rpc_dfs_init(); rpc_srv_init();
rpc_spoolss_init(
); rpc_samr_init();}
#define static_init_idmap { idmap_ldap_init(); idmap_tdb_init();}
#define charset_CP850_init init_module
#define charset_CP437_init init_module
#define static_init_charset {}
#define static_init_auth { auth_rhosts_init(); auth_sam_init();
auth_unix_init(); auth_winbind_init(); auth_server_init();
auth_domain_init(); auth_builtin_in
it();}
#define vfs_recycle_init init_module
#define vfs_audit_init init_module
#define vfs_extd_audit_init init_module
#define vfs_netatalk_init init_module
#define vfs_fake_perms_init init_module
#define vfs_default_quota_init init_module




More information about the samba mailing list