Moved disks to new machine. Zfs won't boot

Palle Girgensohn girgen at FreeBSD.org
Wed Apr 27 12:31:12 UTC 2016


> 27 apr. 2016 kl. 13:35 skrev Miroslav Lachman <000.fbsd at quip.cz>:
> 
> Palle Girgensohn wrote on 04/27/2016 12:53:
>> Hi,
>> 
>> 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.
>> 
>> But now the ZFS will not boot.
>> 
>> I booted as USB stick and I can see the zfs pool after importing it with
>> 
>> zpool import -o altroot=/mnt -f tank
>> 
>> 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... :-/
>> 
>> gpart bootcode is installed (again, should really have been there already)
>> 
>> 
>> 
>> The machines are HP DL380 G7 woth P410i.
>> 
>> any ideas? zpool.cache?
> 
> 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)
> 
> 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.
> 
> Miroslav Lachman

Hi,

Thanks for your reply.

Yes, it was the cache file. 

zpool import refused to import unless I added a -f.

so booting from a memory stick and running

zpool import -o altroot=/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



More information about the freebsd-fs mailing list