linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Carlos Carvalho <carlos@fisica.ufpr.br>
Cc: Aditya Kali <adityakali@google.com>,
	ext4 development <linux-ext4@vger.kernel.org>,
	Jan Kara <jack@suse.cz>
Subject: Re: how to quotacheck with the new quota implementation (hidden inode)?
Date: Thu, 31 Jan 2013 17:03:12 -0500	[thread overview]
Message-ID: <20130131220312.GA15322@thunk.org> (raw)
In-Reply-To: <20746.49740.638811.698394@fisica.ufpr.br>

On Thu, Jan 31, 2013 at 05:13:16PM -0200, Carlos Carvalho wrote:
> Ah, fine. It works, fortunately :-). Thanks.
> 
> It's not clear what can be dropped and what must still be used in the
> new implementation. It'd be nice to state it in the man page of
> tune2fs, for example. I thought that if we wanted to stop quotas it'd
> be necessary to umount and tune2fs again.

This sequence documents the biggest set of issues with the new
implementation:

1) Create a file system.  Populate it with files.  I untarred the
e2fsprogs source tree as root, so there were a lot of files owned by
root.

2)  unmount the filesystem and run tune2fs -O quota /dev/XXX

3) mount the file system; observe that the quota tools don't realize
that they should be trying to do the quota thing.

4) mount the file system with the -o quota flag; this sets the quota
option in /etc/mtab, which is necessary for the quota tools to
correctly deal with the ext4 file system.

5) mount the file system; observe (via "quota -v root") that the usage
information for root is _not_ correct; in fact the usage for root is
nonexistent.

6)  unmount the file system and run e2fsck

7) mount the file system; observe that the usage information for root
still doesn't exist.

8)  Set a quota for root: "setquota  -u root  1024 2048 500 1000 /mnt"

9) Unmount the file system and run e2fsck.  Now e2fsck will complain
and ask if you should fix the usage information for rooot.  Say yes.

10) Mount the file system (with -o quota), and run "quota -v root".
Observe that the usage information is now correct, but the quota
limits for root (and all users/groups) have been cleared.

Basically, there are a bunch of e2fsprogs bugs with quota which we
need to fix before we can really recommend end users to use the first
class quota support.  If you use quota with a freshly created file
system, it works pretty well, as long as the usage quota information
never gets inconsistent (or if you are using the quota system for
usage tracking only and not for quota enforcement).  But if you try to
add the quota feature to an already existing file system which has
files already pre-populated, there are some definite issues that need
fixing.   :-(


Most of these issues have been written up at:

      https://ext4.wiki.kernel.org/index.php/Quota


						- Ted

  reply	other threads:[~2013-01-31 22:03 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-19  2:40 how to quotacheck with the new quota implementation (hidden inode)? Carlos Carvalho
2013-01-21  5:47 ` Theodore Ts'o
2013-01-21  6:46   ` [PATCH 1/2] ext4: release sysfs kobject when failing to enable quotas on mount Theodore Ts'o
2013-01-21  6:46     ` [PATCH 2/2] quota: autoload the quota_v2 module for QFMT_VFS_V1 quota format Theodore Ts'o
2013-01-21 10:40       ` Jan Kara
2013-01-21 15:01         ` Theodore Ts'o
2013-01-21 15:10           ` Jan Kara
2013-01-21 15:50             ` Theodore Ts'o
2013-01-21 19:08               ` Jan Kara
2013-01-21 12:16       ` Carlos Maiolino
2013-01-21 12:12     ` [PATCH 1/2] ext4: release sysfs kobject when failing to enable quotas on mount Carlos Maiolino
2013-01-21 17:26   ` how to quotacheck with the new quota implementation (hidden inode)? Carlos Carvalho
2013-01-21 19:34   ` Aditya Kali
2013-01-31 19:01   ` Carlos Carvalho
2013-01-31 19:04     ` Aditya Kali
2013-01-31 19:13       ` Carlos Carvalho
2013-01-31 22:03         ` Theodore Ts'o [this message]
2013-01-31 22:28           ` Jan Kara
2013-01-31 22:44             ` Carlos Carvalho
2013-01-31 23:03             ` Theodore Ts'o
2013-02-04  9:42               ` Jan Kara
2013-01-31 22:41           ` Carlos Carvalho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130131220312.GA15322@thunk.org \
    --to=tytso@mit.edu \
    --cc=adityakali@google.com \
    --cc=carlos@fisica.ufpr.br \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).