public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ruben Porras <ruben.porras@linworks.de>
To: David Chinner <dgc@sgi.com>
Cc: xfs@oss.sgi.com, iusty@k1024.org
Subject: Re: XFS shrink (step 0)
Date: Mon, 30 Jul 2007 19:30:25 +0200	[thread overview]
Message-ID: <1185816625.3941.59.camel@localhost> (raw)
In-Reply-To: <20070629065525.GQ31489@sgi.com>

[-- Attachment #1: Type: text/plain, Size: 1128 bytes --]

Am Freitag, den 29.06.2007, 16:55 +1000 schrieb David Chinner:
> On Thu, Jun 28, 2007 at 12:38:44PM +0200, Ruben Porras wrote:

> For something like this it's probably easier to do with shell/perl/awk.
> 
> e.g. in shell, the number of ags in the filesystem:
> 
> iterate all ags:
> 
> numags=`xfs_db -r -c "sb 0" -c "p agcount" /dev/sdb8 | sed -e 's/.* = //'`
> lastag=`expr $numags - 1`
> for ags in `seq 0 1 $lastag`; do
> 	....
> done
> 
> Free space in an AG 0:
> 
> xfs_db -r -c "freesp -s -a 0" /dev/sdb8 | awk '/total free blocks/ {print $4}'

I decided to calcule the free space in a AG directly as the space in
"freeblks" - "btreeblks".

Attached is a perl script that calculates the free space of a hole
filesystem. It's easy to modify it to get the free space from a range of
AGs, so unless there are errors, I lay it on the mailing list as an
example, and I'll adapt it later as needed. I would like to start with
the step number 2.

How is the state of the program xfs_reno.c? Can it be released in the
near future as GPL, or should I go better for now with point number 3
(that is, move data out of offline AGs)?

[-- Attachment #2: freecount.pl --]
[-- Type: application/x-perl, Size: 1076 bytes --]

      reply	other threads:[~2007-07-30 17:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-01 16:39 XFS shrink functionality Ruben Porras
2007-06-04  0:16 ` David Chinner
2007-06-04  8:41   ` Iustin Pop
2007-06-04  9:21     ` David Chinner
2007-06-05  8:00       ` Iustin Pop
2007-06-06  1:50         ` Nathan Scott
2007-06-07  8:18         ` David Chinner
2007-06-08  8:23     ` Ruben Porras
2007-06-08 10:15       ` Iustin Pop
2007-06-08 15:12         ` David Chinner
2007-06-08 16:03           ` Iustin Pop
2007-06-09  2:15             ` David Chinner
2007-06-08 19:47           ` Ruben Porras
2007-06-14  8:35           ` Ruben Porras
2007-06-14  9:14             ` David Chinner
2007-06-08 14:44       ` David Chinner
2007-06-19 22:22   ` XFS shrink (step 0) Ruben Porras
2007-06-19 23:42     ` David Chinner
2007-06-28 10:38       ` Ruben Porras
2007-06-29  6:55         ` David Chinner
2007-07-30 17:30           ` Ruben Porras [this message]

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=1185816625.3941.59.camel@localhost \
    --to=ruben.porras@linworks.de \
    --cc=dgc@sgi.com \
    --cc=iusty@k1024.org \
    --cc=xfs@oss.sgi.com \
    /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