Skip site navigation (1)Skip section navigation (2)
Date:      3 Aug 1999 10:17:12 -0000
From:      nbm@rucus.ru.ac.za
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/12939: add flag to quota to suppress NFS quota checks
Message-ID:  <19990803101712.47209.qmail@rucus.ru.ac.za>

next in thread | raw e-mail | index | archive | help

>Number:         12939
>Category:       bin
>Synopsis:       add flag to quota to suppress NFS quota checks
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug  3 03:20:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Neil Blakey-Milner
>Release:        FreeBSD 3.0-STABLE i386
>Organization:
Rhodes University Computer Users' Society
>Environment:
FreeBSD rucus.ru.ac.za 3.0-STABLE FreeBSD 3.0-STABLE #0: Tue Feb  9 22:52:23 GMT 1999     grahams@rucus.ru.ac.za:/usr/src/sys/compile/RUCUS-SMP  i386

NFS environment

>Description:

Quota automatically checks NFS mounts, which can cause it to hang if
an NFS server is not available.  Since some admin like to put quota in
/etc/profile, and sometimes don't want the system to check NFS mounts,
it's probably a good idea to provide a mechanism to do that.

Check <Pine.BSF.4.10.9907232334490.1643-100000@chain.freebsd.os.org.za>,
from freebsd-questions, for example.

Also check open PR bin/6183 for another NFS/quota suggestion.

>How-To-Repeat:

mount filesystem via NFS
kill NFS server, or cut ethernet cable, or similar.
quota

>Fix:

--- quota.1.orig	Mon Aug  2 10:34:42 1999
+++ quota.1	Tue Aug  3 10:52:25 1999
@@ -43,14 +43,17 @@
 .Nd display disk usage and limits
 .Sh SYNOPSIS
 .Nm quota
+.Op Fl l
 .Op Fl g
 .Op Fl u
 .Op Fl v | Fl q
 .Nm quota
+.Op Fl l
 .Op Fl u
 .Op Fl v | Fl q
 .Ar user
 .Nm quota
+.Op Fl l
 .Op Fl g
 .Op Fl v | Fl q
 .Ar group
@@ -76,6 +79,10 @@
 Print a more terse message,
 containing only information
 on filesystems where usage is over quota.
+.It Fl l
+.Nm Quota
+will not report quotas on filesystems mounted via
+.Nm NFS .
 .El
 .Pp
 Specifying both
@@ -119,6 +126,13 @@
 .Nm
 exits with a non-zero status, one or more filesystems
 are over quota.
+.Pp
+If the
+.Fl l
+flag is specified,
+.Nm
+will not check filesystems mounted via
+.Nm NFS
 .Sh FILES
 .Bl -tag -width quota.group -compact
 .It Pa quota.user
--- quota.c.orig	Mon Aug  2 10:34:38 1999
+++ quota.c	Mon Aug  2 10:44:46 1999
@@ -107,6 +107,7 @@
 
 int	qflag;
 int	vflag;
+int	lflag;
 
 int
 main(argc, argv)
@@ -118,7 +119,7 @@
 	int i, gflag = 0, uflag = 0;
 	char ch;
 
-	while ((ch = getopt(argc, argv, "ugvq")) != -1) {
+	while ((ch = getopt(argc, argv, "ugvql")) != -1) {
 		switch(ch) {
 		case 'g':
 			gflag++;
@@ -132,6 +133,9 @@
 		case 'q':
 			qflag++;
 			break;
+		case 'l':
+			lflag++;
+			break;
 		default:
 			usage();
 		}
@@ -471,6 +475,8 @@
 				errx(2, "out of memory");
 		}
 		if (strcmp(fst[i].f_fstypename, "nfs") == 0) {
+			if (lflag)
+				continue;
 			if (getnfsquota(&fst[i], NULL, qup, id, quotatype)
 			    == 0)
 				continue;

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990803101712.47209.qmail>