Project

General

Profile

Actions

Feature #6410

closed

teach zdb to perform object lookups by path

Added by Will Andrews about 8 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2015-10-30
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

This is primarily intended to ease debugging & testing ZFS when one is only interested in things like the on-disk location of a specific object's blocks, but doesn't know their object id. This allows doing things like the following (FreeBSD-based example):

        # zpool create -f foo da0
        # dd if=/dev/zero of=/foo/1 bs=1M count=4 >/dev/null 2>&1
        # zpool export foo
        # zdb -vvvvv -o "ZFS plain file" foo /1
        Object  lvl   iblk   dblk  dsize  lsize   %full  type
             8    2    16K   128K  3.99M     4M  100.00  ZFS plain file (K=inherit) (Z=inherit)
                                            168   bonus  System attributes
        dnode flags: USED_BYTES USERUSED_ACCOUNTED
        dnode maxblkid: 31
        path    /1
        uid     0
        gid     0
        atime   Thu Apr 23 22:45:32 2015
        mtime   Thu Apr 23 22:45:32 2015
        ctime   Thu Apr 23 22:45:32 2015
        crtime  Thu Apr 23 22:45:32 2015
        gen     7
        mode    100644
        size    4194304
        parent  4
        links   1
        pflags  40800000004
        Indirect blocks:
              0 L1  DVA[0]=<0:c19200:600> DVA[1]=<0:10800019200:600> [L1 ZFS plain file] fletcher4 lz4 LE contiguous unique double size=4000L/200P birth=7L/7P fill=32 cksum=18db62bf5b:51ce0bdcc61:da9fdf01d36d:1ddae6f92ea5fe
              0  L0 DVA[0]=<0:19200:60000> [L0 ZFS plain file] [...]
          20000  L0 DVA[0]=<0:199200:60000> [L0 ZFS plain file] [...]
        [...]

Actions #1

Updated by Yuri Pankov almost 7 years ago

  • Description updated (diff)
Actions #2

Updated by Yuri Pankov almost 7 years ago

  • Category set to zfs - Zettabyte File System
  • Status changed from New to In Progress
  • Assignee set to Yuri Pankov
  • % Done changed from 0 to 50
  • Tags deleted (needs-triage)

Take over.

Actions #3

Updated by Electric Monk almost 7 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

git commit ed61ec1da9132e570b0853386d0f78a32f852cd2

commit  ed61ec1da9132e570b0853386d0f78a32f852cd2
Author: Yuri Pankov <yuri.pankov@nexenta.com>
Date:   2017-03-01T04:56:29.000Z

    6410 teach zdb to perform object lookups by path
    Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Will Andrews <will@freebsd.org>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF