From owner-freebsd-geom@FreeBSD.ORG Sat Mar 8 06:44:56 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E46E51065671 for ; Sat, 8 Mar 2008 06:44:56 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 82D178FC1E for ; Sat, 8 Mar 2008 06:44:56 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 13834 invoked by uid 2001); 8 Mar 2008 06:44:55 -0000 Date: Sat, 8 Mar 2008 00:44:55 -0600 From: "Rick C. Petty" To: Damian Wiest Message-ID: <20080308064455.GA13341@keira.kiwi-computer.com> References: <20080307230058.GA8902@keira.kiwi-computer.com> <20080308024954.GF15859@dfwdamian.vail> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080308024954.GF15859@dfwdamian.vail> User-Agent: Mutt/1.4.2.3i Cc: freebsd-geom@freebsd.org Subject: Re: geom_vinum platform-independent brokenness X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 06:44:57 -0000 On Fri, Mar 07, 2008 at 08:49:54PM -0600, Damian Wiest wrote: > > So you're saying that you should be able to remove a disk (or set of disks) > from an x86 system, install it in a system running the amd64 release and > have things just work? That is the plan. At work, we have a couple of machines on which we wanted to try amd64, but couldn't boot since the root fs is in gvinum. It makes sense for people who want perhaps to dual boot or otherwise want to migrate their data. > I would imagine that most people would simply use > dump/restore, but I agree that it would be nice if one didn't have to do > this. That solution obviously requires twice the disk space. It's especially worse if you're using RAID5. At home I'm considering upgrading to amd64 (since it's only a file server), but I don't have 4 TB of spare disks lying around for the migration. > How is this scenario handled for basic disks? I'm not sure I understand your question. > Can an amd64 system > handle a disk that was labeled on an x86 system? No, that was exactly the problem I am describing. It noticed that there were vinum disks, but the configuration was all screwed up. > I haven't ever tried > this, but the manpage for bsdlabel suggests that it won't work unless > you originally wrote an amd64 label by using the -m option. I'm not talking about the disklabel here. geom_vinum takes up the first 265 sectors (512 bytes each) to store its configuration. These are straight-up disks that aren't needed in Windoze or other OS-- just plain FreeBSD, so we use the full disks without labels or MBR partitions. > Aren't you going to run into issues with your filesystems when moving > from one architecture to another that uses a different bus width? How so? Are you saying there are bugs in UFS which will prevent this from working? If so, this is a much bigger problem than I anticipated. Looking at sys/ufs/ffs/fs.h, I do see a bunch of pointers in the superblock structure ("struct fs"), but all other superblock fields and other on-disk structures have fixed size values. Also there's a sanity test on the size of the "struct fs". Someone clearly has thought of this problem (McKusick ?). After some minimal testing of mounting i386-created UFS2 volumes on amd64, everything seems to work just fine. I've also investigated geom_mirror, and the on-disk structure seems clean. There may be others that are broken, but geom_vinum is what I've noticed and that is what I intend to fix. If UFS *is* broken, it should be fixed also. Thank you for reminding me to test the filesystem! -- Rick C. Petty