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 add -n" report is incorrect #9390

Closed
TangoAlpha opened this issue Oct 1, 2019 · 1 comment
Closed

"zpool add -n" report is incorrect #9390

TangoAlpha opened this issue Oct 1, 2019 · 1 comment
Labels
good first issue Indicates a good issue for first-time contributors Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@TangoAlpha
Copy link

System information

Type Version/Name
Distribution Name Debian
Distribution Version Buster + Proxmox
Linux Kernel 5.0.21-1-pve
Architecture amd64
ZFS Version 0.8.1-pve2
SPL Version 0.8.1-pve2

Describe the problem you're observing

Output from "zpool add -n pool log logdev" shows logdev added to main pool and not under logs

Describe how to reproduce the problem

  1. Create pool without a log device
  2. zpool add -n test log logdevice
  3. zpool add test log logdevice
  4. zpool status test

Output from 2 (incorrect) does not match output from 4 (correct)

Include any warning/errors/backtraces from the system logs

Example:

root:~# zpool create test scsi-36589cfc00000083a8f69ec6f96c766a6
root:~# zpool add test cache scsi-36589cfc0000007fd9df5a667cfa6b459
root:~# zpool status test
  pool: test
 state: ONLINE
  scan: none requested
config:

	NAME                                      STATE     READ WRITE CKSUM
	test                                      ONLINE       0     0     0
	  scsi-36589cfc00000083a8f69ec6f96c766a6  ONLINE       0     0     0
	cache
	  scsi-36589cfc0000007fd9df5a667cfa6b459  ONLINE       0     0     0

errors: No known data errors
root:~# zpool add -n test log scsi-36589cfc00000079787a155ff1f6d5996
would update 'test' to the following configuration:
	test
	  scsi-36589cfc00000083a8f69ec6f96c766a6
	  scsi-36589cfc00000079787a155ff1f6d5996
	cache
	  scsi-36589cfc0000007fd9df5a667cfa6b459
root:~# zpool add test log scsi-36589cfc00000079787a155ff1f6d5996
root:~# zpool status test
  pool: test
 state: ONLINE
  scan: none requested
config:

	NAME                                      STATE     READ WRITE CKSUM
	test                                      ONLINE       0     0     0
	  scsi-36589cfc00000083a8f69ec6f96c766a6  ONLINE       0     0     0
	logs	
	  scsi-36589cfc00000079787a155ff1f6d5996  ONLINE       0     0     0
	cache
	  scsi-36589cfc0000007fd9df5a667cfa6b459  ONLINE       0     0     0

errors: No known data errors
root:~#
@behlendorf behlendorf added good first issue Indicates a good issue for first-time contributors Type: Defect Incorrect behavior (e.g. crash, hang) labels Oct 1, 2019
@inkdot7
Copy link
Contributor

inkdot7 commented Nov 27, 2019

Similar issue from #9627:

When adding a special device in dry-run mode (zpool add -n), the special marker is not in the list of the would-be configuration:

# zpool add -n znimbus1 special /dev/vde1
would update 'znimbus1' to the following configuration:
        znimbus1
          vdb
          vdc
          vdd
          vde1

Expected result (which is like what zpool status prints, after actual adding):

# zpool add -n znimbus1 special /dev/vde1
would update 'znimbus1' to the following configuration:
        znimbus1
          vdb
          vdc
          vdd
        special
          vde1

Also, the zpool add -n command did not warn that the pool is missing the allocation classes feature, as the actual command (without -n) does:

# zpool add znimbus1 special /dev/vde1
cannot add to 'znimbus1': pool must be upgraded to add these vdevs

Describe how to reproduce the problem

zpool add -n pool special vdev

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: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

3 participants