jail on ZFS - "Unable to mount devfs"

From: snowcrash+freebsd <schneecrash+freebsd_at_gmail.com>
Date: Mon, 7 Jan 2008 17:43:13 -0800
i've moved from a fbsd 62r + jails system, to fbsd 70rc1.

i've set up ZFS,

	zfs list
		NAME          USED  AVAIL  REFER  MOUNTPOINT
		z            6.49G   212G   247M  /z
		z/home       28.5K   212G  28.5K  /home
		z/j           988M   212G   988M  /j
		z/tmp         408K   212G   408K  /tmp
		z/usr        5.17G   212G  5.17G  /usr
		z/var         103M   212G   102M  /var

now trying to setup jails. following threads,

  http://groups.google.com/group/lucky.freebsd.current/browse_thread/thread/d6499483a264f3b9
  http://lists.freebsd.org/pipermail/freebsd-current/2007-December/080920.html

i have,


	grep jail /etc/rc.conf
		ifconfig_nfe0_alias0="inet 10.0.0.200 netmask 255.255.255.255" # jTEST
		jail_enable="YES"
		jail_set_hostname_allow="NO"
		jail_list="TEST"
		jail_TEST_hostname="jTEST.internal.net"
		jail_TEST_ip="10.0.0.200"
		jail_TEST_rootdir="/j/jTEST"
		jail_TEST_devfs_enable="YES"
		jail_TEST_devfs_ruleset="zfsenable"

and,

	cat /etc/devfs.rules
		[zfsenable=10]
		add path 'zfs' unhide

i've populated my jail ROOT from previously created ServiceTemplates,
exactly as I'd done on 62R, per instructions at,

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails-application.html

when i 1st try,

	/etc/rc.d/jail start
		Configuring jails: set_hostname_allow=NO.
		Starting jails:df: /j/jTEST/dev: No such file or directory
		mount: /j/jTEST/dev: No such file or directory
		/etc/rc.d/jail: WARNING: devfs_domount(): Unable to mount devfs on
/j/jTEST/dev
		/etc/rc.d/jail: WARNING: devfs_mount_jail: devfs was not mounted on
/j/jTEST/dev
		cd: can't cd to /j/jTEST/dev
		 cannot start jail "TEST":
		jail: getpwnam: root: No such file or directory

there's a missing dir.

not surprising, as step (4) _at_ .../handbook/jails-application.html had me

   rm -R bin boot lib libexec mnt proc rescue sbin sys usr dev  <<<<<-----


forcing it here (i do't think this is really what needs to be done) with,

	mkdir -p /j/jTEST/dev

just to test, then,

	/etc/rc.d/jail start
		Configuring jails:.
		Starting jails: cannot start jail "TEST":
		jail: getpwnam: root: No such file or directory

clearly gets farther, but still no luck starting the jails.

apparently, something's changed in the process of devfs creation/mount
now that i'm using ZFS?  or, have i missed an obvious step?

do i perhaps need to set /j/jTEST as a separate ZFS mountpoint? e.g.,

 zfs create z/j/jTEST
 zfs set mountpoint=/j/jTEST z/j/jTEST

?

any suggestions ?

thanks!
Received on Tue Jan 08 2008 - 01:09:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:25 UTC