VxFS quota not working on Solaris

Shirish Kalele kalele at veritas.com
Tue Jan 15 14:37:08 GMT 2002


What version of Samba and VxFS are you using?

- SK

----- Original Message -----
From: <gdoucet at csc.com>
To: <samba-technical at lists.samba.org>
Sent: Tuesday, January 15, 2002 7:40 AM
Subject: VxFS quota not working on Solaris


> I try to use quota on a VxFS filesystem and Solaris 7 and does not work.
>
> I check the log with debug  = 5 and I check the code:
>
> It check for mount option dev= with the devive number in /etc/mnttab:
> [2002/01/15 09:57:44, 5] smbd/quotas.c:disk_quotas(511)
>   disk_quotas: looking for path "." devno=249e463
>
> After checking /etc/mnttab, VxFS filesystem don't have that option. Other
> Solaris Filesystem do:
> .
> .
> .
> /dev/vx/dsk/jumpstartdg/vxfs_quota_test /export/_quota_test     vxfs
> rw,log,suid,quota       1011029439
> zbans00h:/export/global/tools   /opt/corp/tools nfs
> rw,intr,suid,dev=2e800af        1011106087
> .
> .
> .
>
>
> So I produce this little patch that use stat to found out the device
number
> of the mont point:
>
> diff -u --recursive --new-file samba-2.2.2.orig/source/smbd/quotas.c
> samba-2.2.2/source/smbd/quotas.c
> --- samba-2.2.2.orig/source/smbd/quotas.c       Sat Oct 13 17:09:41 2001
> +++ samba-2.2.2/source/smbd/quotas.c    Tue Jan 15 10:16:44 2002
> @@ -498,6 +498,7 @@
>  #endif
>         FILE *fd;
>         SMB_STRUCT_STAT sbuf;
> +       SMB_STRUCT_STAT sbuf_mntpnt;
>         SMB_DEV_T devno ;
>         static SMB_DEV_T devno_cached = 0 ;
>         static int found ;
> @@ -518,7 +519,9 @@
>                 found = False ;
>                 slprintf(devopt, sizeof(devopt) - 1, "dev=%x", (unsigned
> int)devno);
>                 while (getmntent(fd, &mnt) == 0) {
> -                       if( !hasmntopt(&mnt, devopt) )
> +                       if(  sys_stat(mnt.mnt_mountp, &sbuf_mntpnt)
== -1 )
> +                               return(False);
> +                       if( devno  != sbuf_mntpnt.st_dev )
>                                 continue;
>
>                         DEBUG(5,("disk_quotas: testing \"%s\" %s\n",
> mnt.mnt_mountp,devopt));
>
>
> Also, I had to force to define VXFS_QUOTA:
> CFLAGS="-DVXFS_QUOTA" ./configure --with-quotas
>
> Is theire an other way?
>
> - -
> Geoffroy Doucet
>





More information about the samba-technical mailing list