Bug 42352
Summary: | quota doesn't RPC to NFS server | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Zvezdan Petkovic <zpetkovic> |
Component: | quota | Assignee: | Steve Dickson <steved> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | ametzler, anders.blomdell, kmori, shishz, thoron |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-05-05 03:23:24 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Zvezdan Petkovic
2001-05-25 22:21:08 UTC
as far as I can tell the patch doesn't work. I applied both patches and rebuilt and reinstalled the binary. I'm still getting no reported quotas. However, rhl 6.2 and 7.0 both report it correctly. After I apply the patch you provided I don't get any rpc attempts either. I can include the strace if it would be useful to you. thanks the nfs server in this case is rhl 6.2 Did you have any reports of errors from the patch utility? I notice that a few lines above are broken by bugzilla entry forms. However it's not difficult to find these files and a few lines that are patched, compile, and try. It is extremely important to change the SPEC file. It prevents make from using -DRPC while compiling. If you don't feel like doing that I have posted the patches and rpms at http://www.cs.wm.edu/~zvezdan/programs/patches/ for the convenience. I fixed the problems with bugzilla reformatting and both patches applied cleanly. I also just downloaded and compiled your srpm to check that I didn't screw up the patch in some obscure way. Still no joy. I get no listed quotas. I'm stepping through it in ddd now, I'll let you know what I find out. thanks Well, after this fix quota works fine in my environment (Linux workstations mounting from Solaris servers using automount). Do you have any other NFS rpc troubles unrelated to quota (e.g. locking)? For example, portmap is run as user rpc and rpc.statd must be run as user rpcuser (instead of superuser). Check your log messages. I ensured that all other NFS things are running smoothly before testing quota. Once I tracked the bugs and fixed them everything works as a charm. The only thing that bothers me is that the original quota binary couldn't work with anything but ext2 file systems due to the bug in the macro shown above. It especially couldn't work with NFS because somebody who made that Red Hat patch thinks its not a valid filesystem for quota (sic!). I wonder if anybody in Red Hat tested this with anything else except local ext2 partitions? I've checked and rechecked the mounting and from other systems. I have about 130 red hat linux 6.2 boxes (mostly 2.2.19-6.2.1) with quota 2.00 mounting a rhl 6.2 server (2.2.17) running rquotad from quota 2.00(pre3) quotas work just fine from the 6.2 and the one 7.0 box I have. And they are making rpc calls (I checked this in strace). On 7.1 no rpc calls - and I stepped through it in gdb and it appears that they don't even determine that the disks are nfs mounted at all. I agree though, this was clearly never tested on nfs. I've tested this using rh 7.1 client and server now. I've used both nfsv2 and v3 for the mount and I've verified that rquotad is running and working on the server by mounting and testing from a rhl 6.2 box and checking the quotas. The patch provided above does not seem to detect that the nfs mount is an nfs mount at all. zvevzdan - can you check it on your end mounting a linux server and see if you can see where the problem is? I'll see what I can come up with. The handling of grace-time over the net also seems to be broken, the absolute limit is what gets transferred via the RPC, but it should be the number of seconds left that should be transferred. Here's a patch: --- ../quota-3.00.orig/quota.c Thu Jun 7 18:21:06 2001 +++ ./quota.c Thu Jun 7 18:07:08 2001 @@ -112,14 +112,25 @@ /* Convert network format to our format */ void rquota2dqblk(struct mem_dqblk *dqb, rquota *rq) { + time_t now; + + time(&now); dqb->dqb_bhardlimit = rq->rq_bhardlimit; dqb->dqb_bsoftlimit = rq->rq_bsoftlimit; dqb->dqb_curspace = rq->rq_curblocks << QUOTABLOCK_BITS; dqb->dqb_ihardlimit = rq->rq_fhardlimit; dqb->dqb_isoftlimit = rq->rq_fsoftlimit; dqb->dqb_curinodes = rq->rq_curfiles; - dqb->dqb_btime = rq->rq_btimeleft; - dqb->dqb_itime = rq->rq_ftimeleft; + if (rq->rq_btimeleft) { + dqb->dqb_btime = rq->rq_btimeleft + now; + } else { + dqb->dqb_btime = 0; + } + if (dqb->dqb_itime) { + dqb->dqb_itime = rq->rq_ftimeleft + now; + } else { + dqb->dqb_itime = 0; + } } /* --- ../quota-3.00.orig/rquota_server.c Thu Jun 7 18:21:07 2001 +++ ./rquota_server.c Thu Jun 7 18:18:54 2001 @@ -70,14 +70,25 @@ static void dqblk2rquota(rquota *rq, struct mem_dqblk *dqb) { + time_t now; + + time(&now); rq->rq_bhardlimit = dqb->dqb_bhardlimit; rq->rq_bsoftlimit = dqb->dqb_bsoftlimit; rq->rq_curblocks = toqb(dqb->dqb_curspace); rq->rq_fhardlimit = dqb->dqb_ihardlimit; rq->rq_fsoftlimit = dqb->dqb_isoftlimit; rq->rq_curfiles = dqb->dqb_curinodes; - rq->rq_btimeleft = dqb->dqb_btime; - rq->rq_ftimeleft = dqb->dqb_itime; + if (dqb->dqb_btime) { + rq->rq_btimeleft = dqb->dqb_btime - now; + } else { + rq->rq_btimeleft = 0; + } + if (rq->rq_ftimeleft) { + rq->rq_ftimeleft = dqb->dqb_itime - now; + } else { + rq->rq_ftimeleft = 0; + } } static getquota_rslt *getquotainfo(int flags, caddr_t *argp, struct svc_req * rqstp) I built a new rpm based on quota-3.01pre7 from the linux-quota folks (housed at sourceforge) this release (with one patch for the rpc_quota size divisor) fixes the problems I had. go here to grab the srpm: http://www.dulug.duke.edu/~skvidal/misc/quota/quota-3.01pre7-2.src.rpm if someone has a solaris nfs/quota server and could test it I would appreciate it. I've tested your patched version of quota on a RedHat 7.1 client (2.4.2-2) with NFS mounts from Solaris file servers (5.7 && SunOS 4.1.4). It is now communicating properly and displaying the correct quotas. On addendum - the quota-rpc.patch that I applied to the stock quota-3.01pre7 is not necessary. That patch only corrects a problem if you were using the rpc.rquotad that came with nfs-utils. Would you like to beta test some new quota RPMs? They are available at: http://people.redhat.com/pbrown/quota-3.01pre8-1.i386.rpm I would appreciate your feedback on this package. I tested quota-3.01pre8-1.i386.rpm and it works fine in my environment: Linux workstation mounting quota enabled file systems from a Solaris server. Here's output: Disk quotas for user zvezdan (uid <number here>): Filesystem blocks quota limit grace files quota limit grace <servername>:/export/home/<servername>9 26369 30000 33000 1940 0 0 One thing I didn't like though is that there are file conflicts with glibc-devel. I deinstalled rpm and put back my patched version and original glibc-devel back. I expect an official update eagerly. Seems to work OK. I'll put it into production use as soon as the diffs between quota-3.01pre8-1 and quota-3.01pre8 are made public. OOPS, talking too quickly. quotaon doesn't work. ./quotaon -v /dev/hda6 quotaon: using /export/work2/quota.user on /dev/hda6: No such file or directory should be using aquota.user, since that is what quotacheck generates... The original (RedHat) 7.1 quotaon does: quotaon -v /dev/hda6 Turning user quotas on for device /dev/hda6 (/export/work2)...done For quota-3.01pre8-1.i386.rpm, I create a link from quota.user to aquota.user. It seems OK. OK, this is being fixed. Hi, Even by updating to quota-3.01pre9-0.7.1 I still have the following problems. 1. I can see the groups coming from NIS 2. I can set limits to these groups 3. Limits are not enforced to NIS groups 4. Info for quota for these groups show as 0 (file size, file count). 5. I can set limits to NIS users and limit enforcement works. My fstab entry for the partition is: /dev/sdb1 /extra ext2 exec,dev,suid,rw,usrquota,grpquota 1 3 I'm using quota-3.01pre9-0.7.1 Notes: [root@xxx /extra]# quota -g nisgroup Disk quotas for group nisgroup (gid 600): none Thanks for the help. -rizzo This seems to be a duplicate off #34472 which I cannot reproduce on RedHat 7.3. The issue nevertheless remains because now the server-side is completely broken, see #73608. Sigh. cu andreas See also new bug #90939. I've not seen this bug in quota in about a year now. Closing as currentrelease. If it's still a problem on a supported release then reopen it. |