public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* xfs_quota off/remove
@ 2014-12-10 18:37 Meij, Henk
  2014-12-10 20:32 ` Michael L. Semon
  2014-12-10 20:41 ` Dave Chinner
  0 siblings, 2 replies; 6+ messages in thread
From: Meij, Henk @ 2014-12-10 18:37 UTC (permalink / raw)
  To: xfs@oss.sgi.com


[-- Attachment #1.1: Type: text/plain, Size: 968 bytes --]

Is off/remove working for xfs_quota? I seem to not be able to zero out the project quota metadata and move the project to another partition. I did not remove the entries in the /etc/proj* files.



-Henk



 1308  xfs_quota -x -c 'project -s data_1_hmeij'
 1309  xfs_quota -x -c 'report -h -bi' /data/1



User quota on /data/1 (/dev/sdb1)
                        Blocks
User ID      Used   Soft   Hard Warn/Grace
---------- ---------------------------------
root            0      0      0  00 [------]
hmeij      854.4M      0      0  00 [------]

Project quota on /data/1 (/dev/sdb1)
                        Blocks
Project ID   Used   Soft   Hard Warn/Grace
---------- ---------------------------------
data_1_hmeij 854.4M      0      0  00 [------]



 1318  xfs_quota -x -c 'off' -c 'remove' /data/1

 1331  umount /data/1; mount /data1



 1333  xfs_quota -x -c 'report -h' /data/1



same report output, same metadata ...

[-- Attachment #1.2: Type: text/html, Size: 2780 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xfs_quota off/remove
  2014-12-10 18:37 xfs_quota off/remove Meij, Henk
@ 2014-12-10 20:32 ` Michael L. Semon
  2014-12-10 20:47   ` Dave Chinner
  2014-12-10 20:41 ` Dave Chinner
  1 sibling, 1 reply; 6+ messages in thread
From: Michael L. Semon @ 2014-12-10 20:32 UTC (permalink / raw)
  To: Meij, Henk, xfs@oss.sgi.com

On 12/10/14 13:37, Meij, Henk wrote:
> Is off/remove working for xfs_quota? I seem to not be able to zero
> out the project quota metadata and move the project to another
> partition. I did not remove the entries in the /etc/proj* files.
> 
> 
> 
> -Henk
> 
> 
> 
>  1308  xfs_quota -x -c 'project -s data_1_hmeij'
>  1309  xfs_quota -x -c 'report -h -bi' /data/1
> 
> 
> 
> User quota on /data/1 (/dev/sdb1)
>                         Blocks
> User ID      Used   Soft   Hard Warn/Grace
> ---------- ---------------------------------
> root            0      0      0  00 [------]
> hmeij      854.4M      0      0  00 [------]
> 
> Project quota on /data/1 (/dev/sdb1)
>                         Blocks
> Project ID   Used   Soft   Hard Warn/Grace
> ---------- ---------------------------------
> data_1_hmeij 854.4M      0      0  00 [------]
> 
> 
> 
>  1318  xfs_quota -x -c 'off' -c 'remove' /data/1
> 
>  1331  umount /data/1; mount /data1
> 
> 
> 
>  1333  xfs_quota -x -c 'report -h' /data/1
> 
> 
> 
> same report output, same metadata ...

As an XFS user: Add me in on this thread?

On one hand, the man page for xfs_quota states for "off":  "Permanently
switches quota off for the filesystem identified by the current path.
Quota can only be switched back on subsequently by unmounting and then
mounting again."

It's confusing when permanent is not really permanent.  However,
mounting without quotas leaves the quotas off.  The xfs_quota "state"
command was helpful in showing the actual state of accounting and
enforcement.  Also, to mount without uquota or without pquota still 
disables uquota and pquota independently.

I take it that project quotas have much to do with the attributes set 
on the a projid directory and files created within it.

# Switching to add a secondary issue hit while trying to duplicate 
# your issue...feel free to ask me to get my own thread.  Just wanted 
# to record that here is where I hit an issue.

On the other hand, for me to use the xfs_quota "off -p" command with
even one file with project quota, the v4 filesystem here at work becomes
impossible to unmount.  When only the containing directory for the
project quota has zero files in it, the command works just fine.  CPU 
usage for xfs_quota doesn't go over 2% while it is hanging.

A forced crash (yikes!) yields nothing but input-related stack and the 
KMS console not switching back to VGA.

Quotas haven't been touched on this box in a while, and they were set up
maybe 3-4 years ago.

An upgrade to the newest everything from git did not make things 
better, though I'm keeping it because the previous git version worked 
really well, other than for me wondering about xfs_quota.

I'll try to get more from my testing boxes at home.

Thanks!

Michael

# Backing info:

# scripts/ver_linux from kernel source:

# PC started out running Slackware 14, but it's been upgraded from 
# mostly-official source in a lot of places.

Linux ________ 3.10.62 #1 Sun Dec 7 19:13:27 EST 2014 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux
 
Gnu C                  4.8.3
Gnu make               3.82
binutils               2.24.51.0.3.20140127
util-linux             2.21.2
mount                  support
module-init-tools      9
e2fsprogs              1.42.8
jfsutils               1.1.15
reiserfsprogs          3.6.21
xfsprogs               3.2.2
pcmciautils            017
quota-tools            3.17.
PPP                    2.4.5
Linux C Library        2.20
Dynamic linker (ldd)   2.20
Linux C++ Library      6.0.19
Procps                 3.2.8
Net-tools              1.60
Kbd                    1.15.3
oprofile               0.9.7
Sh-utils               8.21

# xfs_info:

meta-data=/dev/sda8              isize=256    agcount=4, agsize=6160384 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=24641536, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=12032, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

# info from "mount" for this partition:

/dev/sda8 on /storage type xfs (rw,uquota,pquota)

# /proc/partitions

major minor  #blocks  name

   8        0  156290904 sda
   8        1    4200966 sda1
   8        2          1 sda2
   8        5    1048576 sda5
   8        6   12582912 sda6
   8        7   24600689 sda7
   8        8   98566144 sda8
   8        9   10485760 sda9
   8       10    2097152 sda10
   8       11    1349296 sda11
   8       12    1347936 sda12
   8       16   39062500 sdb
   8       17   10485760 sdb1
   8       18     524288 sdb2
   8       19    1048576 sdb3
   8       20   27002835 sdb4
  11        0    1048575 sr0
  11        1    1048575 sr1

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xfs_quota off/remove
  2014-12-10 18:37 xfs_quota off/remove Meij, Henk
  2014-12-10 20:32 ` Michael L. Semon
@ 2014-12-10 20:41 ` Dave Chinner
  1 sibling, 0 replies; 6+ messages in thread
From: Dave Chinner @ 2014-12-10 20:41 UTC (permalink / raw)
  To: Meij, Henk; +Cc: xfs@oss.sgi.com

On Wed, Dec 10, 2014 at 06:37:41PM +0000, Meij, Henk wrote:
> Is off/remove working for xfs_quota? I seem to not be able to zero
> out the project quota metadata and move the project to another
> partition. I did not remove the entries in the /etc/proj* files.
.....
> 
>  1318  xfs_quota -x -c 'off' -c 'remove' /data/1
> 
>  1331  umount /data/1; mount /data1

And the output of /proc/self/mounts after this?

>From the xfs_quota man page:

       off [ -gpu ] [ -v ]
	     Permanently switches quota off for the filesystem
	     identified by the current path.  Quota can only be
	     switched back on subsequently by unmounting and then
	     mounting again.

So it's likely that mounting is still picking up the quota mount
options from /etc/fstab and turning quotas back on....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xfs_quota off/remove
  2014-12-10 20:32 ` Michael L. Semon
@ 2014-12-10 20:47   ` Dave Chinner
  2014-12-10 21:11     ` Michael L. Semon
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Chinner @ 2014-12-10 20:47 UTC (permalink / raw)
  To: Michael L. Semon; +Cc: xfs@oss.sgi.com, Meij, Henk

On Wed, Dec 10, 2014 at 03:32:29PM -0500, Michael L. Semon wrote:
> On one hand, the man page for xfs_quota states for "off":  "Permanently
> switches quota off for the filesystem identified by the current path.
> Quota can only be switched back on subsequently by unmounting and then
> mounting again."

The *only* method for turning on quotas on XFS on is to mount the filesystem
with the appropriate mount options. You can turn them off in an on-line
fashion by running the "off" command, but you also need to remove
the mount options from the next mount, otherwise that turns them
back on.

If the word "permanently" is the problem, send a patch for th eman
page that explains it properly.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: xfs_quota off/remove
  2014-12-10 20:47   ` Dave Chinner
@ 2014-12-10 21:11     ` Michael L. Semon
  2014-12-11 14:50       ` Meij, Henk
  0 siblings, 1 reply; 6+ messages in thread
From: Michael L. Semon @ 2014-12-10 21:11 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs@oss.sgi.com, Meij, Henk

On 12/10/14 15:47, Dave Chinner wrote:
> On Wed, Dec 10, 2014 at 03:32:29PM -0500, Michael L. Semon wrote:
>> On one hand, the man page for xfs_quota states for "off":  "Permanently
>> switches quota off for the filesystem identified by the current path.
>> Quota can only be switched back on subsequently by unmounting and then
>> mounting again."
> 
> The *only* method for turning on quotas on XFS on is to mount the filesystem
> with the appropriate mount options. You can turn them off in an on-line
> fashion by running the "off" command, but you also need to remove
> the mount options from the next mount, otherwise that turns them
> back on.
> 
> If the word "permanently" is the problem, send a patch for th eman
> page that explains it properly.
> 
> Cheers,
> 
> Dave.

Thanks, Dave.  You, Mark, Eric, and Brian are superior to me at wording.  
But here's my shot at it...

Thanks!

Michael

>From 51a3d00b134b72c095c1d4ec42ec619ddf4388bc Mon Sep 17 00:00:00 2001
From: "Michael L. Semon" <mlsemon35@gmail.com>
Date: Wed, 10 Dec 2014 15:58:10 -0500
Subject: [PATCH] xfsprogs: clarify wording for xfs_quota off command

The xfs_quota "off" command claims to permanently shut off quotas, but
then reminds the user that they can be turned on again by unmounting
and mounting the filesystem again.  It's the kind of permanent that
is not permanent.  Fix it.

Signed-off-by: Michael L. Semon <mlsemon35@gmail.com>
---
 man/man8/xfs_quota.8 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/man8/xfs_quota.8 b/man/man8/xfs_quota.8
index 8cc8ab7..c79627c 100644
--- a/man/man8/xfs_quota.8
+++ b/man/man8/xfs_quota.8
@@ -479,8 +479,8 @@ Disables quota enforcement, while leaving quota accounting active. The
 option (verbose) displays the state after the operation has completed.
 .TP
 .BR off " [ " \-gpu " ] [ " \-v " ]"
-Permanently switches quota off for the filesystem identified by the
-current path.
+Stops quota enforcement and accounting for the filesystem identified by the
+current path until the filesystem has been unmounted.
 Quota can only be switched back on subsequently by unmounting and
 then mounting again.
 .TP
-- 
1.8.5.4


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: xfs_quota off/remove
  2014-12-10 21:11     ` Michael L. Semon
@ 2014-12-11 14:50       ` Meij, Henk
  0 siblings, 0 replies; 6+ messages in thread
From: Meij, Henk @ 2014-12-11 14:50 UTC (permalink / raw)
  To: Michael L. Semon, Dave Chinner; +Cc: xfs@oss.sgi.com

ah, thank you all, this is one of those light bulb moments, the sequence below

-c "off" -c "remove" is followed by migration of said share to new partition
then the remount happens (with quotas on for other shares)

and now the metadata for migrated share does not show up. 

-Henk

________________________________________
From: Michael L. Semon [mlsemon35@gmail.com]
Sent: Wednesday, December 10, 2014 4:11 PM
To: Dave Chinner
Cc: Meij, Henk; xfs@oss.sgi.com
Subject: Re: xfs_quota off/remove

On 12/10/14 15:47, Dave Chinner wrote:
> On Wed, Dec 10, 2014 at 03:32:29PM -0500, Michael L. Semon wrote:
>> On one hand, the man page for xfs_quota states for "off":  "Permanently
>> switches quota off for the filesystem identified by the current path.
>> Quota can only be switched back on subsequently by unmounting and then
>> mounting again."
>
> The *only* method for turning on quotas on XFS on is to mount the filesystem
> with the appropriate mount options. You can turn them off in an on-line
> fashion by running the "off" command, but you also need to remove
> the mount options from the next mount, otherwise that turns them
> back on.
>
> If the word "permanently" is the problem, send a patch for th eman
> page that explains it properly.
>
> Cheers,
>
> Dave.

Thanks, Dave.  You, Mark, Eric, and Brian are superior to me at wording.
But here's my shot at it...

Thanks!

Michael

>From 51a3d00b134b72c095c1d4ec42ec619ddf4388bc Mon Sep 17 00:00:00 2001
From: "Michael L. Semon" <mlsemon35@gmail.com>
Date: Wed, 10 Dec 2014 15:58:10 -0500
Subject: [PATCH] xfsprogs: clarify wording for xfs_quota off command

The xfs_quota "off" command claims to permanently shut off quotas, but
then reminds the user that they can be turned on again by unmounting
and mounting the filesystem again.  It's the kind of permanent that
is not permanent.  Fix it.

Signed-off-by: Michael L. Semon <mlsemon35@gmail.com>
---
 man/man8/xfs_quota.8 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/man8/xfs_quota.8 b/man/man8/xfs_quota.8
index 8cc8ab7..c79627c 100644
--- a/man/man8/xfs_quota.8
+++ b/man/man8/xfs_quota.8
@@ -479,8 +479,8 @@ Disables quota enforcement, while leaving quota accounting active. The
 option (verbose) displays the state after the operation has completed.
 .TP
 .BR off " [ " \-gpu " ] [ " \-v " ]"
-Permanently switches quota off for the filesystem identified by the
-current path.
+Stops quota enforcement and accounting for the filesystem identified by the
+current path until the filesystem has been unmounted.
 Quota can only be switched back on subsequently by unmounting and
 then mounting again.
 .TP
--
1.8.5.4
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-11 14:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10 18:37 xfs_quota off/remove Meij, Henk
2014-12-10 20:32 ` Michael L. Semon
2014-12-10 20:47   ` Dave Chinner
2014-12-10 21:11     ` Michael L. Semon
2014-12-11 14:50       ` Meij, Henk
2014-12-10 20:41 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox