tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ZFS - mounting filesystems (Was CVS commit: src/etc)

Simon Burge <> writes:

> I'm using ZFS as my root filesystem, with the EFI boot loader reading
> the kernel from the ZFS root filesystem.  This is based on the the
> FreeBSD libsa ZFS code.
> is this work, and I'm planning on merging into main NetBSD sources soon.

Very cool - I had no idea that was about to land.

> Later, Greg Troxel wrote:
>> It makes sense to have a boolean "critical" property (the name you
>> suggested is fine) for zfs volumes that specify a mount point, so that
>> such volumes would be mounted in mountcritlocal.  I am 100% happy for
>> someone to add that and see no big problems.
> I will look into doing more on this, depending on the outcome of
> discussion on just "mountlocal" below.

It would be a safer change, not doing a critical rototill.

> Another idea that came up in off-list discussion with Taylor is in the
> same vein as this - the whole notion of "critical".  So changing from
>         mountcritlocal
>         mountcritremote
>         mountall
> to
>         mountlocal
>         mountcritremote
>         mountremote
> or even just a simpler
>         mountlocal
>         mountremote
> Do we have any valid need to have non-critical local filesystems?

Historically this is tied up with two things:

  separate / and /usr (the longstanding tradition, which needs to be

  diskless workstations and system partitions over NFS, especially where
  / and /usr are separate, because /usr is shared

critical filesystems are mounted before NETWORKING, and then mountall
happens before some other barrier before daemons start.  So the idea is
that critical filesystems are those needed to bring up networking at
least, and that other filesystems might be then mounted via a mechanism
that *requires networking*.

> For what it's worth, FreeBSD appears to do things in this order:
>         /etc/rc.d/zpool
>                 load all cached zpools
>         /etc/rc.d/zvol
>                 load zvols for swapping onto
>         /etc/rc.d/root
>                 mount -uw /
>         /etc/rc.d/mountcritlocal
>                 mount all non-NFS filesystems (except non-legacy ZFS)

So freebsd has decided to call all non-remote filesystems in fstab
during mountcritlocal.  That's basically deciding that there is no point
to refrain from mounting local filesystems (in fstab)

>         /etc/rc.d/zfs
>                 zfs mount -a (and zfs share -a)
>         [ ... much later on ... ]

this can be viewed as mountcritzfs and belonging in mountcritlocal

>         /etc/rc.d/mountcritremote
>                 mount all NFS filesystems
>         [ ... nearly last thing ... ]

and where does bringing up networking fit?

>         /etc/rc.d/mountlate
>                 mount filesystems marked as "late" in /etc/fstab

wow, late - never heard of that.

> The "crit" in mountcritlocal and mountcritremote don't seem to have any
> current meaning, so is similar to just the mountlocal/mountremote idea
> above.

except that critlocal is before networking.

All that said, I don't see a real problem with deciding to mount all
local filesystems (marked auto of course)  at mouncritlocal time.    I
can try to reason through diskless/nfs to see if that's really true.

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index