Michael Jung
2014-Jul-29 14:04 UTC
r269147 fails to boot after ZFS pool upgrade and new boot code installation
Everyone, The freebsd-fs was silent about this post so I'm hoping someone will chime in here. 10-stable r269147: Upgraded the zfs pool to 5000 and installed new bootcode. The system was working fine prior to upgrading the pool. NOTE: Due to the BIOS not supporting drives > 2TB in ACHI mode this MB is running in legacy IDE mode. I understand the speed implications of this - it is just a test box. ZFS MIRROR BOOT ada0/ada1 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad0 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad1 Loading Operating System ... ZFS: i/o error - all block copies unavailable ZFS: can't read object set for dataset u ZFS: can't open root filesystem gptzsboot: failed to mount default pool zroot FreBSD/x86 boot Default zroot: boot: I tried to recover using FreeBSD-Stable USB Live CD r268571 but could not import the pool. # zpool import -f -N zroot ZFS filesystem version:5 ZFS storage pool version: feature support (5000) This pool uses the following feature(s) not support by this system: com.delphix:embedded_data cannot impot 'zroot': unsupported version or feature # FreeBSD-11-Current r268622 LIVE CD (USB) imports the pool fine. Only two mirrored drives attached to onboard SATA. Both drives show up in BIOS as first two boot devices. I attempted to install the r269147 bootcode again like: # zpool import -f -N zroot # mkdir /tmp/zroot # mount -r -t zfs zroot/ROOT/default /tmp/zroot # gpart bootcode -b /tmp/zroot/boot/pmbr -p /tmp/zroot/boot/gptzfsboot -i 1ada0 # gpart bootcode -b /tmp/zroot/boot/pmbr -p /tmp/zroot/boot/gptzfsboot -i 1ada1 but resulted in same problem. I also tried installing 11-current bootcode r268622 which also fails to boot. (I did not export the pool. I even tried power reset after writing bootcode) gpart list/show: 34 5860533101 ada0 GPT (2.7T) 34 6 - free - (3.0K) 40 1024 1 freebsd-boot (512K) 1064 25165824 2 freebsd-swap (12G) 25166888 5835366240 3 freebsd-zfs (2.7T) 5860533128 7 - free - (3.5K) 34 5860533101 ada1 GPT (2.7T) 34 6 - free - (3.0K) 40 1024 1 freebsd-boot (512K) 1064 25165824 2 freebsd-swap (12G) 25166888 5835366240 3 freebsd-zfs (2.7T) 5860533128 7 - free - (3.5K) Geom name: ada0 modified: false state: OK fwheads: 16 fwsectors: 63 last: 5860533134 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada0p1 Mediasize: 524288 (512K) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: 4130f007-f278-11e3-990a-001b211e2e44 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: gptboot0 length: 524288 offset: 20480 type: freebsd-boot index: 1 end: 1063 start: 40 2. Name: ada0p2 Mediasize: 12884901888 (12G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: 41809b76-f278-11e3-990a-001b211e2e44 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: swap0 length: 12884901888 offset: 544768 type: freebsd-swap index: 2 end: 25166887 start: 1064 3. Name: ada0p3 Mediasize: 2987707514880 (2.7T) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e2 rawuuid: 41ad88b5-f278-11e3-990a-001b211e2e44 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: zfs0 length: 2987707514880 offset: 12885446656 type: freebsd-zfs index: 3 end: 5860533127 start: 25166888 Consumers: 1. Name: ada0 Mediasize: 3000592982016 (2.7T) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e3 Geom name: ada1 modified: false state: OK fwheads: 16 fwsectors: 63 last: 5860533134 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada1p1 Mediasize: 524288 (512K) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: 4260eded-f278-11e3-990a-001b211e2e44 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: gptboot1 length: 524288 offset: 20480 type: freebsd-boot index: 1 end: 1063 start: 40 2. Name: ada1p2 Mediasize: 12884901888 (12G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r0w0e0 rawuuid: 42984815-f278-11e3-990a-001b211e2e44 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: swap1 length: 12884901888 offset: 544768 type: freebsd-swap index: 2 end: 25166887 start: 1064 3. Name: ada1p3 Mediasize: 2987707514880 (2.7T) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e2 rawuuid: 42c54127-f278-11e3-990a-001b211e2e44 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: zfs1 length: 2987707514880 offset: 12885446656 type: freebsd-zfs index: 3 end: 5860533127 start: 25166888 Consumers: 1. Name: ada1 Mediasize: 3000592982016 (2.7T) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e3 Geom name: da0 modified: false state: OK fwheads: 255 fwsectors: 63 last: 15633405 first: 3 entries: 4 scheme: GPT Providers: 1. Name: da0p1 Mediasize: 819200 (800K) Sectorsize: 512 Stripesize: 0 Stripeoffset: 1536 Mode: r0w0e0 rawuuid: 71f92853-0b8c-11e4-8fcb-002564f96db2 rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b label: (null) length: 819200 offset: 1536 type: efi index: 1 end: 1602 start: 3 2. Name: da0p2 Mediasize: 16384 (16K) Sectorsize: 512 Stripesize: 0 Stripeoffset: 820736 Mode: r0w0e0 rawuuid: 71f9287f-0b8c-11e4-8fcb-002564f96db2 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 16384 offset: 820736 type: freebsd-boot index: 2 end: 1634 start: 1603 3. Name: da0p3 Mediasize: 697991168 (666M) Sectorsize: 512 Stripesize: 0 Stripeoffset: 837120 Mode: r1w0e1 rawuuid: 71f9288e-0b8c-11e4-8fcb-002564f96db2 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 697991168 offset: 837120 type: freebsd-ufs index: 3 end: 1364898 start: 1635 4. Name: da0p4 Mediasize: 1048576 (1.0M) Sectorsize: 512 Stripesize: 0 Stripeoffset: 698828288 Mode: r0w0e0 rawuuid: 71f9289d-0b8c-11e4-8fcb-002564f96db2 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: (null) length: 1048576 offset: 698828288 type: freebsd-swap index: 4 end: 1366946 start: 1364899 Consumers: 1. Name: da0 Mediasize: 8004304896 (7.5G) Sectorsize: 512 Mode: r1w0e1 Geom name: diskid/DISK-20043512300A4E318DDE modified: false state: OK fwheads: 255 fwsectors: 63 last: 15633405 first: 3 entries: 4 scheme: GPT Providers: 1. Name: diskid/DISK-20043512300A4E318DDEp1 Mediasize: 819200 (800K) Sectorsize: 512 Stripesize: 0 Stripeoffset: 1536 Mode: r0w0e0 rawuuid: 71f92853-0b8c-11e4-8fcb-002564f96db2 rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b label: (null) length: 819200 offset: 1536 type: efi index: 1 end: 1602 start: 3 2. Name: diskid/DISK-20043512300A4E318DDEp2 Mediasize: 16384 (16K) Sectorsize: 512 Stripesize: 0 Stripeoffset: 820736 Mode: r0w0e0 rawuuid: 71f9287f-0b8c-11e4-8fcb-002564f96db2 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 16384 offset: 820736 type: freebsd-boot index: 2 end: 1634 start: 1603 3. Name: diskid/DISK-20043512300A4E318DDEp3 Mediasize: 697991168 (666M) Sectorsize: 512 Stripesize: 0 Stripeoffset: 837120 Mode: r0w0e0 rawuuid: 71f9288e-0b8c-11e4-8fcb-002564f96db2 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b label: (null) length: 697991168 offset: 837120 type: freebsd-ufs index: 3 end: 1364898 start: 1635 4. Name: diskid/DISK-20043512300A4E318DDEp4 Mediasize: 1048576 (1.0M) Sectorsize: 512 Stripesize: 0 Stripeoffset: 698828288 Mode: r0w0e0 rawuuid: 71f9289d-0b8c-11e4-8fcb-002564f96db2 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: (null) length: 1048576 offset: 698828288 type: freebsd-swap index: 4 end: 1366946 start: 1364899 Consumers: 1. Name: diskid/DISK-20043512300A4E318DDE Mediasize: 8004304896 (7.5G) Sectorsize: 512 Mode: r0w0e0 Any ideas on how to debug this further? Regards, Michael Jung GoPai.com<http://GoPai.com> | Facebook.com/PaymentAlliance<http://Facebook.com/PaymentAlliance> [cid:iso] CONFIDENTIALITY NOTE: This message is intended only for the use of the individual or entity to whom it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this transmission in error, please notify us by telephone at (502) 212-4001 or notify us at PAI , Dept. 99, 6060 Dutchmans Lane, Suite 320, Louisville, KY 40205
Xin Li
2014-Jul-31 01:39 UTC
r269147 fails to boot after ZFS pool upgrade and new boot code installation
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 07/29/14 07:04, Michael Jung wrote:> Everyone, > > The freebsd-fs was silent about this post so I'm hoping someone > will chime in here. > > 10-stable r269147: Upgraded the zfs pool to 5000 and installed new > bootcode. The system was working fine prior to upgrading the pool. > > NOTE: Due to the BIOS not supporting drives > 2TB in ACHI mode > this MB is running in legacy IDE mode. I understand the speed > implications of this - it is just a test box. > > ZFS MIRROR BOOT ada0/ada1 > > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad0 gpart > bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ad1 > > Loading Operating System ... ZFS: i/o error - all block copies > unavailable ZFS: can't read object set for dataset u ZFS: can't > open root filesystem gptzsboot: failed to mount default pool zroot > > FreBSD/x86 boot Default zroot: boot: > > I tried to recover using > > FreeBSD-Stable USB Live CD r268571 but could not import the pool.The feature was merged in r268649 so this is expected.> FreeBSD-11-Current r268622 LIVE CD (USB) imports the pool fine. > > Only two mirrored drives attached to onboard SATA. Both drives > show up in = BIOS as first two boot devices. > > I attempted to install the r269147 bootcode again like: > > # zpool import -f -N zroot # mkdir /tmp/zroot # mount -r -t zfs > zroot/ROOT/default /tmp/zroot # gpart bootcode -b > /tmp/zroot/boot/pmbr -p /tmp/zroot/boot/gptzfsboot -i 1= ada0 # > gpart bootcode -b /tmp/zroot/boot/pmbr -p > /tmp/zroot/boot/gptzfsboot -i 1= ada1 > > > but resulted in same problem. I also tried installing 11-current > bootcode = r268622 which also fails to boot. > > (I did not export the pool. I even tried power reset after writing > bootcod= e)This shouldn't matter.> gpart list/show: > > > 34 5860533101 ada0 GPT (2.7T) > > 34 6 - free - (3.0K) > > 40 1024 1 freebsd-boot (512K) > > 1064 25165824 2 freebsd-swap (12G) > > 25166888 5835366240 3 freebsd-zfs (2.7T) > > 5860533128 7 - free - (3.5K)Just a wild guess -- how much space have you used in the pool? And what's the exact BIOS limitation on 2TB drives? I'm asking because the gptzfsboot stage, there is no driver present and the system still rely on BIOS's functionality to do disk access. If the data is located outside BIOS's reach -- there are some strange ones of them, like 137GB, 2TiB, etc., then the gptzfsboot may not be able to read data from the pool if it has to reach out these portion of disk. Note that it's generally a good idea to use a small, dedicated zfs pool located at the beginning of disk(s) as root pool anyways. Cheers, - -- Xin LI <delphij at delphij.net> https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0 iQIcBAEBCgAGBQJT2Z5aAAoJEJW2GBstM+nsePwP/AhJCWmyVOJwb0hTTtwnKV8O eqJNe2u5NwBns+5kSSCDnYKodgOlq2MXaW5UFswg+Rh6Qiyze/xyj1UBHq+oA5rR YBNgh5XwAxGfdWeSO/26WLtylRjwcnYoqjUpbWauqpvxjxOd7AoAkaXUz6BkIu26 tKhjJnN4kiUdhUsHmWP4A2PU/sRqetWIp/MusgR4+NLVhI6Gw6G+RbRo+YFXPbPO KTKMOJeg+bGX8W4SUMM3MVWKNh8ju37IYo5cqBN1EfYgr3CT/y7uSQes+v3iC8nQ jYsghIp4YMZzh8NDLAPX83cBb6FsXNjd17HmByX+kagOYEDP8/fe7dsuXm0KYTYF dtAeGRuup6Gl2RNyfbo2z/INXgWYUPlT5I4a9b7bohLK2bCm2MQZ/IUER3NYjx2b +BqvCwn7P21V54e+iXbMCdQYyXf0fAkNqVFxsoIjHPxPD9wLPHx7+KF+um0Qrpm5 luGLtV9j4t1xOCyxsGZmndDPKgFfVtnNq/5Ykj+cD2oJhIQc7UZwa2UfahO0NwPb tmkZEtkkwD/H0pRcWx8Os51Adm9anXzbhwXF33HZaaF8sXnsgIgaAv1clwC4gEI5 g1r6mGEN3J2ty49Y7xDqQ3FVwj8VVSZ6PObKhgtWnS05CFI4OPtIyjOlD8FSj4tr BnNsREoSSsQKgGDUzz3J =stUo -----END PGP SIGNATURE-----