Discussion:
[OmniOS-discuss] zdb doesn't find a pool
Michael Mounteney
2017-04-16 01:19:30 UTC
Permalink
Hello and apology to Dan to whom I've already mentioned this matter on
IRC.

Summary: zdb doesn't see a pool specified by name.

My (home) server has three pools so:

================================================
# zpool status
pool: rpool
state: ONLINE
scan: scrub repaired 0 in 0h2m with 0 errors on Sun Feb 19 14:01:41
2017 config:

NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c2t0d0s0 ONLINE 0 0 0

errors: No known data errors

pool: vault
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
vault ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
c2t1d0s0 ONLINE 0 0 0
c2t2d0s0 ONLINE 0 0 0
c2t3d0s0 ONLINE 0 0 0
c2t5d0s0 ONLINE 0 0 0

errors: No known data errors

pool: woz
state: ONLINE
scan: resilvered 359G in 8h21m with 0 errors on Fri Mar 17 03:16:51
2017 config:

NAME STATE READ WRITE CKSUM
woz ONLINE 0 0 0
c2t4d0s0 ONLINE 0 0 0

errors: No known data errors
================================================

However, zdb won't see the pool 'woz':

================================================
# zdb vault | head -4

Cached configuration:
version: 5000
name: 'vault'
# zdb woz
zdb: can't open 'woz': No such file or directory
# zdb -l /dev/rdsk/c2t4d0s0 | head -6
--------------------------------------------
LABEL 0
--------------------------------------------
version: 5000
name: 'woz'
state: 0
================================================

So zdb finds pool 'vault' alright but not 'woz'. It will however see
'woz' if it's referred-to by disk. The difference which I think might
be crucial is that 'vault' was created via zpool create, whereas 'woz'
was created via zpool split. In the full output of zdb
-l /dev/rdsk/c2t4d0s0 (omitted here for brevity), there are four labels
numbered 0 to 3. The output is much shorter as well; it doesn't list
the individual file objects as zdb vault does.

Is this worth a mention on https://www.illumos.org/issues ?

______________
Michael Mounteney
Dan McDonald
2017-04-16 02:31:25 UTC
Permalink
That woz was the result of zpool split is news to me (or I missed it, in which case I apologize).

I wonder if a toy test with files ala the zfs test suite can reproduce this?

- create 3-way mirror
- zdb
- split one disk
- zdb original and split-created pool

Adding illumos zfs list.

Dan

Sent from my iPhone (typos, autocorrect, and all)
Post by Michael Mounteney
Hello and apology to Dan to whom I've already mentioned this matter on
IRC.
Summary: zdb doesn't see a pool specified by name.
================================================
# zpool status
pool: rpool
state: ONLINE
scan: scrub repaired 0 in 0h2m with 0 errors on Sun Feb 19 14:01:41
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c2t0d0s0 ONLINE 0 0 0
errors: No known data errors
pool: vault
state: ONLINE
scan: none requested
NAME STATE READ WRITE CKSUM
vault ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
c2t1d0s0 ONLINE 0 0 0
c2t2d0s0 ONLINE 0 0 0
c2t3d0s0 ONLINE 0 0 0
c2t5d0s0 ONLINE 0 0 0
errors: No known data errors
pool: woz
state: ONLINE
scan: resilvered 359G in 8h21m with 0 errors on Fri Mar 17 03:16:51
NAME STATE READ WRITE CKSUM
woz ONLINE 0 0 0
c2t4d0s0 ONLINE 0 0 0
errors: No known data errors
================================================
================================================
# zdb vault | head -4
version: 5000
name: 'vault'
# zdb woz
zdb: can't open 'woz': No such file or directory
# zdb -l /dev/rdsk/c2t4d0s0 | head -6
--------------------------------------------
LABEL 0
--------------------------------------------
version: 5000
name: 'woz'
state: 0
================================================
So zdb finds pool 'vault' alright but not 'woz'. It will however see
'woz' if it's referred-to by disk. The difference which I think might
be crucial is that 'vault' was created via zpool create, whereas 'woz'
was created via zpool split. In the full output of zdb
-l /dev/rdsk/c2t4d0s0 (omitted here for brevity), there are four labels
numbered 0 to 3. The output is much shorter as well; it doesn't list
the individual file objects as zdb vault does.
Is this worth a mention on https://www.illumos.org/issues ?
______________
Michael Mounteney
_______________________________________________
OmniOS-discuss mailing list
http://lists.omniti.com/mailman/listinfo/omnios-discuss
Richard Elling
2017-04-17 14:12:29 UTC
Permalink
Post by Dan McDonald
That woz was the result of zpool split is news to me (or I missed it, in which case I apologize).
I wonder if a toy test with files ala the zfs test suite can reproduce this?
- create 3-way mirror
- zdb
- split one disk
- zdb original and split-created pool
hint: when provided a pool name, zdb looks in /etc/zfs/zpool.cache to determine the
poolname to devices mapping. Using the -e (exported) option causes zdb to read
ZFS labels on the disks to locate the devices mapping. Since zdb runs in userland and
can be run by non-root users, it has no knowledge of internal kernel state. "zdb -C"
will pretty-print the packed nvlist cachefile for your viewing pleasure
-- richard
Post by Dan McDonald
Adding illumos zfs list.
Dan
Sent from my iPhone (typos, autocorrect, and all)
Post by Michael Mounteney
Hello and apology to Dan to whom I've already mentioned this matter on
IRC.
Summary: zdb doesn't see a pool specified by name.
================================================
# zpool status
pool: rpool
state: ONLINE
scan: scrub repaired 0 in 0h2m with 0 errors on Sun Feb 19 14:01:41
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
c2t0d0s0 ONLINE 0 0 0
errors: No known data errors
pool: vault
state: ONLINE
scan: none requested
NAME STATE READ WRITE CKSUM
vault ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
c2t1d0s0 ONLINE 0 0 0
c2t2d0s0 ONLINE 0 0 0
c2t3d0s0 ONLINE 0 0 0
c2t5d0s0 ONLINE 0 0 0
errors: No known data errors
pool: woz
state: ONLINE
scan: resilvered 359G in 8h21m with 0 errors on Fri Mar 17 03:16:51
NAME STATE READ WRITE CKSUM
woz ONLINE 0 0 0
c2t4d0s0 ONLINE 0 0 0
errors: No known data errors
================================================
================================================
# zdb vault | head -4
version: 5000
name: 'vault'
# zdb woz
zdb: can't open 'woz': No such file or directory
# zdb -l /dev/rdsk/c2t4d0s0 | head -6
--------------------------------------------
LABEL 0
--------------------------------------------
version: 5000
name: 'woz'
state: 0
================================================
So zdb finds pool 'vault' alright but not 'woz'. It will however see
'woz' if it's referred-to by disk. The difference which I think might
be crucial is that 'vault' was created via zpool create, whereas 'woz'
was created via zpool split. In the full output of zdb
-l /dev/rdsk/c2t4d0s0 (omitted here for brevity), there are four labels
numbered 0 to 3. The output is much shorter as well; it doesn't list
the individual file objects as zdb vault does.
Is this worth a mention on https://www.illumos.org/issues ?
______________
Michael Mounteney
_______________________________________________
OmniOS-discuss mailing list
http://lists.omniti.com/mailman/listinfo/omnios-discuss
_______________________________________________
OmniOS-discuss mailing list
http://lists.omniti.com/mailman/listinfo/omnios-discuss
Loading...