Re: ZFS: amd64, devd, root file system.



On Sat, Apr 14, 2007 at 11:21:37AM +0200, Stefan Esser wrote:
Pawel Jakub Dawidek wrote:
On Mon, Apr 09, 2007 at 03:17:23AM +0200, Pawel Jakub Dawidek wrote:

Hi Pawel,

great to see ZFS support committed to -current!

It is amazingly simple to get a test setup going and it worked fine
in my initial simple test cases. But now I've run into problems that
probably are not technical but caused by a lack of understanding ...

This is not the first report that it doesn't work as it should. One was
that /boot/defaults/loader.conf wasn't fresh enough, and there were no:

zpool_cache_load="YES"
zpool_cache_type="/boot/zfs/zpool.cache"
zpool_cache_name="/boot/zfs/zpool.cache"

lines at the end. Can you verify you have them?

Can you send me log of full boot process?

Hmmm, there are a few points that I do not fully understand:

It seems that ZFS "legacy" mounts are not supported under FreeBSD,
is this correct? (E.g. if I enter "zfs set mountpoint=legacy test"
then "test" can not be mounted with "zfs mount test" and there is
no other way to mount it since we do not have a "mount_zfs", yet?)

They are supported. "legacy" means that you no longer use 'zfs mount' to
mount them, but simply mount(8) (or /etc/fstab). There is no mount_zfs
and there won't be one, because we are moving away from such commands.
You should use 'mount -t zfs' instead.

I tried to set the mountpoint of my to-be root file system to "/"
with "zfs set mountpoint=/ test" but I'm under the impression that
this does not really work. Setting it to "//" does appear to have
the desired effect, though, but may lead to a panic during shutdown.
(Sorry, I've got no core-dumps but could try producing one later
if there is interest. The panic is because of a ref count becoming
negative but I did not write down the message.)

The mount point can be set to whatever you like, but you can still mount
it using different mount point by hand (via mount(8)).
The most proper way is probably to set mountpoint to "legacy".

I decided to have multiple zfs file systems (test/var, test/usr ...)
and can see them with zfs list. What is the correct way to get them
mounted automatically? (Assuming I get the problem to have the kernel
automatically mount the ZFS root solved ...)

zfs_enable="YES" in your /etc/rc.conf.

Do I need fstab entries for for ZFS file systems (e.g. "test/usr")
or does ZFS mount them automatically when the pool "test" is mounted?

They are mount via rc.d/zfs script.

Or do I need a fstab line for each of them?
What's supposed to go into /etc/zfs, besides the ZFS exports file?

For now only exports file. zpool.cache use to be there as well, but we
need it in /boot/zfs/ to be able to have root-on-ZFS.

--
Pawel Jakub Dawidek http://www.wheel.pl
pjd@xxxxxxxxxxx http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!

Attachment: pgpcEEToP11Qa.pgp
Description: PGP signature



Relevant Pages

  • Re: ZFS: amd64, devd, root file system.
    ... I even performed a "boot -v" but did not see anything useful. ... replicas for the pool to continue functioning. ... It seems that ZFS "legacy" mounts are not supported under FreeBSD, ... no other way to mount it since we do not have a "mount_zfs", ...
    (freebsd-current)
  • Various Issues with 7.0-BETA4
    ... Install 7.0-BETA2 off the amd64.iso. ... seem to auto mount my zfs mounts which is a PITA. ... to boot into single user mode, mount all my drives, ...
    (freebsd-stable)
  • Re: Various Issues with 7.0-BETA4
    ... seem to auto mount my zfs mounts which is a PITA. ... you need to a) mount root read-write and b) run ... I just rebuild my world and then kernel based on sources as of a few ...
    (freebsd-stable)
  • Re: Various Issues with 7.0-BETA4
    ... seem to auto mount my zfs mounts which is a PITA. ... Did you create the zfs structures and file system while in single user ... Then reboot into multiuser mode - it should work ...
    (freebsd-stable)
  • Re: Various Issues with 7.0-BETA4
    ... seem to auto mount my zfs mounts which is a PITA. ... then exit, continuing into multi-user mode. ... not only does zfs not mount but I have to re-force import the tank pool ...
    (freebsd-stable)