Hi folks,

Introduction

First I would like to introduce myself I'm Adam Hamsik and I'm working on port 
of zfs filesystem to the NetBSD operating system. During february I have 
updated zfs in our base tree to version 23(solaris current in that time) and 
now I'm trying to stabilize it little bit. 

All parts of zfs should be working except (gfs.c and zfs_ctldir.c these 2 files 
were not ported yet.).  

Problem

I have found that after restart(reloading zfs module) my zpool is in Faulted 
state

zfs_test# zpool list
NAME    SIZE  ALLOC   FREE    CAP  DEDUP  HEALTH  ALTROOT
ztest      -      -      -      -      -  FAULTED  -
zfs_test# zpool status
  pool: ztest
 state: FAULTED
status: An intent log record could not be read.
        Waiting for adminstrator intervention to fix the faulted pool.
action: Either restore the affected device(s) and run 'zpool online',
        or ignore the intent log records by running 'zpool clear'.
   see: http://www.sun.com/msg/ZFS-8000-K4
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        ztest       FAULTED      0     0     0  bad intent log
          /dev/wd   ONLINE       0     0     0
          /dev/wd   ONLINE       0     0     0

This problem can be solved by calling zpool clear on this zpool but still that 
is not right solution. I spent some time with debugging this issue and I have 
found that problem comes from 

spa_check_logs->dmu_objset_find->dmu_objset_find_spa->dsl_dir_open_spa 

spa_check_logs called
dmu_objset_find ztest, 0xccf8527d
dsl_dir_open_spa, getcomponent err = 0
dmu_objset_find_spa1 err = 0, name = ztest
dsl_dir_open_spa, getcomponent err = 0
dmu_objset_find_spa1 err = 2, name = ztest/
dmu_objset_find_spa2 err = 2

in dsl_dir_open_spa this part of code fails [1]. To me it seems that there is 
no problem with these routines, only problem is that ztest pool is missing 
something. I just need kick to the right direction to find what is wrong. 

[1]http://nxr.netbsd.org/xref/src/external/cddl/osnet/dist/uts/common/fs/zfs/dsl_dir.c#325

Regards

Adam.

_______________________________________________
zfs-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/zfs-code

Reply via email to