#64 nfs rpc quota not reported for subshares of fsid=0

Jan Kara

This happens with on all kernel and distros, details below:

got the following on the nfs server :
/freespace @hosts(ro,fsid=0,root_squash,no_subtree_check,async)
/freespace/images @hosts(rw,nohide,no_root_squash,no_subtree_check,sync,mp)
/freespace/staff @hosts(rw,nohide,root_squash,no_subtree_check,async,mp)
/freespace/stud @hosts(rw,nohide,root_squash,no_subtree_check,async,mp)
/freespace/msc @hosts(rw,nohide,root_squash,no_subtree_check,async,mp)
/freespace/phd @hosts(rw,nohide,root_squash,no_subtree_check,async,mp)
/freespace/postdoc @hosts(rw,nohide,root_squash,no_subtree_check,async,mp)
/freespace/others @hosts(rw,nohide,root_squash,no_subtree_check,async,mp)
/freespace/segel @hosts(rw,nohide,root_squash,no_subtree_check,async,mp)
/freespace/courses @hosts(rw,nohide,root_squash,no_subtree_check,async,mp)
/freespace/projects @hosts(rw,nohide,root_squash,no_subtree_check,async,mp)

client1 mounting just the fsid=0 share:
amdsrv1 ~ # mount | grep raid-srv
raid-srv:/ on /freespace type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=,addr=
amdsrv1 ~ # quota -vA -F rpc | grep raid-srv
amdsrv1 ~ #

clent2 mount all nfs4 shares explicitly:
amdsrv2 ~ # mount | grep raid-srv
raid-srv:/staff on /freespace/staff type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=,addr=
raid-srv:/stud on /freespace/stud type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=,addr=
raid-srv:/msc on /freespace/msc type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=,addr=
raid-srv:/phd on /freespace/phd type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=,addr=
raid-srv:/postdoc on /freespace/postdoc type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=,addr=
raid-srv:/others on /freespace/others type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=,addr=
raid-srv:/segel on /freespace/segel type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=,addr=
raid-srv:/courses on /freespace/courses type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=,addr=
raid-srv:/projects on /freespace/projects type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=,addr=
amdsrv2 ~ # quota -vA -F rpc | grep raid-srv
raid-srv:/staff 192108 0 0 6 0 0
raid-srv:/stud 202692 0 0 6 0 0
raid-srv:/msc 202656 0 0 5 0 0
raid-srv:/phd 202660 0 0 8 0 0
raid-srv:/segel 195552 0 0 5 0 0
amdsrv2 ~ #


  • Jan Kara

    Jan Kara - 2009-12-21

    Thanks for the report! From you exports, I suppose that /freespace is one filesystem on the server and each subshare (images, stud, staff,...) are separate filesystems. Moreover I'd guess that /freespace does not have quota on its own. Only filesystems carrying subshares are configured to have quota. Therefore if you mount /freespace over NFS directly, quota(1) asks server for quota information on /freespace and it correctly answers there's no quota and thus nothing is shown. If a client would ask for quota information on /freespace/stud server would report quota information there correctly but the client knows only about /freespace and thinks that /freespace/stud is just an ordinary directory and thus has the same quota information as /freespace.

    So unless you want to expose server-internal information about it's mountpoints (currently client has no way of telling whether there are some additional mountpoints in the exported hierarchy), there's no way for quota to properly report all quota information properly. If you decided this is no security issue for you, we could easily tweak quota(1) to allow asking for quota on a directory that does not seem like a mountpoint for it and somehow provide it a list of directories to ask about. Even better server could do this for the client but that would mean changes to the network protocol (and thus possible incompatibilities with other unixes / older versions of the server).

    Any thoughts on this?

  • Jan Kara

    Jan Kara - 2009-12-21
    • assigned_to: nobody --> jkar8572


Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks