On Thu, 15 Nov 2007 23:12:42 +0100, Pedro Espinoza <raindoctor at gmail.com> wrote:
> When I overlay mount a directory, I see duplicate entries in > /etc/mnttab. I did this in order to add extra option (noquota) for a > nfs share. > Now I have two entries in /etc/mnttab, one with noquota otion; another > without that. > > Question: Does quota daemon checks quota for this particular file system? Nope, to wit the source code is online and does tell us that we scan thru all the mnttab entries, look if they have the quota mount option and if so, check if we can access the corrsponding quota file and only it thats all true this fs will end up in the rquotad's global list of quota enabled file systems. src/cmd/fs.d/nfs/rquotad/rpc.rquotad.c:getquota() http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/fs.d/nfs/rquotad/rpc.rquotad.c#239 265 fsqp = findfsq(gqa.gqa_pathp); 266 if (fsqp == NULL) { 267 gqr.status = Q_NOQUOTA; 268 goto sendreply; 269 } http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/fs.d/nfs/rquotad/rpc.rquotad.c#393 412 setupfs(); http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/fs.d/nfs/rquotad/rpc.rquotad.c#433 446 447 while (getmntent(mt, &m) == 0) { 448 if (strcmp(m.mnt_fstype, MNTTYPE_UFS) != 0) 449 continue; 450 if (!hasquota(m.mnt_mntopts)) { 451 sprintf(qfilename, "%s/%s", m.mnt_mountp, QFNAME); 452 if (access(qfilename, F_OK) < 0) 453 continue; 454 } http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/fs.d/nfs/rquotad/rpc.rquotad.c#595 591 /* 592 * Return 1 if "quota" appears in the options string 593 */ 594 int 595 hasquota(opts) 596 char *opts; 597 { 598 char *value; 599 600 if (opts == NULL) 601 return (0); 602 while (*opts != '\0') { 603 if (getsubopt(&opts, mntopts, &value) == QUOTA) 604 return (1); 605 } 606 607 return (0); 608 } --- frankB