From owner-freebsd-sparc64@freebsd.org Sat Oct 17 19:38:24 2015 Return-Path: Delivered-To: freebsd-sparc64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC440A172DF for ; Sat, 17 Oct 2015 19:38:23 +0000 (UTC) (envelope-from bvasea@gmail.com) Received: from mail-qg0-x22e.google.com (mail-qg0-x22e.google.com [IPv6:2607:f8b0:400d:c04::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AF48CEB for ; Sat, 17 Oct 2015 19:38:23 +0000 (UTC) (envelope-from bvasea@gmail.com) Received: by qgbb65 with SMTP id b65so22313765qgb.2 for ; Sat, 17 Oct 2015 12:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cyVOJfoKAsnlVULrn5r/DQFjEYZYtiKhjcBmCYzmXhw=; b=QB7KLNTQUoVARhRLXGblDcr4fWd6/ZvflNzCQPui1fqrKo537zk+TB3AE0xdTSRToU KMcXg8zRf60xC+eoJ9Z+LSYdLTBJT1AingKHwcGZtweUMTlro4OPOFtzypInPjYQ7TC0 9pcQEzRafGhveB5rD8b89dbelqUC+f+4/dva0AVoeDMNOeZlouaK8+DItcTDyVsZElIW ZwseiGRuyb8ANgtyYiN/pNkNzlk5hYnEifj6xG3E3Z2YdgBrG6N0zWXufM6CGnRrSLub kaPKnoPTySWfU5ph2KQ9kFDQjOKgS4/Wv3QWCyYTQn6g3gclIKOeP1JiFEvh/xSwl+sE eYKg== MIME-Version: 1.0 X-Received: by 10.140.34.208 with SMTP id l74mr26514116qgl.61.1445110702578; Sat, 17 Oct 2015 12:38:22 -0700 (PDT) Received: by 10.55.181.67 with HTTP; Sat, 17 Oct 2015 12:38:22 -0700 (PDT) In-Reply-To: <20151017184425.GR67524@funkthat.com> References: <20151017184425.GR67524@funkthat.com> Date: Sat, 17 Oct 2015 22:38:22 +0300 Message-ID: Subject: Re: UFS mount failure - disk slice created on and64, unable to mount on sparc64 From: Vasile Buruiana To: John-Mark Gurney Cc: freebsd-sparc64@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Oct 2015 19:38:24 -0000 Yesm I played with a harddisk connected via IDE to the sun and later to the laptop via USB-to-IDE adapter. Currently I'm trying to buildworkd+buildkernel on the sun using some contents of the /usr/obj cross-compiled on the amd-64 laptop to speed up the process (that's how I found the problem), so I'm writing these from my memory: This happened on the SUN: gpart create -s mbr ada0 gpart add -t freebsd ada0 gpart create -s bsd ada0s1 gpart add -s 1G -t freebsd-zfs ada0s1 newfs -U /dev/ada0s1 copy stuff, umount, invalid argument while attempting to mount on the laptop. gpart create -s vtoc8 ada0 gpart add -t freebsd ada0 gpart create -s bsd da0s1 gpart add -s 1G -t freebsd-zfs ada0s1 newfs -U /dev/ada0s1 copy suff, unmount, again invalid argument while attempting to mount on the laptop. Same when creating on the laptop and mounting on the sun. When moving the harddisk from one unit to the other, at boot (or at usb insert) the kernel reports: g_dev_taste: make_dev_p() failed (gp->name=da0a, error=17) or ada0a and many slices appear in /dev: da0a da0aa da0ab da0b da0c da0ca da0cb (or ada0s1a, ada0s1aa, ada0s1ab, ada0s1b, ada0s1bb, ada0s1c, ada0s1ca on the sparc64....) and so on, same for mbr/vtoc8, same for bsd/zfs. These are some geom-relaed errors as I read on some other mailing lists, so I tried to identify the problem by simplifying things until I reduced everything to image file attached to md. The Sparc also ran a FreeBSD 6.1-release perfectly, the ufs mbr partition could be mounted on a x86 for fsck or other maintenance with absolutely no problems. Seems that the advances in technology are still causing headaches in keeping the things simple. I will try to makefs -B big on the amd64 but I doubt i will also be able to mount it on the same machine. Best wishes Vasile On 10/17/15, John-Mark Gurney wrote: > Vasile Buruiana wrote this message on Sat, Oct 17, 2015 at 21:32 +0300: >> 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. > > Sadly, this is due to the fact that sparc64 is big endian, and our UFS > implementation isn't bi-endian... If you need to make a UFS file system > on amd64 for use on sparc64, use the makefs utility w/ the option -B big > to create it... > > Just ran into the same issue on an EdgeRouter Lite, which is a big > endian MIPS64 machine... > > Though I'm a bit surprized that it happens w/ ZFS as ZFS is suppose > to support either endianness automaticly.. Did you try this on raw > disks? > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." >