Discussion:
quotas on nfs share
Aldo Foot
2009-08-12 23:59:55 UTC
Permalink
I cannot enabled quotas over NFS.
I spent some time on this and eSearched but I've hit a bump.

I have a CentOS 5.3 server with a filesystem configured with
quotas. Quotas works locally. I've exported this filesystem to a client.
The client is an F11 machine on which I can mount the export,
but cannot enable quotas on the mount.

The rpc.rquotad is running on both ends.

Is it possible to enable quotas over NFS with CentOS/Fedora?
Some other people claim they've done it with Ubuntu.

Any ideas, links, pointers appreciated.
~af
Aldo Foot
2009-08-13 00:28:15 UTC
Permalink
I wanted to add the command I use at the client.

client> mount -t nfs -o rw -o usrquota server:/mnt/p1 /mnt/p1

usrquota is not listed in the mount options. Why?

client> mount -l | grep p1
server:/mnt/p1 on /mnt/p1 type nfs (rw,addr=xxx.xxx.xxx.xxx)
Sam Varshavchik
2009-08-13 00:38:09 UTC
Permalink
Post by Aldo Foot
I wanted to add the command I use at the client.
client> mount -t nfs -o rw -o usrquota server:/mnt/p1 /mnt/p1
usrquota is not listed in the mount options. Why?
client> mount -l | grep p1
server:/mnt/p1 on /mnt/p1 type nfs (rw,addr=xxx.xxx.xxx.xxx)
It seems to me that quotas, if any, would need to be enabled or implemented
on the server, and not the client. This client has no clue, of course, if
any other client is mounting the same export on the server. Some other
client may very well be creating files, using the same userid, which impacts
the user's quota.

Therefore, logically, if there's something that needs to be done to
implement quotas, you'll want to look on the server, not the cient.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20090812/1484c433/attachment.bin
Aldo Foot
2009-08-13 00:56:45 UTC
Permalink
Post by Sam Varshavchik
It seems to me that quotas, if any, would need to be enabled or implemented
on the server, and not the client. This client has no clue, of course, if
any other client is mounting the same export on the server. Some other
client may very well be creating files, using the same userid, which impacts
the user's quota.
Therefore, logically, if there's something that needs to be done to
implement quotas, you'll want to look on the server, not the cient.
_____

You're correct. All quota setup is done at the server. That's what
I've done. Quotas
are working in the server.

I put this line on the server's /etc/fstab.
"/dev/hdd5 /mnt/p1 ext3
defaults,usrquota,grpquota 1 2"

The mount command does have a "usrquota" mount option. See man page.
I used that option; see previous email. So when you mount at the client, you
tell it you want to use quotas with the "usrquota" option.

Also, /etc/exports says that "usrquota" is not an export option.

Even though I mount with the usrquota option, the client does not see a
filesystem with quotas.

client> edquota jdoe
No filesystems with quota detected.

client> quotacheck -cugm /mnt/p1
quotacheck: Cannot find filesystem to check or filesystem not mounted
with quota option.

I'd really love to solve this one. According to me eSearch, just about
everyone who ever tried to solve this problem, went out without an answer.
This fedora list has to have something... ;-)

thanks a bunch for the reply.
~af
Sam Varshavchik
2009-08-13 01:08:33 UTC
Permalink
Post by Aldo Foot
You're correct. All quota setup is done at the server. That's what
I've done. Quotas
are working in the server.
If they're working on the server, the server should then enforce the quota,
whether the files are accessed directly from the server, or from the client.
Post by Aldo Foot
Even though I mount with the usrquota option, the client does not see a
filesystem with quotas.
client> edquota jdoe
No filesystems with quota detected.
client> quotacheck -cugm /mnt/p1
quotacheck: Cannot find filesystem to check or filesystem not mounted
with quota option.
I'd really love to solve this one. According to me eSearch, just about
everyone who ever tried to solve this problem, went out without an answer.
Why don't you try to blow through the user's quota, from the client. I
suspect that you'll run into a brick wall, when the user's quota is used up.

The issue is probably not that the quota doesn't work, but just that the
client does not report the quota on the server.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20090812/afbfb5e7/attachment.bin
Aldo Foot
2009-08-13 01:56:34 UTC
Permalink
<.....>
Post by Sam Varshavchik
Why don't you try to blow through the user's quota, from the client. I
suspect that you'll run into a brick wall, when the user's quota is used up.
That works on the server for an account local to the server.
Post by Sam Varshavchik
The issue is probably not that the quota doesn't work, but just that the
client does not report the quota on the server.
Here's my thinking --correct me if I'm wrong.
Quotas are enforced at the server in the /etc/fstab on a filesystem.
You enforce quotas on a given user account on the server for a
filesystem; this account lives on the server and it's different from
any account on the client. So the quota settings for an account on the
server do not apply on the client.
When you're at the client, you mount a filesystem with quotas enabled,
then on the client edit quotas for a local account on the client.

~af
Aldo Foot
2009-08-13 01:56:34 UTC
Permalink
<.....>
Post by Sam Varshavchik
Why don't you try to blow through the user's quota, from the client. I
suspect that you'll run into a brick wall, when the user's quota is used up.
That works on the server for an account local to the server.
Post by Sam Varshavchik
The issue is probably not that the quota doesn't work, but just that the
client does not report the quota on the server.
Here's my thinking --correct me if I'm wrong.
Quotas are enforced at the server in the /etc/fstab on a filesystem.
You enforce quotas on a given user account on the server for a
filesystem; this account lives on the server and it's different from
any account on the client. So the quota settings for an account on the
server do not apply on the client.
When you're at the client, you mount a filesystem with quotas enabled,
then on the client edit quotas for a local account on the client.

~af
Rick Stevens
2009-08-13 01:28:11 UTC
Permalink
Post by Aldo Foot
Post by Sam Varshavchik
It seems to me that quotas, if any, would need to be enabled or implemented
on the server, and not the client. This client has no clue, of course, if
any other client is mounting the same export on the server. Some other
client may very well be creating files, using the same userid, which impacts
the user's quota.
Therefore, logically, if there's something that needs to be done to
implement quotas, you'll want to look on the server, not the cient.
_____
You're correct. All quota setup is done at the server. That's what
I've done. Quotas
are working in the server.
I put this line on the server's /etc/fstab.
"/dev/hdd5 /mnt/p1 ext3
defaults,usrquota,grpquota 1 2"
The mount command does have a "usrquota" mount option. See man page.
The man page states that "usrquota" is only valid for affs,
ext2/ext3/ext4, jfs, and xfs filesystems.
Post by Aldo Foot
I used that option; see previous email. So when you mount at the client, you
tell it you want to use quotas with the "usrquota" option.
Also, /etc/exports says that "usrquota" is not an export option.
Even though I mount with the usrquota option, the client does not see a
filesystem with quotas.
client> edquota jdoe
No filesystems with quota detected.
client> quotacheck -cugm /mnt/p1
quotacheck: Cannot find filesystem to check or filesystem not mounted
with quota option.
I'd really love to solve this one. According to me eSearch, just about
everyone who ever tried to solve this problem, went out without an answer.
This fedora list has to have something... ;-)
thanks a bunch for the reply.
Have you tried "quotaon /NFS/mountpoint" on the client?
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer ricks at nerd.com -
- AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 -
- -
- Never eat anything larger than your head -
----------------------------------------------------------------------
Aldo Foot
2009-08-13 02:42:00 UTC
Permalink
Post by Rick Stevens
Post by Aldo Foot
The mount command does have a "usrquota" mount option. See man page.
The man page states that "usrquota" is only valid for affs,
ext2/ext3/ext4, jfs, and xfs filesystems.
Hmm... that's a very good observation . Thanks Rick.
Nothing is said about nfs filesystems.
Post by Rick Stevens
Have you tried "quotaon /NFS/mountpoint" on the client?
Nothing seems to work for that nfs mount point on the client.

client> quotaon /mnt/p1
quotaon: Mountpoint (or device) /mnt/p1 not found or has no quota enabled.

client> quotacheck -cugm /mnt/p1
quotacheck: Cannot find filesystem to check or filesystem not mounted
with quota option.

client> repquota /mnt/p1
repquota: Mountpoint (or device) /mnt/p1 not found or has no quota enabled.
repquota: Not all specified mountpoints are using quota.

I've got this version of quota on the client.
client> rpm -qa | grep quota
quota-3.17-4.fc11.i586

On the client, I created a partition and enabled quotas just to check that, at
least locally, it works.

client> repquota /mnt/p2
*** Report for user quotas on device /dev/sda9
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 1167 0 0 4 0 0


And just to add another informative detail, the quota related files do
exist in the
server exported filesystem.
server> ls -l /mnt/p1
total 30
-rw------- 1 root root 7168 Aug 12 18:15 aquota.group
-rw------- 1 root root 7168 Aug 12 18:29 aquota.user

I cannot believe that it's not possible to enable nfs quotas *on fedora* at all.
I guess this is not done frequently enough to catch people's attention.

any comments? what am I missing?
~af
Chris Adams
2009-08-13 04:25:49 UTC
Permalink
Post by Aldo Foot
I cannot believe that it's not possible to enable nfs quotas *on fedora* at all.
I guess this is not done frequently enough to catch people's attention.
With NFS, quotas are set up on the server's underlying filesystem. You
then run rpc.rquotad on the server (which the Fedora nfs init script
starts by default).

I just set up quotas on my home NFS server (which is still running F9).
I had to reboot to get them enabled on the filesystem (probably could
have unmounted/remounted and then restarted NFS services, but this box
reboots in under a minute anyway). I can see them with the quota
command on the NFS client, and they are enforced.

If you want to edit quotas remotely, you have to use the -r option to
edquota. This also requires adding the -S option to the rpc.rquotad
call (in /etc/sysconfig/nfs on Fedora), but only works in rpc.rquotad
was compiled with that support; the version in F9 and F10 was not, but
F11 includes this support.

None of the other quota commands (such as quotacheck, quotaon, etc.)
work on the NFS client, because those operate directly on the local
filesystem only.

All of this works fine for me between an F9 NFS server and an F11 NFS
client, except for the rpc.rquotad -S option (which should work when I
get the NFS server upgraded).
--
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
Aldo Foot
2009-08-14 00:01:00 UTC
Permalink
Post by Aldo Foot
I cannot believe that it's not possible to enable nfs quotas *on fedora* at all.
I guess this is not done frequently enough to catch people's attention.
With NFS, quotas are set up on the server's underlying filesystem. ?You
then run rpc.rquotad on the server (which the Fedora nfs init script
starts by default).
I just set up quotas on my home NFS server (which is still running F9).
I had to reboot to get them enabled on the filesystem (probably could
have unmounted/remounted and then restarted NFS services, but this box
reboots in under a minute anyway). ?I can see them with the quota
command on the NFS client, and they are enforced.
If you want to edit quotas remotely, you have to use the -r option to
edquota. ?This also requires adding the -S option to the rpc.rquotad
call (in /etc/sysconfig/nfs on Fedora), but only works in rpc.rquotad
was compiled with that support; the version in F9 and F10 was not, but
F11 includes this support.
None of the other quota commands (such as quotacheck, quotaon, etc.)
work on the NFS client, because those operate directly on the local
filesystem only.
All of this works fine for me between an F9 NFS server and an F11 NFS
client, except for the rpc.rquotad -S option (which should work when I
get the NFS server upgraded).
_______

Interesting.
From what you say, it appears the only difference is that I have a
CentOS server and an F11 client. So far, I've only used remount to
enable the quotas on the server. I'll see what reboot does. I'll try
the 'edquota -r'.

I'm don't have access to the computers at this time.
I'll try next week and post back
Thanks for taking the time.
~af
Chris Adams
2009-08-14 00:08:35 UTC
Permalink
Post by Aldo Foot
From what you say, it appears the only difference is that I have a
CentOS server and an F11 client. So far, I've only used remount to
enable the quotas on the server. I'll see what reboot does. I'll try
the 'edquota -r'.
"mount -o remount" will not actually enable quotas, at least on ext3.
usrquota and grpquota are not options that can be changed while the
filesystem is mounted.

You must unmount the filesystem and mount it with quotas enabled or
reboot the server.
--
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
Aldo Foot
2009-08-14 00:20:58 UTC
Permalink
Post by Chris Adams
Post by Aldo Foot
From what you say, it appears the only difference is that I have a
CentOS server and an F11 client. So far, I've only used remount to
enable the quotas on the server. I'll see what reboot does. I'll try
the 'edquota -r'.
"mount -o remount" will not actually enable quotas, at least on ext3.
usrquota and grpquota are not options that can be changed while the
filesystem is mounted.
You must unmount the filesystem and mount it with quotas enabled > or reboot the server.
______

Actually, I have tested this in the CentOS environment. The remount
does work... I actually *wanted* to know whether that was enough, and
it was. The idea being that often times a filesystem cannot be
unmouted because of production requirements. Nevertheless I will no
rest until I reboot the machine and see what effect it has in getting
an answer.

thanks.
~af
Aldo Foot
2009-08-14 00:20:58 UTC
Permalink
Post by Chris Adams
Post by Aldo Foot
From what you say, it appears the only difference is that I have a
CentOS server and an F11 client. So far, I've only used remount to
enable the quotas on the server. I'll see what reboot does. I'll try
the 'edquota -r'.
"mount -o remount" will not actually enable quotas, at least on ext3.
usrquota and grpquota are not options that can be changed while the
filesystem is mounted.
You must unmount the filesystem and mount it with quotas enabled > or reboot the server.
______

Actually, I have tested this in the CentOS environment. The remount
does work... I actually *wanted* to know whether that was enough, and
it was. The idea being that often times a filesystem cannot be
unmouted because of production requirements. Nevertheless I will no
rest until I reboot the machine and see what effect it has in getting
an answer.

thanks.
~af
Chris Adams
2009-08-14 00:08:35 UTC
Permalink
Post by Aldo Foot
From what you say, it appears the only difference is that I have a
CentOS server and an F11 client. So far, I've only used remount to
enable the quotas on the server. I'll see what reboot does. I'll try
the 'edquota -r'.
"mount -o remount" will not actually enable quotas, at least on ext3.
usrquota and grpquota are not options that can be changed while the
filesystem is mounted.

You must unmount the filesystem and mount it with quotas enabled or
reboot the server.
--
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
Aldo Foot
2009-08-19 21:31:34 UTC
Permalink
On Wed, Aug 12, 2009 at 9:25 PM, Chris Adams<cmadams at hiwaay.net> wrote:
<...snip...>
Post by Chris Adams
If you want to edit quotas remotely, you have to use the -r option to
edquota. ?This also requires adding the -S option to the rpc.rquotad
call (in /etc/sysconfig/nfs on Fedora), but only works in rpc.rquotad
was compiled with that support; the version in F9 and F10 was not, but
F11 includes this support.
I wanted to report back on this.
Post by Chris Adams
From my f11 box I tested using 'edquota -r' and it does see the nfs export
with quotas in it. I tried to edit quotas by entering numbers, but I cannot
save the changes because, unfortunately, my Centos 5.3 server does not
support the -S option to rpc.quotad, even tough the rquotad man page explicitly
mentions the "-S, --setquota" options.
I modified the CentOS server /etc/sysconfig/nfs options, but rquotad does
not like -S.

The CentOS server log registers the setquota problem.
"rpc.rquotad: host xxx.xxx.xxx.xxx attempted to call setquota when disabled"

I'll be asking about this in the CentOS mailing list. If anyone here knows
about the subject, please share.

~af
Chris Adams
2009-08-19 23:35:57 UTC
Permalink
Post by Aldo Foot
<...snip...>
Post by Chris Adams
If you want to edit quotas remotely, you have to use the -r option to
edquota. ?This also requires adding the -S option to the rpc.rquotad
call (in /etc/sysconfig/nfs on Fedora), but only works in rpc.rquotad
was compiled with that support; the version in F9 and F10 was not, but
F11 includes this support.
I wanted to report back on this.
Post by Chris Adams
From my f11 box I tested using 'edquota -r' and it does see the nfs export
with quotas in it. I tried to edit quotas by entering numbers, but I cannot
save the changes because, unfortunately, my Centos 5.3 server does not
support the -S option to rpc.quotad, even tough the rquotad man page explicitly
mentions the "-S, --setquota" options.
I modified the CentOS server /etc/sysconfig/nfs options, but rquotad does
not like -S.
Since CentOS is based on RHEL, the newest RHEL is RHEL 5, RHEL 5 is
based on FC6, and this option wasn't enabled in Fedora until F11 (hey, I
can chain logic :-) ), I'm not suprised it isn't enabled in CentOS.

I believe CentOS tries to stay as close to RHEL as possible, so I
wouldn't expect them to change this unless Red Hat does. I am kind of
suprised that Red Hat doesn't have this enabled though; there is a bug
request to have this changed:

https://bugzilla.redhat.com/show_bug.cgi?id=469753

Another bug:

https://bugzilla.redhat.com/show_bug.cgi?id=497013

it is stated that this will not change for RHEL 5. Maybe this will
change for RHEL 6 (since it is now enabled in F11).
--
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
Aldo Foot
2009-08-20 00:12:33 UTC
Permalink
<...snip>
Post by Chris Adams
Post by Aldo Foot
Post by Chris Adams
From my f11 box I tested using 'edquota -r' and it does see the nfs export
with quotas in it. I tried to edit quotas by entering numbers, but I cannot
save the changes because, unfortunately, my Centos 5.3 server does not
support the -S option to rpc.quotad, even tough the rquotad man page explicitly
mentions the "-S, --setquota" options.
I modified the CentOS server /etc/sysconfig/nfs options, but rquotad does
not like -S.
Since CentOS is based on RHEL, the newest RHEL is RHEL 5, RHEL 5 is
based on FC6, and this option wasn't enabled in Fedora until F11 (hey, I
can chain logic :-) ), I'm not suprised it isn't enabled in CentOS.
I believe CentOS tries to stay as close to RHEL as possible, so I
wouldn't expect them to change this unless Red Hat does. ?I am kind of
suprised that Red Hat doesn't have this enabled though; there is a bug
https://bugzilla.redhat.com/show_bug.cgi?id=469753
https://bugzilla.redhat.com/show_bug.cgi?id=497013
it is stated that this will not change for RHEL 5. ?Maybe this will
change for RHEL 6 (since it is now enabled in F11).
--
Chris Adams <cmadams at hiwaay.net>
______

For once there is proper closure and understanding on this subject.
I *really* thank you for taking the time to clarify this for me... I'm
sending you
a nice CCC (cyber cup of coffee) your way. :-)

I'll see if I can recompile the quota srpm and make it work for CentOS 5.3.
~af
Aldo Foot
2009-08-20 00:12:33 UTC
Permalink
<...snip>
Post by Chris Adams
Post by Aldo Foot
Post by Chris Adams
From my f11 box I tested using 'edquota -r' and it does see the nfs export
with quotas in it. I tried to edit quotas by entering numbers, but I cannot
save the changes because, unfortunately, my Centos 5.3 server does not
support the -S option to rpc.quotad, even tough the rquotad man page explicitly
mentions the "-S, --setquota" options.
I modified the CentOS server /etc/sysconfig/nfs options, but rquotad does
not like -S.
Since CentOS is based on RHEL, the newest RHEL is RHEL 5, RHEL 5 is
based on FC6, and this option wasn't enabled in Fedora until F11 (hey, I
can chain logic :-) ), I'm not suprised it isn't enabled in CentOS.
I believe CentOS tries to stay as close to RHEL as possible, so I
wouldn't expect them to change this unless Red Hat does. ?I am kind of
suprised that Red Hat doesn't have this enabled though; there is a bug
https://bugzilla.redhat.com/show_bug.cgi?id=469753
https://bugzilla.redhat.com/show_bug.cgi?id=497013
it is stated that this will not change for RHEL 5. ?Maybe this will
change for RHEL 6 (since it is now enabled in F11).
--
Chris Adams <cmadams at hiwaay.net>
______

For once there is proper closure and understanding on this subject.
I *really* thank you for taking the time to clarify this for me... I'm
sending you
a nice CCC (cyber cup of coffee) your way. :-)

I'll see if I can recompile the quota srpm and make it work for CentOS 5.3.
~af

Chris Adams
2009-08-19 23:35:57 UTC
Permalink
Post by Aldo Foot
<...snip...>
Post by Chris Adams
If you want to edit quotas remotely, you have to use the -r option to
edquota. ?This also requires adding the -S option to the rpc.rquotad
call (in /etc/sysconfig/nfs on Fedora), but only works in rpc.rquotad
was compiled with that support; the version in F9 and F10 was not, but
F11 includes this support.
I wanted to report back on this.
Post by Chris Adams
From my f11 box I tested using 'edquota -r' and it does see the nfs export
with quotas in it. I tried to edit quotas by entering numbers, but I cannot
save the changes because, unfortunately, my Centos 5.3 server does not
support the -S option to rpc.quotad, even tough the rquotad man page explicitly
mentions the "-S, --setquota" options.
I modified the CentOS server /etc/sysconfig/nfs options, but rquotad does
not like -S.
Since CentOS is based on RHEL, the newest RHEL is RHEL 5, RHEL 5 is
based on FC6, and this option wasn't enabled in Fedora until F11 (hey, I
can chain logic :-) ), I'm not suprised it isn't enabled in CentOS.

I believe CentOS tries to stay as close to RHEL as possible, so I
wouldn't expect them to change this unless Red Hat does. I am kind of
suprised that Red Hat doesn't have this enabled though; there is a bug
request to have this changed:

https://bugzilla.redhat.com/show_bug.cgi?id=469753

Another bug:

https://bugzilla.redhat.com/show_bug.cgi?id=497013

it is stated that this will not change for RHEL 5. Maybe this will
change for RHEL 6 (since it is now enabled in F11).
--
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
Aldo Foot
2009-08-14 00:01:00 UTC
Permalink
Post by Aldo Foot
I cannot believe that it's not possible to enable nfs quotas *on fedora* at all.
I guess this is not done frequently enough to catch people's attention.
With NFS, quotas are set up on the server's underlying filesystem. ?You
then run rpc.rquotad on the server (which the Fedora nfs init script
starts by default).
I just set up quotas on my home NFS server (which is still running F9).
I had to reboot to get them enabled on the filesystem (probably could
have unmounted/remounted and then restarted NFS services, but this box
reboots in under a minute anyway). ?I can see them with the quota
command on the NFS client, and they are enforced.
If you want to edit quotas remotely, you have to use the -r option to
edquota. ?This also requires adding the -S option to the rpc.rquotad
call (in /etc/sysconfig/nfs on Fedora), but only works in rpc.rquotad
was compiled with that support; the version in F9 and F10 was not, but
F11 includes this support.
None of the other quota commands (such as quotacheck, quotaon, etc.)
work on the NFS client, because those operate directly on the local
filesystem only.
All of this works fine for me between an F9 NFS server and an F11 NFS
client, except for the rpc.rquotad -S option (which should work when I
get the NFS server upgraded).
_______

Interesting.
From what you say, it appears the only difference is that I have a
CentOS server and an F11 client. So far, I've only used remount to
enable the quotas on the server. I'll see what reboot does. I'll try
the 'edquota -r'.

I'm don't have access to the computers at this time.
I'll try next week and post back
Thanks for taking the time.
~af
Aldo Foot
2009-08-19 21:31:34 UTC
Permalink
On Wed, Aug 12, 2009 at 9:25 PM, Chris Adams<cmadams at hiwaay.net> wrote:
<...snip...>
Post by Chris Adams
If you want to edit quotas remotely, you have to use the -r option to
edquota. ?This also requires adding the -S option to the rpc.rquotad
call (in /etc/sysconfig/nfs on Fedora), but only works in rpc.rquotad
was compiled with that support; the version in F9 and F10 was not, but
F11 includes this support.
I wanted to report back on this.
Post by Chris Adams
From my f11 box I tested using 'edquota -r' and it does see the nfs export
with quotas in it. I tried to edit quotas by entering numbers, but I cannot
save the changes because, unfortunately, my Centos 5.3 server does not
support the -S option to rpc.quotad, even tough the rquotad man page explicitly
mentions the "-S, --setquota" options.
I modified the CentOS server /etc/sysconfig/nfs options, but rquotad does
not like -S.

The CentOS server log registers the setquota problem.
"rpc.rquotad: host xxx.xxx.xxx.xxx attempted to call setquota when disabled"

I'll be asking about this in the CentOS mailing list. If anyone here knows
about the subject, please share.

~af
Chris Adams
2009-08-13 04:25:49 UTC
Permalink
Post by Aldo Foot
I cannot believe that it's not possible to enable nfs quotas *on fedora* at all.
I guess this is not done frequently enough to catch people's attention.
With NFS, quotas are set up on the server's underlying filesystem. You
then run rpc.rquotad on the server (which the Fedora nfs init script
starts by default).

I just set up quotas on my home NFS server (which is still running F9).
I had to reboot to get them enabled on the filesystem (probably could
have unmounted/remounted and then restarted NFS services, but this box
reboots in under a minute anyway). I can see them with the quota
command on the NFS client, and they are enforced.

If you want to edit quotas remotely, you have to use the -r option to
edquota. This also requires adding the -S option to the rpc.rquotad
call (in /etc/sysconfig/nfs on Fedora), but only works in rpc.rquotad
was compiled with that support; the version in F9 and F10 was not, but
F11 includes this support.

None of the other quota commands (such as quotacheck, quotaon, etc.)
work on the NFS client, because those operate directly on the local
filesystem only.

All of this works fine for me between an F9 NFS server and an F11 NFS
client, except for the rpc.rquotad -S option (which should work when I
get the NFS server upgraded).
--
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
Aldo Foot
2009-08-13 02:42:00 UTC
Permalink
Post by Rick Stevens
Post by Aldo Foot
The mount command does have a "usrquota" mount option. See man page.
The man page states that "usrquota" is only valid for affs,
ext2/ext3/ext4, jfs, and xfs filesystems.
Hmm... that's a very good observation . Thanks Rick.
Nothing is said about nfs filesystems.
Post by Rick Stevens
Have you tried "quotaon /NFS/mountpoint" on the client?
Nothing seems to work for that nfs mount point on the client.

client> quotaon /mnt/p1
quotaon: Mountpoint (or device) /mnt/p1 not found or has no quota enabled.

client> quotacheck -cugm /mnt/p1
quotacheck: Cannot find filesystem to check or filesystem not mounted
with quota option.

client> repquota /mnt/p1
repquota: Mountpoint (or device) /mnt/p1 not found or has no quota enabled.
repquota: Not all specified mountpoints are using quota.

I've got this version of quota on the client.
client> rpm -qa | grep quota
quota-3.17-4.fc11.i586

On the client, I created a partition and enabled quotas just to check that, at
least locally, it works.

client> repquota /mnt/p2
*** Report for user quotas on device /dev/sda9
Block grace time: 7days; Inode grace time: 7days
Block limits File limits
User used soft hard grace used soft hard grace
----------------------------------------------------------------------
root -- 1167 0 0 4 0 0


And just to add another informative detail, the quota related files do
exist in the
server exported filesystem.
server> ls -l /mnt/p1
total 30
-rw------- 1 root root 7168 Aug 12 18:15 aquota.group
-rw------- 1 root root 7168 Aug 12 18:29 aquota.user

I cannot believe that it's not possible to enable nfs quotas *on fedora* at all.
I guess this is not done frequently enough to catch people's attention.

any comments? what am I missing?
~af
Sam Varshavchik
2009-08-13 01:08:33 UTC
Permalink
Post by Aldo Foot
You're correct. All quota setup is done at the server. That's what
I've done. Quotas
are working in the server.
If they're working on the server, the server should then enforce the quota,
whether the files are accessed directly from the server, or from the client.
Post by Aldo Foot
Even though I mount with the usrquota option, the client does not see a
filesystem with quotas.
client> edquota jdoe
No filesystems with quota detected.
client> quotacheck -cugm /mnt/p1
quotacheck: Cannot find filesystem to check or filesystem not mounted
with quota option.
I'd really love to solve this one. According to me eSearch, just about
everyone who ever tried to solve this problem, went out without an answer.
Why don't you try to blow through the user's quota, from the client. I
suspect that you'll run into a brick wall, when the user's quota is used up.

The issue is probably not that the quota doesn't work, but just that the
client does not report the quota on the server.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20090812/afbfb5e7/attachment-0001.bin
Rick Stevens
2009-08-13 01:28:11 UTC
Permalink
Post by Aldo Foot
Post by Sam Varshavchik
It seems to me that quotas, if any, would need to be enabled or implemented
on the server, and not the client. This client has no clue, of course, if
any other client is mounting the same export on the server. Some other
client may very well be creating files, using the same userid, which impacts
the user's quota.
Therefore, logically, if there's something that needs to be done to
implement quotas, you'll want to look on the server, not the cient.
_____
You're correct. All quota setup is done at the server. That's what
I've done. Quotas
are working in the server.
I put this line on the server's /etc/fstab.
"/dev/hdd5 /mnt/p1 ext3
defaults,usrquota,grpquota 1 2"
The mount command does have a "usrquota" mount option. See man page.
The man page states that "usrquota" is only valid for affs,
ext2/ext3/ext4, jfs, and xfs filesystems.
Post by Aldo Foot
I used that option; see previous email. So when you mount at the client, you
tell it you want to use quotas with the "usrquota" option.
Also, /etc/exports says that "usrquota" is not an export option.
Even though I mount with the usrquota option, the client does not see a
filesystem with quotas.
client> edquota jdoe
No filesystems with quota detected.
client> quotacheck -cugm /mnt/p1
quotacheck: Cannot find filesystem to check or filesystem not mounted
with quota option.
I'd really love to solve this one. According to me eSearch, just about
everyone who ever tried to solve this problem, went out without an answer.
This fedora list has to have something... ;-)
thanks a bunch for the reply.
Have you tried "quotaon /NFS/mountpoint" on the client?
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer ricks at nerd.com -
- AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 -
- -
- Never eat anything larger than your head -
----------------------------------------------------------------------
Aldo Foot
2009-08-13 00:56:45 UTC
Permalink
Post by Sam Varshavchik
It seems to me that quotas, if any, would need to be enabled or implemented
on the server, and not the client. This client has no clue, of course, if
any other client is mounting the same export on the server. Some other
client may very well be creating files, using the same userid, which impacts
the user's quota.
Therefore, logically, if there's something that needs to be done to
implement quotas, you'll want to look on the server, not the cient.
_____

You're correct. All quota setup is done at the server. That's what
I've done. Quotas
are working in the server.

I put this line on the server's /etc/fstab.
"/dev/hdd5 /mnt/p1 ext3
defaults,usrquota,grpquota 1 2"

The mount command does have a "usrquota" mount option. See man page.
I used that option; see previous email. So when you mount at the client, you
tell it you want to use quotas with the "usrquota" option.

Also, /etc/exports says that "usrquota" is not an export option.

Even though I mount with the usrquota option, the client does not see a
filesystem with quotas.

client> edquota jdoe
No filesystems with quota detected.

client> quotacheck -cugm /mnt/p1
quotacheck: Cannot find filesystem to check or filesystem not mounted
with quota option.

I'd really love to solve this one. According to me eSearch, just about
everyone who ever tried to solve this problem, went out without an answer.
This fedora list has to have something... ;-)

thanks a bunch for the reply.
~af
Sam Varshavchik
2009-08-13 00:38:09 UTC
Permalink
Post by Aldo Foot
I wanted to add the command I use at the client.
client> mount -t nfs -o rw -o usrquota server:/mnt/p1 /mnt/p1
usrquota is not listed in the mount options. Why?
client> mount -l | grep p1
server:/mnt/p1 on /mnt/p1 type nfs (rw,addr=xxx.xxx.xxx.xxx)
It seems to me that quotas, if any, would need to be enabled or implemented
on the server, and not the client. This client has no clue, of course, if
any other client is mounting the same export on the server. Some other
client may very well be creating files, using the same userid, which impacts
the user's quota.

Therefore, logically, if there's something that needs to be done to
implement quotas, you'll want to look on the server, not the cient.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20090812/1484c433/attachment-0001.bin
Aldo Foot
2009-08-12 23:59:55 UTC
Permalink
I cannot enabled quotas over NFS.
I spent some time on this and eSearched but I've hit a bump.

I have a CentOS 5.3 server with a filesystem configured with
quotas. Quotas works locally. I've exported this filesystem to a client.
The client is an F11 machine on which I can mount the export,
but cannot enable quotas on the mount.

The rpc.rquotad is running on both ends.

Is it possible to enable quotas over NFS with CentOS/Fedora?
Some other people claim they've done it with Ubuntu.

Any ideas, links, pointers appreciated.
~af
Aldo Foot
2009-08-13 00:28:15 UTC
Permalink
I wanted to add the command I use at the client.

client> mount -t nfs -o rw -o usrquota server:/mnt/p1 /mnt/p1

usrquota is not listed in the mount options. Why?

client> mount -l | grep p1
server:/mnt/p1 on /mnt/p1 type nfs (rw,addr=xxx.xxx.xxx.xxx)
Loading...