Bug 194983

Summary: ZFS pool fails to import after r274337 (ZFS large block support)
Product: Base System Reporter: Marcus Reid <marcus>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Many People CC: delphij
Priority: ---    
Version: CURRENT   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Boot messages none

Description Marcus Reid 2014-11-13 06:08:11 UTC
Created attachment 149351 [details]
Boot messages

Hi,

I have two pools: "zroot" (imports fine) and "archive", which will not import after -r274337. I have compiled both a r274337 kernel and r274334 (the commit before it) and the pool will import with the earlier kernel.

During boot, I get:

Solaris: WARNING: can't open objset for archive/oldmac
Solaris: WARNING: can't open objset for archive/archive
Solaris: WARNING: can't open objset for archive/pics
Solaris: WARNING: can't open objset for archive/music
Solaris: WARNING: can't open objset for archive/Win7
Solaris: WARNING: can't open objset for archive/win98
Solaris: WARNING: can't open objset for archive

This repeats several times, with some usb initialization interspersed. See dmesg.boot (attached).  These messages continue to accumulate in dmesg.

[mreid@sol /usr/home/mreid]$ zpool status
  pool: archive
 state: FAULTED
status: The pool metadata is corrupted and the pool cannot be opened.
action: Destroy and re-create the pool from
	a backup source.
   see: http://illumos.org/msg/ZFS-8000-72
  scan: scrub repaired 0 in 1h16m with 0 errors on Sat Oct 18 03:26:54 2014
config:

	NAME        STATE     READ WRITE CKSUM
	archive     FAULTED      0     0     0
	  mirror-0  ONLINE       0     0     0
	    ada0s2  ONLINE       0     0     0
	    ada1s1  ONLINE       0     0     0

  pool: zroot
 state: ONLINE
  scan: scrub repaired 0 in 0h0m with 0 errors on Wed Nov 12 21:25:39 2014
config:

	NAME        STATE     READ WRITE CKSUM
	zroot       ONLINE       0     0     0
	  ada2p2    ONLINE       0     0     0

errors: No known data errors



Note that the pool is made up of two mbr partitions (ada0 also serves as a win7 boot disk). Here is some partition info:



[mreid@sol /usr/home/mreid]$ fdisk ada0
******* Working on device /dev/ada0 *******
parameters extracted from in-core disklabel are:
cylinders=3876021 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=3876021 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
    start 2048, size 204800 (100 Meg), flag 80 (active)
	beg: cyl 0/ head 32/ sector 33;
	end: cyl 12/ head 223/ sector 19
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 206848, size 1858822144 (907628 Meg), flag 0
	beg: cyl 205/ head 3/ sector 20;
	end: cyl 50/ head 12/ sector 44
The data for partition 3 is:
sysid 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
    start 1859028992, size 2047997952 (999999 Meg), flag 0
	beg: cyl 1023/ head 254/ sector 63;
	end: cyl 1023/ head 254/ sector 63
The data for partition 4 is:
<UNUSED>



[mreid@sol /usr/home/mreid]$ fdisk ada1
******* Working on device /dev/ada1 *******
parameters extracted from in-core disklabel are:
cylinders=3876021 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=3876021 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 1858823505 (907628 Meg), flag 80 (active)
	beg: cyl 0/ head 1/ sector 1;
	end: cyl 870/ head 15/ sector 63
The data for partition 2 is:
sysid 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
    start 1858824192, size 2048200704 (1000098 Meg), flag 0
	beg: cyl 1023/ head 254/ sector 63;
	end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>



[mreid@sol /usr/home/mreid]$ gpart list
Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029167
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: ada0s1
   Mediasize: 104857600 (100M)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   attrib: active
   rawtype: 7
   length: 104857600
   offset: 1048576
   type: ntfs
   index: 1
   end: 206847
   start: 2048
2. Name: ada0s2
   Mediasize: 951716937728 (886G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawtype: 165
   length: 951716937728
   offset: 105906176
   type: freebsd
   index: 2
   end: 1859028991
   start: 206848
3. Name: ada0s3
   Mediasize: 1048574951424 (977G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawtype: 7
   length: 1048574951424
   offset: 951822843904
   type: ntfs
   index: 3
   end: 3907026943
   start: 1859028992
Consumers:
1. Name: ada0
   Mediasize: 2000398934016 (1.8T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0

Geom name: ada1
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029167
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: ada1s1
   Mediasize: 951717634560 (886G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 3584
   Mode: r0w0e0
   attrib: active
   rawtype: 165
   length: 951717634560
   offset: 32256
   type: freebsd
   index: 1
   end: 1858823567
   start: 63
2. Name: ada1s2
   Mediasize: 1048678760448 (977G)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   rawtype: 7
   length: 1048678760448
   offset: 951717986304
   type: ntfs
   index: 2
   end: 3907024895
   start: 1858824192
Consumers:
1. Name: ada1
   Mediasize: 2000398934016 (1.8T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0



Please let me know if I can provide any more information.  I can test patches, etc.
Comment 1 Marcus Reid 2014-11-13 07:40:17 UTC
Forgot to include zdb output:

[root@sol /root]# zdb
archive:
    version: 5000
    name: 'archive'
    state: 0
    txg: 1519638
    pool_guid: 8279264830340259346
    hostid: 2293805332
    hostname: 'sol'
    vdev_children: 1
    vdev_tree:
        type: 'root'
        id: 0
        guid: 8279264830340259346
        children[0]:
            type: 'mirror'
            id: 0
            guid: 10701015584274027528
            whole_disk: 0
            metaslab_array: 34
            metaslab_shift: 33
            ashift: 12
            asize: 951712219136
            is_log: 0
            create_txg: 4
            children[0]:
                type: 'disk'
                id: 0
                guid: 1846177328828500201
                path: '/dev/ada0s2'
                phys_path: '/dev/ada0s2'
                whole_disk: 1
                DTL: 74
                create_txg: 4
            children[1]:
                type: 'disk'
                id: 1
                guid: 9262034354212908459
                path: '/dev/ada1s1'
                phys_path: '/dev/ada1s1'
                whole_disk: 1
                DTL: 72
                create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
zroot:
    version: 5000
    name: 'zroot'
    state: 0
    txg: 1639905
    pool_guid: 17780134877323639159
    hostid: 2293805332
    hostname: 'sol'
    vdev_children: 1
    vdev_tree:
        type: 'root'
        id: 0
        guid: 17780134877323639159
        children[0]:
            type: 'disk'
            id: 0
            guid: 9629360674150544332
            path: '/dev/ada2p2'
            phys_path: '/dev/ada2p2'
            whole_disk: 1
            metaslab_array: 34
            metaslab_shift: 30
            ashift: 12
            asize: 128030343168
            is_log: 0
            DTL: 78
            create_txg: 4
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data
Comment 2 Marcus Reid 2014-12-05 08:25:14 UTC
I have given up on waiting on this, so I have destroyed and recreated the pool. I can no longer reproduce the issue, so I am closing the ticket.
Comment 3 Xin LI freebsd_committer 2014-12-05 21:34:23 UTC
(In reply to marcus from comment #2)
> I have given up on waiting on this, so I have destroyed and recreated the
> pool. I can no longer reproduce the issue, so I am closing the ticket.

This should have been fixed in r275515.