Menu

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

open
Jan Kara
None
5
2009-12-21
2009-12-16
Anonymous
No

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=132.72.41.153,addr=132.72.41.65)
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=132.72.41.154,addr=132.72.41.65)
raid-srv:/stud on /freespace/stud type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=132.72.41.154,addr=132.72.41.65)
raid-srv:/msc on /freespace/msc type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=132.72.41.154,addr=132.72.41.65)
raid-srv:/phd on /freespace/phd type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=132.72.41.154,addr=132.72.41.65)
raid-srv:/postdoc on /freespace/postdoc type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=132.72.41.154,addr=132.72.41.65)
raid-srv:/others on /freespace/others type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=132.72.41.154,addr=132.72.41.65)
raid-srv:/segel on /freespace/segel type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=132.72.41.154,addr=132.72.41.65)
raid-srv:/courses on /freespace/courses type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=132.72.41.154,addr=132.72.41.65)
raid-srv:/projects on /freespace/projects type nfs4 (rw,nosuid,ac,proto=tcp,hard,intr,bg,rsize=32768,wsize=32768,clientaddr=132.72.41.154,addr=132.72.41.65)
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:/postdoc
raid-srv:/others
raid-srv:/segel 195552 0 0 5 0 0
raid-srv:/courses
raid-srv:/projects
amdsrv2 ~ #

Discussion

  • 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
     

Anonymous
Anonymous

Add attachments
Cancel