xfs
[Top] [All Lists]

Re: XFS allocation tools

To: cwf@xxxxxxx (Charles Fumuso)
Subject: Re: XFS allocation tools
From: Jim Mostek <mostek@xxxxxxx>
Date: Thu, 6 Apr 2000 08:46:31 -0500 (CDT)
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <200004042106.QAA26193@xxxxxxxxxxxxxxxxxxxxx> from "Charles Fumuso" at Apr 04, 2000 04:06:27 PM
Sender: owner-linux-xfs@xxxxxxxxxxx
This looks great!

I see that the new code is already in the linux port tree.
We should add support for other Linux volume managers.

Jim

>
>As part of some allocation improvements, I've written
>some tools to display where the XFS allocations occur.
>
>Please take a look at these commands and let me know 
>what you think.
>
>Thanks,
>-Charles
>
>The first is an addition to xfs_bmap(1).  A new '-v' flag will
>display allocation group information.
> 
>% xfs_bmap -v /tst/d2/T1
>/tst/d2/T1:
> EXT: FILE-OFFSET           BLOCK-RANGE        AG AG-OFFSET          TOTAL  FLG
>   0: [0..2090287]:         4180768..6271055    2 64..2090351      2090288
>   1: [2090288..4180575]:   6271120..8361407    3 64..2090351      2090288
>   2: [4180576..6270863]:   8361472..10451759   4 64..2090351      2090288
>   3: [6270864..8361151]:   10451824..12542111  5 64..2090351      2090288
>   4: [8361152..10451439]:  12542176..14632463  6 64..2090351      2090288
>   5: [10451440..10485759]: 2090448..2124767    1 96..34415          34320
>
>Just in case it isn't obvious, the "AG" field is the AG number and 
>"AG-OFFSET" field is the filesystem block range within the given AG.
>
>The FLG field is to mark files that do not lie on stripe boundaries.
>For example...
>
>% xfs_bmap -v /tst/T1
>/tst/T1:
> EXT: FILE-OFFSET      BLOCK-RANGE      AG AG-OFFSET        TOTAL  FLG
>   0: [0..63]:         160..223          0 160..223            64 0011
> FLG Values:
>    01000 Doesn't begin on stripe unit
>    00100 Doesn't end   on stripe unit
>    00010 Doesn't begin on stripe width
>    00001 Doesn't end   on stripe width
>
>
>The other tool is a new command to display where the AG's fall
>relative to the XVM volume elements.  I'm not sure this is something
>we want in the field just yet.  It may give the customer more
>questions then answers currently.  What do you think?
>
>The following is the output for a concat subvolume...
>
>% xfs_info /tst
>Device:         /hw/vol/local/tsttmp
>Mountpnt:       /tst
>Volume:         vol/tsttmp
>    subvol/tsttmp/data                                 33445528
>        concat/concat12                                33445528
>            concat/concat10                             8388608
>                slice/tsts0                             2097152
>                    AG   0        0..2090351
>                    AG   1  2090352..2097151
>                slice/tsts1                             2097152
>                    AG   1  2097152..4180703
>                    AG   2  4180704..4194303
>                slice/tsts2                             2097152
>                    AG   2  4194304..6271055
>                    AG   3  6271056..6291455
>                slice/tsts3                             2097152
>                    AG   3  6291456..8361407
>                    AG   4  8361408..8388607
>            concat/concat11                            25056920
>                slice/tsts4                             4194304
>                    AG   4  8388608..10451759
>                    AG   5 10451760..12542111
>                    AG   6 12542112..12582911
>                slice/tsts5                             4194304
>                    AG   6 12582912..14632463
>                    AG   7 14632464..16722815
>                    AG   8 16722816..16777215
>                slice/tsts6                             4194304
>                    AG   8 16777216..18813167
>                    AG   9 18813168..20903519
>                    AG  10 20903520..20971519
>                slice/tsts7                             4194304
>                    AG  10 20971520..22993871
>                    AG  11 22993872..25084223
>                    AG  12 25084224..25165823
>                slice/tsts8                             4194304
>                    AG  12 25165824..27174575
>                    AG  13 27174576..29264927
>                    AG  14 29264928..29360127
>                slice/tsts9                             4085400
>                    AG  14 29360128..31355279
>                    AG  15 31355280..33445527
>
>Just like with xfs_bmap, all values are given in 512 byte blocks.
>The output shows the AG block spans and on which slice(s) the AG
>exists.
>
>No effort is done to break out each stripe so the output might
>look like the following:
>
>% xfs_info /xvm/stripe0
>Device:         /dev/cxvm/stripe0
>Mountpnt:       /xvm/stripe0
>Volume:         vol/stripe0
>    subvol/stripe0/data                                 8885376
>        stripe/stripe1                                  8885376
>            AG   0       0..1110911
>            AG   1 1110912..2221823
>            AG   2 2221824..3332735
>            AG   3 3332736..4443647
>            AG   4 4443648..5554559
>            AG   5 5554560..6665471
>            AG   6 6665472..7776383
>            AG   7 7776384..8885375
>
>
>For non XVM volumes, Each AG and it's block span is printed:
>
>% xfs_info /           
>Device:         /dev/root
>Mountpnt:       /
>    AG   0       0..1077791
>    AG   1 1077792..2155583
>    AG   2 2155584..3233375
>    AG   3 3233376..4311167
>    AG   4 4311168..5388959
>    AG   5 5388960..6466751
>    AG   6 6466752..7544543
>    AG   7 7544544..8622295
>


<Prev in Thread] Current Thread [Next in Thread>
  • Re: XFS allocation tools, Jim Mostek <=