Date: Sat, 17 Oct 2015 21:32:00 +0300 From: Vasile Buruiana <bvasea@gmail.com> To: freebsd-sparc64@freebsd.org Subject: UFS mount failure - disk slice created on and64, unable to mount on sparc64 Message-ID: <CAGxf36RY6WcGiBYjvpMbYf-72F%2B42YR5m2TLw-wVtTyY5wBhdg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello Found a bug in FreeBSD 10.2. An UFS disk slice created under sparc64 cannot be mounted under amd64. And reverse: UFS disk slice created under amd64 cannot be mounted under sparc64. This also happens with hard disks on both MBR and VTOC8 partition schemes, on both UFS and ZFS filesystems. uname -a ________ sparc64: root@sun:/usr/home/skaarj # uname -a FreeBSD sun.home.com 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Thu Aug 13 01:16:49 UTC 2015 root@releng1.nyi.freebsd.org:/usr/obj/sparc64.sparc64/usr/src/sys/GENERIC sparc64 root@sun:/usr/home/skaarj # and amd64: root@supercow:/usr/home/skaarj # uname -a FreeBSD supercow.rompetrol.ro 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 root@supercow:/usr/home/skaarj # As we can see, both kernels are the generic. This is how you can simply reproduce the bug: _____________________________________ amd64: -> create 400MB disk image with dd, attach to md and format with newfs -> mount, copy some stuff(/bin), unmount, detach from md; -> md5+sh256 check of the image to see if they match when sent to the other side; -> send it with ftp to the sparc64 machine root@supercow:/usr/home/skaarj # dd if=/dev/zero of=/disk.img bs=8M count=50 50+0 records in 50+0 records out 419430400 bytes transferred in 6.336222 secs (66195661 bytes/sec) root@supercow:/usr/home/skaarj # mdconfig -a -u 0 /disk.img root@supercow:/usr/home/skaarj # newfs -U /dev/md0 /dev/md0: 400.0MB (819200 sectors) block size 32768, fragment size 4096 using 4 cylinder groups of 100.03MB, 3201 blks, 12928 inodes. with soft updates super-block backups (for fsck_ffs -b #) at: 192, 205056, 409920, 614784 root@supercow:/usr/home/skaarj # mount /dev/md0 /mnt root@supercow:/usr/home/skaarj # cp -R /bin /mnt root@supercow:/usr/home/skaarj # ls -l /mnt total 8 drwxrwxr-x 2 root operator 512 Oct 18 00:09 .snap drwxr-xr-x 2 root wheel 1024 Oct 18 00:10 bin root@supercow:/usr/home/skaarj # umount /mnt root@supercow:/usr/home/skaarj # md5 /disk.img MD5 (/disk.img) = ba7c649f74ddfce95e312a6f637e4a09 root@supercow:/usr/home/skaarj # sha256 /disk.img SHA256 (/disk.img) = 18d5d318e662cad6c7b20fd15faed33891300d6294835dc822d8099421747c52 root@supercow:/usr/home/skaarj # ftp 1.1.1.19 Connected to 1.1.1.19. 220 sun.home.com FTP server (Version 6.00LS) ready. Name (1.1.1.19:skaarj): skaarj Password: ftp> mput /disk.img 100% |************************************************| 400 MiB 5.08 MiB/s 00:00 ETA 226 Transfer complete. _______________________________________________________________________________ sparc64: -> md5+sha256 of image to compare; -> attach + md and mount root@sun:/usr/home/skaarj # md5 disk.img MD5 (disk.img) = ba7c649f74ddfce95e312a6f637e4a09 root@sun:/usr/home/skaarj # sha256 disk.img SHA256 (disk.img) = 18d5d318e662cad6c7b20fd15faed33891300d6294835dc822d8099421747c52 root@sun:/usr/home/skaarj # mdconfig -a -u 0 disk.img root@sun:/usr/home/skaarj # mount /dev/md0 /mnt mount: /dev/md0: Invalid argument root@sun:/usr/home/skaarj # _____________________________ no error output on /var/log/messages, no error output on dmesg when mount fails on both systems. Dmesgs after mount failure _______________________________________________________________________________ dmesg on sparc64: Copyright (c) 1992-2015 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 10.2-RELEASE #0 r286666: Thu Aug 13 01:16:49 UTC 2015 root@releng1.nyi.freebsd.org:/usr/obj/sparc64.sparc64/usr/src/sys/GENERIC sparc64 gcc version 4.2.1 20070831 patched [FreeBSD] real memory = 268435456 (256 MB) avail memory = 234143744 (223 MB) cpu0: Sun Microsystems UltraSparc-IIi Processor (400.00 MHz CPU) random: <Software, Yarrow> initialized kbd1 at kbdmux0 nexus0: <Open Firmware Nexus device> pcib0: <U2P UPA-PCI bridge> mem 0x1fe00000000-0x1fe0000ffff,0x1fe01000000-0x1fe0 10000ff irq 2032,2030,2031,2021 on nexus0 pcib0: Sabre, impl 0, version 0, IGN 0x1f, bus A, 66MHz pcib0: DVMA map: 0xc0000000 to 0xc3ffffff 8192 entries pcib0: [GIANT-LOCKED] pci0: <OFW PCI bus> on pcib0 pcib1: <APB PCI-PCI bridge> at device 1.1 on pci0 pci1: <OFW PCI bus> on pcib1 pcib1: device (null) requested unsupported I/O range 0x0-0xff ebus0: <PCI-EBus2 bridge> mem 0xf0000000-0xf0ffffff,0xf1000000-0xf17fffff at dev ice 1.0 on pci1 pcib2: <APB PCI-PCI bridge> at device 1.0 on pci0 pci2: <OFW PCI bus> on pcib2 auxio0: <Sun Auxiliary I/O> addr 0x1400726000-0x1400726003,0x1400728000-0x140072 8003,0x140072a000-0x140072a003,0x140072c000-0x140072c003,0x140072f000-0x140072f0 03 on ebus0 ebus0: <power> addr 0x1400724000-0x1400724003 irq 37 (no driver attached) ebus0: <SUNW,pll> addr 0x1400504000-0x1400504002 (no driver attached) scc0: <Siemens SAB 82532 dual channel SCC> addr 0x1400400000-0x140040007f irq 43 on ebus0 uart0: <SAB 82532 v3.2, channel A> on scc0 uart0: CTS oflow uart1: <SAB 82532 v3.2, channel B> on scc0 uart1: CTS oflow uart2: <16550 or compatible> addr 0x14003083f8-0x14003083ff irq 41 on ebus0 uart2: keyboard (1200,n,8,1) kbd0 at sunkbd0 uart3: <16550 or compatible> addr 0x14003062f8-0x14003062ff irq 42 on ebus0 ebus0: <ecpp> addr 0x14003043bc-0x14003043cb,0x140030015c-0x140030015d,0x1400700 000-0x140070000f irq 34 (no driver attached) ebus0: <fdthree> addr 0x14003023f0-0x14003023f7,0x1400706000-0x140070600f,0x1400 720000-0x1400720003 irq 39 (no driver attached) eeprom0: <EEPROM/clock> addr 0x1400000000-0x1400001fff on ebus0 eeprom0: model mk48t59 ebus0: <flashprom> addr 0x1000000000-0x10000fffff (no driver attached) pcm0: <Sun Audiocs> addr 0x1400200000-0x14002000ff,0x1400702000-0x140070200f,0x1 400704000-0x140070400f,0x1400722000-0x1400722003 irq 35,36 on ebus0 pcm0: <CS4231A Codec Id. 10> hme0: <Sun HME 10/100 Ethernet> mem 0xe0000000-0xe0007fff at device 1.1 on pci1 miibus0: <MII bus> on hme0 nsphy0: <DP83840 10/100 media interface> PHY 1 on miibus0 nsphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto hme0: Ethernet address: 08:00:20:ff:6e:88 machfb0: <ATI 3D Rage Pro> mem 0xe1000000-0xe1ffffff,0xe2000000-0xe2000fff at de vice 2.0 on pci1 machfb0: console machfb0: 16 MB aperture at 0xfe000000 not swapped machfb0: 4096 KB SGRAM 98.924 MHz, maximum RAMDAC clock 230 MHz, DSP machfb0: resolution 1152x900 at 8 bpp atapci0: <SiI (CMD) 646 WDMA2 controller> port 0xc00000-0xc00007,0xc00008-0xc000 0b,0xc00010-0xc00017,0xc00018-0xc0001b,0xc00020-0xc0002f at device 3.0 on pci1 ata2: <ATA channel> at channel 0 on atapci0 ata3: <ATA channel> at channel 1 on atapci0 syscons0: <System console> on nexus0 syscons0: Unknown <16 virtual consoles, flags=0x300> Timecounter "tick" frequency 400000000 Hz quality 1000 Event timer "tick" frequency 400000000 Hz quality 1000 Timecounters tick every 1.000 msec interrupt storm detected on "vec2016:"; throttling interrupt source ada0 at ata2 bus 0 scbus0 target 0 lun 0 ada0: <WDC WD800JB-00JJC0 05.01C05> ATA-6 device ada0: Serial Number WD-WCAM9N419109 ada0: 16.700MB/s transferscd0 at ata3 bus 0 scbus1 target 0 lun 0 cd0: <ASUS DRW-1608P3S 1.24> Removable CD-ROM SCSI device cd0: Serial Number 6AD0AA149275 cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present (WDMA2, PIO 8192bytes) random: unblocking device. ada0: 76319MB (156301488 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad0 ada1 at ata2 bus 0 scbus0 target 1 lun 0 ada1: <WDC WD800JB-00JJC0 05.01C05> ATA-6 device ada1: Serial Number WD-WCAM9V150577 ada1: 16.700MB/s transfers (WDMA2, PIO 8192bytes) ada1: 76319MB (156301488 512 byte sectors: 16H 63S/T 16383C) ada1: Previously was known as ad1 Trying to mount root from ufs:/dev/ada0a [rw]... _______________________________________________________________________ dmesg on amd64: _______________________________________________________________________ Copyright (c) 1992-2015 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 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 CPU: Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz (2594.16-MHz K8-class CPU) Origin="GenuineIntel" Id=0x306a9 Family=0x6 Model=0x3a Stepping=9 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=0x7fbae3bf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND> AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM> AMD Features2=0x1<LAHF> Structured Extended Features=0x281<FSGSBASE,SMEP,ERMS> XSAVE Features=0x1<XSAVEOPT> VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID TSC: P-state invariant, performance statistics real memory = 4294967296 (4096 MB) avail memory = 3777761280 (3602 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: <LENOVO TP-G1 > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 SMT threads cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 ioapic0 <Version 2.0> irqs 0-23 on motherboard random: <Software, Yarrow> initialized kbd1 at kbdmux0 acpi0: <LENOVO TP-G1> on motherboard acpi_ec0: <Embedded Controller: GPE 0x11, ECDT> port 0x62,0x66 on acpi0 acpi0: Power Button (fixed) cpu0: <ACPI CPU> on acpi0 cpu1: <ACPI CPU> on acpi0 cpu2: <ACPI CPU> on acpi0 cpu3: <ACPI CPU> on acpi0 attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 950 Event timer "HPET" frequency 14318180 Hz quality 550 Event timer "HPET1" frequency 14318180 Hz quality 440 Event timer "HPET2" frequency 14318180 Hz quality 440 Event timer "HPET3" frequency 14318180 Hz quality 440 Event timer "HPET4" frequency 14318180 Hz quality 440 atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 acpi_lid0: <Control Method Lid Switch> on acpi0 acpi_button0: <Sleep Button> on acpi0 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0 pci0: <ACPI PCI bus> on pcib0 vgapci0: <VGA-compatible display> port 0x6000-0x603f mem 0xf0000000-0xf03fffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0 agp0: <IvyBridge mobile GT2 IG> on vgapci0 agp0: aperture size is 256M, detected 65532k stolen memory vgapci0: Boot video device xhci0: <Intel Panther Point USB 3.0 controller> mem 0xf2520000-0xf252ffff irq 16 at device 20.0 on pci0 xhci0: 32 bytes context size, 64-bit DMA xhci0: Port routing mask set to 0xffffffff usbus0 on xhci0 pci0: <simple comms> at device 22.0 (no driver attached) em0: <Intel(R) PRO/1000 Network Connection 7.4.2> port 0x6080-0x609f mem 0xf2500000-0xf251ffff,0xf253b000-0xf253bfff irq 20 at device 25.0 on pci0 em0: Using an MSI interrupt em0: Ethernet address: 28:d2:44:10:3f:ae ehci0: <Intel Panther Point USB 2.0 controller> mem 0xf253a000-0xf253a3ff irq 16 at device 26.0 on pci0 usbus1: EHCI version 1.0 usbus1 on ehci0 hdac0: <Intel Panther Point HDA Controller> mem 0xf2530000-0xf2533fff irq 22 at device 27.0 on pci0 pcib1: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0 pci2: <ACPI PCI bus> on pcib1 sdhci_pci0: <RICOH R5CE823 SD> mem 0xf1d00000-0xf1d000ff irq 16 at device 0.0 on pci2 sdhci_pci0: 1 slot(s) allocated pcib2: <ACPI PCI-PCI bridge> irq 17 at device 28.1 on pci0 pci3: <ACPI PCI bus> on pcib2 pci3: <network> at device 0.0 (no driver attached) pcib3: <ACPI PCI-PCI bridge> irq 18 at device 28.2 on pci0 pci4: <ACPI PCI bus> on pcib3 ehci1: <Intel Panther Point USB 2.0 controller> mem 0xf2539000-0xf25393ff irq 23 at device 29.0 on pci0 usbus2: EHCI version 1.0 usbus2 on ehci1 isab0: <PCI-ISA bridge> at device 31.0 on pci0 isa0: <ISA bus> on isab0 ahci0: <Intel Panther Point AHCI SATA controller> port 0x60a8-0x60af,0x60b4-0x60b7,0x60a0-0x60a7,0x60b0-0x60b3,0x6060-0x607f mem 0xf2538000-0xf25387ff irq 19 at device 31.2 on pci0 ahci0: AHCI v1.30 with 6 6Gbps ports, Port Multiplier not supported ahcich0: <AHCI channel> at channel 0 on ahci0 ahcich1: <AHCI channel> at channel 1 on ahci0 ahcich4: <AHCI channel> at channel 4 on ahci0 ahciem0: <AHCI enclosure management bridge> on ahci0 acpi_tz0: <Thermal Zone> on acpi0 atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0 atkbd0: <AT Keyboard> irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: model Generic PS/2 mouse, device ID 0 battery0: <ACPI Control Method Battery> on acpi0 acpi_acad0: <AC Adapter> on acpi0 orm0: <ISA Option ROM> at iomem 0xc0000-0xcffff on isa0 sc0: <System console> at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ppc0: cannot reserve I/O port range est0: <Enhanced SpeedStep Frequency Control> on cpu0 est1: <Enhanced SpeedStep Frequency Control> on cpu1 est2: <Enhanced SpeedStep Frequency Control> on cpu2 est3: <Enhanced SpeedStep Frequency Control> on cpu3 Timecounters tick every 1.000 msec hdacc0: <Realtek ALC269 HDA CODEC> at cad 0 on hdac0 hdaa0: <Realtek ALC269 Audio Function Group> at nid 1 on hdacc0 pcm0: <Realtek ALC269 (Analog 2.0+HP/2.0)> at nid 20,21 and 24 on hdaa0 pcm1: <Realtek ALC269 (Internal Analog Mic)> at nid 18 on hdaa0 hdacc1: <Intel Panther Point HDA CODEC> at cad 3 on hdac0 hdaa1: <Intel Panther Point Audio Function Group> at nid 1 on hdacc1 pcm2: <Intel Panther Point (HDMI/DP 8ch)> at nid 5 on hdaa1 pcm3: <Intel Panther Point (HDMI/DP 8ch)> at nid 6 on hdaa1 pcm4: <Intel Panther Point (HDMI/DP 8ch)> at nid 7 on hdaa1 random: unblocking device. usbus0: 5.0Gbps Super Speed USB v3.0 usbus1: 480Mbps High Speed USB v2.0 usbus2: 480Mbps High Speed USB v2.0 ugen1.1: <Intel> at usbus1 uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1 ugen0.1: <0x8086> at usbus0 uhub1: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 ugen2.1: <Intel> at usbus2 uhub2: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2 ses0 at ahciem0 bus 0 scbus3 target 0 lun 0 ses0: <AHCI SGPIO Enclosure 1.00 0001> SEMB S-E-S 2.00 device ses0: SEMB SES Device ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: <ST320LT007-9ZV142 0005LVM1> ATA8-ACS SATA 2.x device ada0: Serial Number W0Q9KW2S ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 305245MB (625142448 512 byte sectors: 1H 63S/T 16383C) ada0: quirks=0x1<4K> ada0: Previously was known as ad4 cd0 at ahcich1 bus 0 scbus1 target 0 lun 0 cd0: <PLDS DVD-RW DS8A8SH KU54> Removable CD-ROM SCSI device cd0: Serial Number S45N7602Z1ZM1R00KBEN cd0: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed SMP: AP CPU #1 Launched! SMP: AP CPU #2 Launched! SMP: AP CPU #3 Launched! Timecounter "TSC-low" frequency 1297082444 Hz quality 1000 uhub1: 8 ports with 8 removable, self powered Root mount waiting for: usbus2 usbus1 uhub0: 3 ports with 3 removable, self powered uhub2: 3 ports with 3 removable, self powered Root mount waiting for: usbus2 usbus1 ugen1.2: <vendor 0x8087> at usbus1 uhub3: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus1 ugen2.2: <vendor 0x8087> at usbus2 uhub4: <vendor 0x8087 product 0x0024, class 9/0, rev 2.00/0.00, addr 2> on usbus2 Root mount waiting for: usbus2 usbus1 uhub3: 6 ports with 6 removable, self powered uhub4: 8 ports with 8 removable, self powered ugen1.3: <Lenovo> at usbus1 Root mount waiting for: usbus1 ugen1.4: <Broadcom Corp> at usbus1 ugen1.5: <Ricoh Company Ltd.> at usbus1 Trying to mount root from ufs:/dev/ada0s4a [rw]... ____________________________________________________ Please advise Best wishes, Vasile
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGxf36RY6WcGiBYjvpMbYf-72F%2B42YR5m2TLw-wVtTyY5wBhdg>