Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2013 10:46:36 +0200 (CEST)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        David Demelier <demelier.david@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ZFS mounting failed with error 2
Message-ID:  <alpine.BSF.2.00.1304101040560.77823@mail.fig.ol.no>
In-Reply-To: <CAO%2BPfDev1L_1DcH8K8FwdAo8Sbd0-M5=j6tm6QyS%2BpixJbG9og@mail.gmail.com>
References:  <CAO%2BPfDev1L_1DcH8K8FwdAo8Sbd0-M5=j6tm6QyS%2BpixJbG9og@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--2055831798-1661834366-1365583596=:77823
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT

On Wed, 10 Apr 2013 10:16+0200, David Demelier wrote:

> Hello
> 
> I have tried to create a GPT partition scheme on my machine. I've
> created some dataset like that :
> 
> tank/usr
> tank/usr/ports
> tank/usr/src
> tank/var/
> tank/var/log
> 
> (Please note that is a test on a virtual machine before applying to a
> real machine).
> 
> I've tried to generate the zpool.cache like that:
> 
> zpool import -o cachefile=/tmp/zpool.cache -o altroot=/mnt -f
> cp /tmp/zpool.cache /mnt/boot/zfs/
> 
> And then tried to set mount point to legacy and bootfs with :
> 
> zfs set bootfs=tank tank
> zfs set mountpoint=legacy tank
> 
> The following commands made a lot of warnings :
> 
> zfs set mountpoint=/usr tank/usr
> zfs set mountpoint=/var tank/var
> ...
> 
> After, the import on the livecd shell generated the error :
> 
> cannot mount '/mnt/var': failed to create mountpoint.
> 
> I must say that it is very hard to make a ZFS working machine, there
> are a lot of pages on the Wiki and most of them are a little bit
> outdated..

Try to use /tmp/mnt as a temporary altroot. /tmp should be writeable. 
Not sure about / within the livecd env.

When you set mountpoints using the above commands, the filesystems are 
actually being mounted at their specified mountpoint.

Unless the filesystems contain some actual files, more to the point, 
critical files, i.e. libraries and executables, then you are out of 
luck.

My own blog entry is a bit (out)dated, but maybe it's worth a look:

http://ximalas.info/2011/10/17/zfs-root-fs-on-freebsd-9-0/

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+
--2055831798-1661834366-1365583596=:77823--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1304101040560.77823>