2003-09-04 16:17:13

by David Dougall

[permalink] [raw]
Subject: rquotad solution

I feel quite silly responding to my own query.
I was mistaken in saying my older servers ran nfs-utils-1.0.1. They did
have this, but were not using rpc.rquotad. I was using rpc.rquotad from
the quota package.
nfs-utils rquotad only supports ext2 and ext3 so my xfs filesystems were
not working.

Also, whoever is in charge of the rpc.rquotad portion of
nfs-utils package, the following patch seems to make more sense detecting
currently mounted filesystems rather than only what is in /etc/fstab.
--David Dougall


diff -ur nfs-utils-1.0.5/utils/rquotad/mntent.h
nfs-utils-1.0.5-new/utils/rquotad/mntent.h
--- nfs-utils-1.0.5/utils/rquotad/mntent.h Tue May 9 18:36:19 2000
+++ nfs-utils-1.0.5-new/utils/rquotad/mntent.h Thu Sep 4 10:12:34 2003
@@ -4,7 +4,7 @@
#include <features.h>

#define MNTTAB "/etc/fstab"
-#define MOUNTED "/etc/mtab"
+#define MOUNTED "/proc/mounts"

#define MNTMAXSTR 512

diff -ur nfs-utils-1.0.5/utils/rquotad/rquota_server.c
nfs-utils-1.0.5-new/utils/rquotad/rquota_server.c
--- nfs-utils-1.0.5/utils/rquotad/rquota_server.c Wed Jun 27
10:45:56 2001
+++ nfs-utils-1.0.5-new/utils/rquotad/rquota_server.c Thu Sep 4
10:12:49 2003
@@ -108,7 +108,7 @@
}
}

- fp = setmntent(MNTTAB, "r");
+ fp = setmntent(MOUNTED, "r");
while ((mnt = getmntent(fp)) != (struct mntent *)0) {
if (stat(mnt->mnt_dir, &stm) == -1)
continue;



______________________________________
Inflex Virus Scanner - installed on mailserver for domain @et.byu.edu
Queries to: [email protected]


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs