Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2015 14:45:29 +0000
From:      krad <kraduk@gmail.com>
To:        =?UTF-8?B?WMSrY8Oy?= <xico@atelo.org>
Cc:        FreeBSD FS <freebsd-fs@freebsd.org>
Subject:   Re: ZFS root set to readonly=on temporary at boot
Message-ID:  <CALfReyc0BRc5NHwwhDquOU37u%2BZ5PDxizAU6HLv=9e5JpupEMQ@mail.gmail.com>
In-Reply-To: <20150220214952.GA13839@coyotlan.Tlalpan>
References:  <20150218191345.GA31812@coyotlan.Tlalpan> <CALfReyfgqJK5iCGJdQoAqvqL9aJ%2BWQ77hQ95QB%2BayKUJyZN7qQ@mail.gmail.com> <20150220214952.GA13839@coyotlan.Tlalpan>

next in thread | previous in thread | raw e-mail | index | archive | help
either drop the
  vfs.root.mountfrom=3D"zfs:zroot"
or add
  vfs.root.mountfrom.options=3Drw
to the loader.conf

you might be 1/2 overriding the defaul vaules picked up from the bootfs
attribute

also make sure you have
zfs_enable=3Dyes set in you rc system

best to use the following as there are a multitude of places it can end up
getting unset these days

# sysrc  zfs_enable
zfs_enable: yes




On 20 February 2015 at 21:49, X=C4=ABc=C3=B2 <xico@atelo.org> wrote:

> On Thu, Feb 19, 2015 at 12:12:54PM +0000, krad wrote:
> > Check your bootfs and the / file system actually match up. Its quite ea=
sy
> > to get odd things happening if you have the bootfs set to a filesystem
> that
> > then has an fstab which then tells / is on another fs. Also check the
> > loader.conf on the bootfs. In my experiance its safer to have clean
> fstabs,
> > and nothing in the loader.conf (in relation to this) and just relay on
> the
> > bootfs pool property
>
> Thanks for the tips. I still could not figure it out though. My
> partition scheme is as follows:
>
>   # gpart show
>   =3D>        34  3907029101  ada0  GPT  (1.8T)
>             34         128     1  freebsd-boot  (64K)
>            162     8388608     2  freebsd-swap  (4.0G)
>        8388770  3898640365     3  freebsd-zfs  (1.8T)
>
> with a bootcode installed by:
>
>   # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
>
> The bootfs property of the zpool seems to be set to the correct root:
>
>   # zpool get bootfs zroot
>   NAME   PROPERTY  VALUE   SOURCE
>   zroot  bootfs    zroot   local
>   # zfs list zroot
>   NAME    USED  AVAIL  REFER  MOUNTPOINT
>   zroot  2.16G  1.75T   509M  /
>
> The /etc/fstab only lists the swap partition (and there are no other
> fstab files, nor any unmounted snapshot/partitions):
>
>   # cat /etc/fstab
>   /dev/label/swap none swap sw 0 0
>
> My loader.conf appears to be required for the server to boot:
>
>   # cat /boot/loader.conf
>   zfs_load=3D"YES"
>   vfs.root.mountfrom=3D"zfs:zroot"
>
> Also, the root is mounted in read/write when manually imported from
> another system:
>
>   # zpool import -R /mnt zroot
>   # zfs get readonly zroot
>   NAME   PROPERTY  VALUE   SOURCE
>   zroot  readonly  off     temporary
>
> Anyway, it is not that huge a problem, but it is quite inconvenient not
> to understand what could be the reason behind that. As far as I can
> tell, it may be related to the fact that my root was not created in its
> own dataset:
>
>   # zfs list
>   NAME                    USED  AVAIL  REFER  MOUNTPOINT
>   zroot                  2.16G  1.75T   509M  /
>   zroot/ezjail            984M  1.75T    27K  /usr/jails
>   zroot/var               284M  1.75T  10.6M  /var
>   [=E2=80=A6]
>
> I might check that later on.
>
> Best,
>
> X=C4=ABc=C3=B2
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALfReyc0BRc5NHwwhDquOU37u%2BZ5PDxizAU6HLv=9e5JpupEMQ>