From owner-freebsd-fs@freebsd.org Wed Apr 27 12:31:11 2016 Return-Path: Delivered-To: freebsd-fs@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 F140CB1DC98 for ; Wed, 27 Apr 2016 12:31:11 +0000 (UTC) (envelope-from girgen@FreeBSD.org) Received: from mail.pingpong.net (mail.pingpong.net [79.136.116.202]) by mx1.freebsd.org (Postfix) with ESMTP id B1F2E106A for ; Wed, 27 Apr 2016 12:31:11 +0000 (UTC) (envelope-from girgen@FreeBSD.org) Received: from nt9.bahnhof.se (nt9.bahnhof.se [213.136.34.39]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.pingpong.net (Postfix) with ESMTPSA id 0FE9215C8B; Wed, 27 Apr 2016 14:31:10 +0200 (CEST) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Moved disks to new machine. Zfs won't boot From: Palle Girgensohn In-Reply-To: <5720A40B.2070305@quip.cz> Date: Wed, 27 Apr 2016 14:31:09 +0200 Cc: freebsd-fs@freebsd.org, Julian Akehurst Content-Transfer-Encoding: quoted-printable Message-Id: <8F08B233-8E7F-4287-BB67-FED75A1F617A@FreeBSD.org> References: <0E6A1067-B066-4C73-8D9C-BFA95C6FA338@FreeBSD.org> <5720A40B.2070305@quip.cz> To: Miroslav Lachman <000.fbsd@quip.cz> X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2016 12:31:12 -0000 > 27 apr. 2016 kl. 13:35 skrev Miroslav Lachman <000.fbsd@quip.cz>: >=20 > Palle Girgensohn wrote on 04/27/2016 12:53: >> Hi, >>=20 >> We had a faulty machine and thought the simple solution to get our = systems online would be to move the disks to another identical box. >>=20 >> But now the ZFS will not boot. >>=20 >> I booted as USB stick and I can see the zfs pool after importing it = with >>=20 >> zpool import -o altroot=3D/mnt -f tank >>=20 >> after this, I can see the pool and the file systems, but a reboot = will not see the disk in BIOS, and I have my root there... :-/ >>=20 >> gpart bootcode is installed (again, should really have been there = already) >>=20 >>=20 >>=20 >> The machines are HP DL380 G7 woth P410i. >>=20 >> any ideas? zpool.cache? >=20 > I think altroot disabled refreshing of zpool.cache. So you need to = export and import pool without altroot option or you can manually copy = this file. (I did something like this few years ago so I don't remember = it well) >=20 > The next problem can be the RAID controller. Was this same controller = on an old machine too? There are some controllers that does not show all = attached drives at boot time so RAIDZ configurations cannot boot on it. >=20 > Miroslav Lachman Hi, Thanks for your reply. Yes, it was the cache file.=20 zpool import refused to import unless I added a -f. so booting from a memory stick and running zpool import -o altroot=3D/mnt -f tank rm /mnt/boot/zfs/zpool.cache zpool export zpool import -o altroot/mnt tank # this time it didn't require -f reboot did the trick. fresh cache file with the new machine's IDs. Simple once you know it... :-/ Palle