quota only displays the first automounted file-system

Bug #120490 reported by matthias
14
Affects Status Importance Assigned to Milestone
quota (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: quota

Hi Everybody!

I have a feisty 7.04 (2.6.20-16-server kernel) installation where the home-directories are imported by the automounter over nfs from our server user information is pulled via ldap from the same server. Quota displays the actual quotas correctly. However, only the first entry in /etc/mtab is shown. This leads to a situation where correct output is only generated if only one user is logged in.

In my setup the error is not very severe since the /home quotas on the server are defined for the whole /home volume (and not for each user separately), so user2 will see this output:

Disk quotas for user user2 (uid 1002):
     Filesystem blocks quota limit grace files quota limit grace
server:/home/user1
                6725016 15000000 15500000 57564 0 0

...which is the correct quota for user2 but it is slightly misleading for my users as not their own home directory is mentioned in the output but only the directory of the fist user who logged into the machine (and hence created the first entry in /etc/mtab). In my two user example I would expect this output:

Disk quotas for user user2 (uid 1002):
     Filesystem blocks quota limit grace files quota limit grace
server:/home/user1
                6725016 15000000 15500000 57564 0 0
server:/home/user2
                6725016 15000000 15500000 57564 0 0

quota -v gives exactly the same result.

Cheers,
Matthias

Tags: jaunty
Revision history for this message
Adam Niedling (krychek) wrote :

Feisty is not supported anymore.

Changed in quota:
status: New → Invalid
Revision history for this message
Alexander Perlis (alexanderperlis) wrote :

Same bug exists in 8.04 Hardy LTS.

Revision history for this message
Adam Niedling (krychek) wrote :

Thanks for the update.

Changed in quota:
status: Invalid → New
Revision history for this message
Ian Taylor (ibtaylor) wrote :

Is this really a bug?

Doesn't user1 have a quota for the /home/user2 mount point since /home/user1 and /home/user2 are on the same filesystem? (He just can't create anything there due to permissions).

It's annoying and I'm looking for a solution, but it doesn't seem like the quota tool should treat it as a special case.

Anyone know how to make this cleaner?

Revision history for this message
Alexander Perlis (alexanderperlis) wrote : Re: [Bug 120490] Re: quota only displays the first automounted file-system

Ian Taylor asked:

> Is this really a bug?

It's not a "bug" insofar as functionality is concerned: the quota numbers are reported correctly, quotas are enforced correctly. It
is simply confusing to user1 that when they issue "quota" they
are misled into believing someone else's quota is being reported.

> Doesn't user1 have a quota for the /home/user2 mount point
> since /home/user1 and /home/user2 are on the same filesystem?
> (He just can't create anything there due to permissions).

Yes. In fact, now that I think about it, the quota tool has no way of knowing, when
there are multiple mountpoints for the same file system, *which* one to
display in its output, i.e., which one will cause the least confusion.

Currently, I believe it simply shows the *first* mountpoint. (Command "quota -A" shows all of them.)

> It's annoying and I'm looking for a solution, but it doesn't
> seem like the quota tool should treat it as a special case.
> Anyone know how to make this cleaner?

The following logic might cover the majority of cases:

  (1) With the "-A" option, proceed as today: show all mountpoints in output.

  (2) Without "-A", for a given filesystem that would lead to a line of output, first build a list in memory of all the mountpoints for that filesystem.

    (2A) If the home directory path (of the uid on which quota is currently reporting) appears at or below at least one of the members of the list from (2), then prune that list, keeping only the entries that involve the home directory path. (But if none of the entries contain the home directory, then don't prune at all.)

    (2B) From the list that remains, print out the first entry.

    (2C) If the list contains more than one entry, set a boolean flag for (3) below.

  (3) After all filesystems are reported, check the flag from (2C), and append a message at the end, "At least one reported filesystem has multiple mountpoints. Use -A to see all mountpoints."

With this logic, I believe in most cases user1 will see output involving a mountpoint that looks familiar to them. But if not, at least they get a message telling them to try again with "-A", and then they'll hopefully find the line they're expecting to see. Ultimately, I believe the proposed logic will reduce user confusion.

Thanks.
Alexander

Revision history for this message
xteejx (xteejx) wrote :

Can you confirm if this is fixed/implemented in Jaunty. Thank you.

Changed in quota (Ubuntu):
status: New → Incomplete
Revision history for this message
matthias (matthias-lein) wrote :

Hi there,

nope - the behaviour in jaunty is exactly the same as in hardy and gutsy.

Cheers,
Matthias

Revision history for this message
xteejx (xteejx) wrote :

I believe there is enough information here for a developer to begin work, therefore I am marking this as Triaged. Setting Low importance - does not affect core functionality.

Changed in quota (Ubuntu):
importance: Undecided → Low
status: Incomplete → Triaged
xteejx (xteejx)
tags: added: jaunty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.