VxFS quota not working on Solaris

Shirish Kalele kalele at veritas.com
Tue Jan 15 17:16:03 GMT 2002


Hi David,

Thanks for the acknowledgement :-)

Yes, Veritas does in fact officially support Samba/Solaris/VxFS quotas on
our shipping product.
And I'll be happy to work out any problems people running Samba
independently are having, as well.

Cheers,
Shirish

----- Original Message -----
From: "David Lee" <t.d.lee at durham.ac.uk>
To: <gdoucet at csc.com>
Cc: <samba-technical at lists.samba.org>; "Shirish Kalele" <kalele at veritas.com>
Sent: Tuesday, January 15, 2002 2:21 PM
Subject: Re: VxFS quota not working on Solaris


> On Tue, 15 Jan 2002 gdoucet at csc.com wrote:
>
> > I try to use quota on a VxFS filesystem and Solaris 7 and does not work.
>
> Oh my!  A blast from the past!
>
> I suspect the number of sites running Solaris/VXFS/quotas can be counted
> on the fingers of one hand.
>
> The Solaris/VxFS code was originally sketched well over two years ago for
> our system: Solaris 2.6 with a version of VXFS (3.2.4?) that had its own,
> hidden, way of getting quotas: see routine "disk_quotas_vxfs(...)".
>
> If memory serves me aright, the configure script would attempt to find one
> of Veritas include files, and eventually, after some indirection, would
> ensure that "VXFS_QUOTA" ended up being defined automatically.
>
> I can confirm that that worked on Solaris 2.6 (32-bit on a ultra 450) and
> whatever version of VxFS was current at the time.
>
> In writing this, Shirish Kalele at Veritas gave, on an informal basis,
> some very useful help and advice.  One of his modifications turned out to
> be exceedingly useful to us.
>
> A year ago we upgraded to Solaris 8 (skipping Solaris 7) and VxFS 3.4 .  I
> got very worried when I discovered that this version of VxFS did not have
> the include files.  But magically, the quotas still worked, and I think
> this might be because this version of VxFS support the Solaris way
> "ioctl(...)" of getting quotas, making the earlier code unnecessary.
> (That's where Shirish's tweak was valuable: he ensured that the Solaris
> scheme was always called first, and only if it failed would it then fall
> back to "disk_quotas_vxfs()".)
>
> Alas, I don't really know who can offer much support on Solaris/VxFS.
>
> Veritas?  No.  My understanding is that they didn't support it.  But I
> wonder whether that has changed since, because I understand that about a
> year ago Veritas now actually began supplying samba "in background" in one
> of their products.  (Shirish's own involvement was clearly stated to be
> informal, and we must respect that.)
>
> Me?  I'm not really in a position to offer support, because although we
> use Solaris/VxFS/quotas (and big-time!), we only have one installation,
> which is mission-critical, and I really cannot experiment on it.
>
>
> Overall, I am reasonably happy with the code (especially after Shirish
> added his small but significant contribution), including the "ifdef" and
> "configure[.in]" stuff.
>
> But, at least in the Solaris aspect, you have a set-up I have never used,
> so minor problems may lurk.
>
> > 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
>
> Perhaps you could temporarily add a few more "DEBUG(...)" statements into
> quotas.c, to log the flow of control.
>
> The information seen in "/etc/mnttab" may be slightly different from that
> returned by "getmntent(...)".  The code uses "getmntent(...)" so don't get
> too distracted by "/etc/mnttab".
>
> > 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
> > [...]
>
>
> I cannot comment on that patch at present.  Indeed, there are other things
> which ought to be checked first, in particular, ...
>
> > Also, I had to force to define VXFS_QUOTA:
> > CFLAGS="-DVXFS_QUOTA" ./configure --with-quotas
>
> That really shouldn't be necessary.  The intention is that the need, if
> any, for VXFS_QUOTA should be automatic.  Solaris 2.6 and early VXFS
> (summer 1999) needed it (we were on samba 2.0.x);  Solaris 8 and VxFS 3.4
> (initially still 2.0.x, later 2.2.x) seem not to need it.  But, crucially,
> it was automatic, via configure.
>
> I've just taken at peek at smaba 2.2.2's "include/includes.h".  It was
> this that seemed to do the magic of converting configure's derived
> HAVE_SYS_FS_VX_QUOTA_H into the VXFS_QUOTA required in "smbd/quotas.c".
> At a glance, it seems to be absent in 2.2.2 .  I just wonder whether we've
> hit a migration problem from samba 2.0.x to 2.2.x ?
>
> So it might just be worth doing the following;
>
> 1. Does your VxFS installation supply file /usr/include/sys/fs/vx_quota.h?
>    (If not exactly there, have a look round for "*vx*.h" files in other
>    likely places.)
>
> 2. If so, does your samba configuration find it?
>
> 3. If so then try adding to "include/includes.h" the lines:
>
> #if defined(HAVE_SYS_FS_VX_QUOTA_H)
> #define VXFS_QUOTA
> #endif
>
> 4. If that helps, then file a bug report to the Samba Team!  (You'll have
>    to do all the run-time testing and verification.  But if circumstances
>    permit, I'll try to lend a hand in assisting with generating a patch.)
>
> Ultimately it may need both a configure-related patch (i.e. the
> "include/includes.h" stuff above) and perhaps a "quotas.c" one along the
> lines you suggest.
>
>
> (If you are wondering about the apparent complexity of converting
> configure's HAVE_SYS_FS_VX_QUOTA_H into the "quotas.c" VXFS_QUOTA, it is
> simply that they operate on two different levels semantically , although,
> in this case, they happen to have a one-to-one correspondence.)
>
>
> Hope that helps.
>
> --
>
> :  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