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

zfs list -v should display the same top-level device names as zpool status #12510

Closed
stuartthebruce opened this issue Aug 25, 2021 · 4 comments
Closed
Labels
good first issue Indicates a good issue for first-time contributors Type: Feature Feature request or new feature

Comments

@stuartthebruce
Copy link

Describe the feature would like to see added to OpenZFS

zpool list -v should display the same top-level device names as zpool status. In version 2.0.5 and 2.1.0 zpool list -v. For example,

[root@zfsscratch ~]# zpool status | head
  pool: scratch
 state: ONLINE
config:

	NAME                                   STATE     READ WRITE CKSUM
	scratch                                ONLINE       0     0     0
	  mirror-0                             ONLINE       0     0     0
	    36000402001e022294341c80b00000000  ONLINE       0     0     0
	    36000402004e021e34244d00a00000000  ONLINE       0     0     0
	  mirror-1                             ONLINE       0     0     0

[root@zfsscratch ~]# zpool list -v | head
NAME                                    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
scratch                                 326T  1.16M   326T        -         -     0%     0%  1.00x    ONLINE  -
  mirror                               5.39T    72K  5.39T        -         -     0%  0.00%      -    ONLINE
    36000402001e022294341c80b00000000      -      -      -        -         -      -      -      -    ONLINE
    36000402004e021e34244d00a00000000      -      -      -        -         -      -      -      -    ONLINE
  mirror                               5.39T   100K  5.39T        -         -     0%  0.00%      -    ONLINE
    36000402001e022294341c82700000000      -      -      -        -         -      -      -      -    ONLINE
    36000402004e021e34244d03200000000      -      -      -        -         -      -      -      -    ONLINE
  mirror                               5.39T    56K  5.39T        -         -     0%  0.00%      -    ONLINE
    36000402001e022294341c87100000000      -      -      -        -         -      -      -      -    ONLINE

The proposal is for zpool list -v to display mirror-0, mirror-1, ...

How will this feature improve OpenZFS?

Provide uniform device names when comparing the output from multiple commands.

Additional context

Also nice to be able to cut-n-paste output from zpool list -v into another ZFS command.

@stuartthebruce stuartthebruce added the Type: Feature Feature request or new feature label Aug 25, 2021
@stuartthebruce
Copy link
Author

Please consider adding the same enumerated vdev names to the output of zpool iostat -v, i.e., the following should disambiguate between the different mirrors.

[root@zfs2 ~]# zpool iostat -v
                             capacity     operations     bandwidth 
pool                       alloc   free   read  write   read  write
-------------------------  -----  -----  -----  -----  -----  -----
jbod1-scratch               218T  97.9T  5.69K    652  1.13G  60.5M
  mirror                   7.55T  3.36T    190     13  39.2M  1.04M
    35000cca2531e43f0          -      -     96      6  19.6M   534K
    35000cca2531e5edc          -      -     93      6  19.6M   534K
  mirror                   7.53T  3.37T    192     12  39.2M   984K
    35000cca2531e5eec          -      -     94      6  19.6M   492K
    35000cca2531e62c4          -      -     97      6  19.6M   492K
  mirror                   7.53T  3.38T    195     12  39.0M   992K
    35000cca2531e6374          -      -     97      6  19.5M   496K
    35000cca2531e63cc          -      -     98      6  19.5M   496K
...

@behlendorf behlendorf added the good first issue Indicates a good issue for first-time contributors label Sep 2, 2021
akashb-22 added a commit to akashb-22/zfs that referenced this issue Jan 28, 2022
This commit adds enumerated names to disambiguate between the different vdevs.
Previously only 'zpool status' showed enumerated vdev names, now 'zpool list -v'
and 'zpool iostat -v' also shows the enumerated vdev names.

Reviewed-by:
Reviewed-by:
Signed-off-by: Akash B <[email protected]>
Issue openzfs#12510
@akashb-22
Copy link
Contributor

akashb-22 commented Jan 28, 2022

@behlendorf @stuartthebruce
hi, I tried to address this issue, please review the change https://github.com/akashb-22/zfs/tree/vdev_enum
I have attached the output of the zpool commands after the patch. please let me know if I'm missing something here.
zpool_output.txt

akashb-22 added a commit to akashb-22/zfs that referenced this issue Jan 28, 2022
This commit adds enumerated names to disambiguate between the different vdevs.
Previously only 'zpool status' showed enumerated vdev names, now 'zpool list -v'
and 'zpool iostat -v' also shows the enumerated vdev names.

Signed-off-by: Akash B <[email protected]>
Issue openzfs#12510
akashb-22 added a commit to akashb-22/zfs that referenced this issue Jan 28, 2022
This commit adds enumerated names to disambiguate between the different vdevs.
Previously only 'zpool status' showed enumerated vdev names, now 'zpool list -v'
and 'zpool iostat -v' also shows the enumerated vdev names.

Signed-off-by: Akash B <[email protected]>
Issue openzfs#12510
@stuartthebruce
Copy link
Author

I haven't reviewed the code, but the example output is exactly what I am looking for. Thanks!

@behlendorf
Copy link
Contributor

Thanks! The patch handles it in the same way it was done for zpool status which is great. Let's just get a PR open so we can get it integrated.

akashb-22 added a commit to akashb-22/zfs that referenced this issue Jan 28, 2022
This commit adds enumerated names to disambiguate between the different vdevs.
Previously only 'zpool status' showed enumerated vdev names, now 'zpool list -v'
and 'zpool iostat -v' also shows the enumerated vdev names.

Signed-off-by: Akash B <[email protected]>
Issue openzfs#12510
akashb-22 added a commit to akashb-22/zfs that referenced this issue Jan 29, 2022
This commit adds enumerated names to disambiguate between the
different vdevs. Previously only 'zpool status' showed enumerated
vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows
the enumerated vdev names.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Dipak Ghosh <[email protected]>
Signed-off-by: Akash B <[email protected]>
Issue openzfs#12510
akashb-22 added a commit to akashb-22/zfs that referenced this issue Jan 29, 2022
This commit adds enumerated names to disambiguate between the
different vdevs. Previously only 'zpool status' showed enumerated
vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows
the enumerated vdev names.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Dipak Ghosh <[email protected]>
Signed-off-by: Akash B <[email protected]>
Issue openzfs#12510
akashb-22 added a commit to akashb-22/zfs that referenced this issue Feb 1, 2022
This commit adds enumerated names to disambiguate between the
different vdevs. Previously only 'zpool status' showed enumerated
vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows
the enumerated vdev names.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Dipak Ghosh <[email protected]>
Signed-off-by: Akash B <[email protected]>
Issue openzfs#12510
akashb-22 added a commit to akashb-22/zfs that referenced this issue Feb 2, 2022
This commit adds enumerated names to disambiguate between the
different vdevs. Previously only 'zpool status' showed enumerated
vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows
the enumerated vdev names.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Dipak Ghosh <[email protected]>
Signed-off-by: Akash B <[email protected]>
Issue openzfs#12510
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Feb 10, 2022
This commit adds enumerated names to disambiguate between the
different vdevs. Previously only 'zpool status' showed enumerated
vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows
the enumerated vdev names.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Dipak Ghosh <[email protected]>
Signed-off-by: Akash B <[email protected]>
Closes openzfs#12510
Closes openzfs#13031
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Feb 14, 2022
This commit adds enumerated names to disambiguate between the
different vdevs. Previously only 'zpool status' showed enumerated
vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows
the enumerated vdev names.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Dipak Ghosh <[email protected]>
Signed-off-by: Akash B <[email protected]>
Closes openzfs#12510
Closes openzfs#13031
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Feb 16, 2022
This commit adds enumerated names to disambiguate between the
different vdevs. Previously only 'zpool status' showed enumerated
vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows
the enumerated vdev names.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Dipak Ghosh <[email protected]>
Signed-off-by: Akash B <[email protected]>
Closes openzfs#12510
Closes openzfs#13031
tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Feb 17, 2022
This commit adds enumerated names to disambiguate between the
different vdevs. Previously only 'zpool status' showed enumerated
vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows
the enumerated vdev names.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Dipak Ghosh <[email protected]>
Signed-off-by: Akash B <[email protected]>
Closes openzfs#12510
Closes openzfs#13031
nicman23 pushed a commit to nicman23/zfs that referenced this issue Aug 22, 2022
This commit adds enumerated names to disambiguate between the
different vdevs. Previously only 'zpool status' showed enumerated
vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows
the enumerated vdev names.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Dipak Ghosh <[email protected]>
Signed-off-by: Akash B <[email protected]>
Closes openzfs#12510
Closes openzfs#13031
nicman23 pushed a commit to nicman23/zfs that referenced this issue Aug 22, 2022
This commit adds enumerated names to disambiguate between the
different vdevs. Previously only 'zpool status' showed enumerated
vdev names, now 'zpool list -v' and 'zpool iostat -v' also shows
the enumerated vdev names.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Dipak Ghosh <[email protected]>
Signed-off-by: Akash B <[email protected]>
Closes openzfs#12510
Closes openzfs#13031
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Indicates a good issue for first-time contributors Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

3 participants