jail on ZFS - "Unable to mount devfs"
Gelsema, P (Patrick)
gelsemap at superhero.nl
Tue Jan 8 02:25:40 PST 2008
On Tue, January 8, 2008 02:43, snowcrash+freebsd wrote:
> 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) @ .../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
If I remember correctly there was no password file for in the jail. I
think you have to rerun a certain command. Of course I do not remember the
command :( The command should create the master password database.
Also you have to run within in the jail newaliases to create the aliases
file, do a touch /etc/fstab to stop complaints about unable to read
mountpoints.
No more information in the /var/log/messages when starting the jails?
Furthermore I am not sure that you can run a jail on a zfs file system.
The setup I have is that I run my jails on ufs and have a zfs filesystem
available within the jail.
Rgds,
Patrick
>
> 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!
> _______________________________________________
> freebsd-current at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe at freebsd.org"
>
More information about the freebsd-questions
mailing list