Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zpool iostat -v should print a "logs" line #607

Closed
dajhorn opened this issue Mar 17, 2012 · 5 comments
Closed

zpool iostat -v should print a "logs" line #607

dajhorn opened this issue Mar 17, 2012 · 5 comments
Milestone

Comments

@dajhorn
Copy link
Contributor

dajhorn commented Mar 17, 2012

I have a pool like this:

# zpool status
  pool: tank
 state: ONLINE
 scan: resilvered 1.62T in 218h51m with 0 errors on Mon Feb 27 15:54:24 2012
config:

        NAME           STATE     READ WRITE CKSUM
        tank           ONLINE       0     0     0
          raidz2-0     ONLINE       0     0     0
            ata-1      ONLINE       0     0     0
            ata-2      ONLINE       0     0     0
            ata-3      ONLINE       0     0     0
            ata-4      ONLINE       0     0     0
            ata-5      ONLINE       0     0     0
            ata-6      ONLINE       0     0     0
        logs
          ata-7-part2  ONLINE       0     0     0
        cache
          ata-7-part3  ONLINE       0     0     0

errors: No known data errors

The "logs" line is missing in its zpool iostat -v output like this:

 zpool iostat -v
                  capacity     operations    bandwidth
pool           alloc   free   read  write   read  write
-------------  -----  -----  -----  -----  -----  -----
tank           10.1T   759G     19    120   227K  4.91M
  raidz2        0.1T   759G     19    120   226K  4.91M
    ata-1          -      -      7     87  28.4K  1.23M
    ata-2          -      -      7     87  44.9K  1.23M
    ata-3          -      -      9     87  54.8K  1.23M
    ata-4          -      -      7     87  40.0K  1.23M
    ata-5          -      -      7     87  45.4K  1.23M
    ata-6          -      -      9     87  44.0K  1.23M
  ata-7-part2      0   944M      0      0    624     38
cache              -      -      -      -      -      -
  ata-7-part3  1.03G  56.7G      0      8    226   846K
-------------  -----  -----  -----  -----  -----  -----

For consistency, the expected output is:

 zpool iostat -v
                  capacity     operations    bandwidth
pool           alloc   free   read  write   read  write
-------------  -----  -----  -----  -----  -----  -----
tank           10.1T   759G     19    120   227K  4.91M
  raidz2        0.1T   759G     19    120   226K  4.91M
    ata-1          -      -      7     87  28.4K  1.23M
    ata-2          -      -      7     87  44.9K  1.23M
    ata-3          -      -      9     87  54.8K  1.23M
    ata-4          -      -      7     87  40.0K  1.23M
    ata-5          -      -      7     87  45.4K  1.23M
    ata-6          -      -      9     87  44.0K  1.23M
logs               -      -      -      -      -      -
  ata-7-part2      0   944M      0      0    624     38
cache              -      -      -      -      -      -
  ata-7-part3  1.03G  56.7G      0      8    226   846K
-------------  -----  -----  -----  -----  -----  -----
@pyavdr
Copy link
Contributor

pyavdr commented Apr 22, 2012

Zpool iostat support for log devices

I found improved code at Illumos-gate, patched zpool_main.c, but don´t know how to do a pull request with this commit only. Please look at 459f40d (pyavdr/zfs) and merge it to the master, if it is ok, issue #607 can be closed. Thanks.

@dajhorn
Copy link
Contributor Author

dajhorn commented Apr 22, 2012

@pyavdr: Thanks for pointing this out. The upstream fix is commit illumos/illumos-gate@9d439f9.

To do a pull request with this commit only, first load the Illumos repository:

 $ git remote add illumos-gate git://github.com/illumos/illumos-gate.git
 $ git fetch illumos-gate

Second create a patch branch on the ZoL master for the bug:

  $ git branch issue607
  $ git checkout issue607

Third, merge only the single commit that has the fix:

  $ git cherry-pick 9d439f9073ca9fcb817d9b0bb14b0e4197e67690

And submit a pull request for the issue607 branch.

@pyavdr
Copy link
Contributor

pyavdr commented Apr 22, 2012

Thanks for that detailed help and excuse me for this beginners questions. But im an absolute newbie to this whole git thing. Never worked with a local repository, only with this github web page. I dont know what are the prerequisites for that commands (which local repositories in which state and so on) so i got an error on git cherry-pick .... and tried to go on:

empty directory:
git init; git clone https://github.com/zfsonlinux/zfs localzfs
cd localzfs
git remote add illumos-gate git://github.com/illumos/illumos-gate.git
git fetch illumos-gate
git branch issue607
git checkout issue607

git cherry-pick 9d439f9073ca9fcb817d9b0bb14b0e4197e67690

error: could not apply 9d439f9... 952 separate intent logs should be obvious in 'zpool iostat' output
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add ' or 'git rm '
hint: and commit the result with 'git commit'

git status
git add usr/src/cmd/zpool/zpool_main.c
git status
On branch issue607
Changes to be committed:
new file: usr/src/cmd/zpool/zpool_main.c

git cherry-pick 9d439f9073ca9fcb817d9b0bb14b0e4197e67690
fatal: Your local changes would be overwritten by cherry-pick.
Please, commit your changes or stash them to proceed.
git commit -c 9d439f9073ca9fcb817d9b0bb14b0e4197e67690
[issue607 148680d] 952 separate intent logs should be obvious in 'zpool iostat' output Reviewed by: Adam Leventhal [email protected] Reviewed by: Matt Ahrens [email protected] Reviewed by: Eric Schrock [email protected] Reviewed by: Dan McDonald [email protected] Reviewed by: Garrett D'Amore [email protected] Approved by: Eric Schrock [email protected]
Author: Mike Harsch [email protected]
1 files changed, 4497 insertions(+), 0 deletions(-)
create mode 100644 usr/src/cmd/zpool/zpool_main.c

after that i checked the zpool_main.c file ,ok the changes are in ..

git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.issue607.merge' in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. 'git pull ').
See git-pull(1) for details.

If you often merge with the same branch, you may want to
use something like the following in your configuration file:
[branch "issue607"]
remote =
merge =

[remote "<nickname>"]
url = <url>
fetch = <refspec>

See git-config(1) for details.

at this point im lost between pull and branches, no idea how to go on ...

@dajhorn
Copy link
Contributor Author

dajhorn commented Apr 22, 2012

The ZoL and Illumos trees are disjoint, so manual conflict resolution is required here.

However, cherry picking like this is more advanced than where you should start learning git. Do a tutorial and become familiar with git at the command line.

The patch that you posted earlier is correct, but it is also important keep the git history intact whenever pulling from Illumos. (ie: For the comments and attributions.)

@pyavdr
Copy link
Contributor

pyavdr commented Apr 22, 2012

Ok, thanks again. I know, git isn´t that easy to start with zfsonlinux, on the other hand learning by doing and for a good project makes more fun. I really would like to close that issue, and don´t know what time it takes to make progress with my git skills, so if you find the time, please do the pull request for that issue for the progress of ZOL. Originally i searched for a solution for issue #606, but found a solution for #607. Solution for #607 is somewhere in the code, there are some lines provided for #607 , maybe its just not running correctly.

ryao pushed a commit to ryao/zfs that referenced this issue Apr 23, 2012
… iostat' output

Reviewed by: Adam Leventhal <[email protected]>
Reviewed by: Matt Ahrens <[email protected]>
Reviewed by: Eric Schrock <[email protected]>
Reviewed by: Dan McDonald <[email protected]>
Reviewed by: Garrett D'Amore <[email protected]>
Approved by: Eric Schrock <[email protected]>

Refererce to Illumos issue:
  https://www.illumos.org/issues/952

Ported-by: Richard Yao <[email protected]>
Closes openzfs#607
behlendorf added a commit to behlendorf/zfs that referenced this issue May 21, 2018
Unlike other architectures which sanitize the LDFLAGS from the
environment in arch/<arch>/Makefile.  The powerpc Makefile
allows LDFLAGS to be passed through resulting in the following
build failure.

  /usr/bin/ld: unrecognized option '-Wl,-z,relro'

LDFLAGS is set in /usr/lib/rpm/redhat/macros by default.  Clear
the environment variable when building kmods for powerpc.

Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#607
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants