Booting r298488 as Xen Dom0 may break ZFS pool?
Marcin Cieslak
saper at saper.info
Sat Apr 23 22:40:24 UTC 2016
On a freshly installed (via upgrade from 10.3 from source)
-CURRENT on this machine:
FreeBSD 11.0-CURRENT #0 r298488: Sat Apr 23 11:10:01 UTC 2016
root at o.saper.info:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
WARNING: WITNESS option enabled, expect reduced performance.
VT(vga): resolution 640x480
CPU: Intel(R) Xeon(R) CPU E31245 @ 3.30GHz (3300.09-MHz K8-class CPU)
Origin="GenuineIntel" Id=0x206a7 Family=0x6 Model=0x2a Stepping=7
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Features2=0x1fbae3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX>
AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
AMD Features2=0x1<LAHF>
XSAVE Features=0x1<XSAVEOPT>
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
TSC: P-state invariant, performance statistics
real memory = 17179869184 (16384 MB)
avail memory = 16475140096 (15711 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <ALASKA A M I>
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 hardware threads
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-23 on motherboard
... i am trying to boot the system as Dom0 under Xen (4.5.2_2
installed via pkg install).
The kernel boots in one of four cases, mostly
though I don't get a block cursor after Xen messages
and the machine sits and waits.
After trying Xen suddenly the system no longer
boots again:
Booting from local disk...
PXE-M0F: Existing Intel Boot Agent.
ZFS: i/o error - all block copies unavailable
ZFS: i/o error - all block copies unavailable
ZFS: i/o error - all block copies unavailable
Can't find /boot/zfsloader
FreeBSD/x86 boot
Default: zroot:/boot/kernel/kernel
boot:
ZFS: i/o error - all block copies unavailable
(...)
The zpool imports without problems when
booting from the rescue mfsbsd (10.3):
pool: zroot
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0p3 ONLINE 0 0 0
ada1p3 ONLINE 0 0 0
errors: No known data errors
gpart layout:
=> 34 5860533101 ada0 GPT (2.7T)
34 1024 1 freebsd-boot (512K)
1058 4194304 2 freebsd-swap (2.0G)
4195362 5856337773 3 freebsd-zfs (2.7T)
=> 34 5860533101 ada1 GPT (2.7T)
34 1024 1 freebsd-boot (512K)
1058 4194304 2 freebsd-swap (2.0G)
4195362 5856337773 3 freebsd-zfs (2.7T)
I have managed to make zpool boot again by doing voodoo
similar to this one:
[root at rescue ~]# zpool import -R /mnt zroot
[root at rescue ~]# mount -t devfs devfs /mnt/dev
[root at rescue ~]# chroot /mnt /bin/tcsh
(... Running make install in /usr/src/sys/boot ...)
root at rescue:/ # gpart bootcode -p /boot/gptzfsboot -i 1 ada0
partcode written to ada0p1
root at rescue:/ # gpart bootcode -p /boot/gptzfsboot -i 1 ada1
partcode written to ada1p1
root at rescue:/ # exit
[root at rescue ~]# umount /mnt/dev
[root at rescue ~]# zpool export zroot
[root at rescue ~]# reboot
Why zpool metadata get corrupted?
--
Marcin
Xen commandline from /boot/loader.conf:
xen_kernel="/boot/xen"
xen_cmdline="dom0_mem=2048M dom0_max_vcpus=4 dom0pvh=1 com1=115200,8n1 guest_loglvl=all loglvl=all"
dmesg when started under Xen successfully:
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r298488: Sat Apr 23 11:10:01 UTC 2016
root at o.saper.info:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
WARNING: WITNESS option enabled, expect reduced performance.
VT(vga): text 80x25
CPU: Intel(R) Xeon(R) CPU E31245 @ 3.30GHz (3300.02-MHz K8-class CPU)
Origin="GenuineIntel" Id=0x206a7 Family=0x6 Model=0x2a Stepping=7
Features=0x1fc3ebff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,PGE,MCA,CMOV,PAT,PSE36,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT>
Features2=0x9fb82283<SSE3,PCLMULQDQ,EST,SSSE3,CX16,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,HV>
AMD Features=0x20100800<SYSCALL,NX,LM>
AMD Features2=0x1<LAHF>
XSAVE Features=0x1<XSAVEOPT>
TSC: P-state invariant, performance statistics
Hypervisor: Origin = "XenVMMXenVMM"
real memory = 2152079360 (2052 MB)
avail memory = 2025705472 (1931 MB)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
More information about the freebsd-virtualization
mailing list