RE: jail on ZFS - "Unable to mount devfs"

2008-01-08 Thread Karsten W. Schmidt / DLX ApS
> not surprising, as step (4) @ .../handbook/jails-application.html had
> me
> 
>rm -R bin boot lib libexec mnt proc rescue sbin sys usr dev
<--

>From jails-application.html
--
cd /home/j/skel
# rm -R bin boot lib libexec mnt proc rescue sbin sys usr dev
--

The root is in /home/j/mroot and nullfs mounted read only to the jail
root
So if you ran the rm in /j/jTest you did not follow the directions

> any suggestions ?

Dont do jail-appliations ... use a full world onside the jail
Here's a short draft from my playing around with ZFS and 7.0-RC1
http://gugge.dlx.dk/bsd/zfs-jail

Notice that I don't use the normal way of buildworld/installworld 
to populate the jail. I just unpack the distfiles from the CD.

But a "make installworld DESTDIR=/jailpath" would do just fine too

-- 
Karsten
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: jail on ZFS - "Unable to mount devfs"

2008-01-08 Thread Wesley Shields
[ Removing -current as AFAIK it is not applicable there ]

On Tue, Jan 08, 2008 at 08:24:44AM -0800, snowcrash+freebsd wrote:
> hi wesley,
> 
> > I have a jail running in a ZFS environment.
> >
> > [EMAIL PROTECTED] ~ % jls
> >JID  IP Address  Hostname  Path
> >  3  192.168.1.100   asterisk  /u/jails/asterisk
> > [EMAIL PROTECTED] ~ % mount | grep "data"
> > data on /u (zfs, NFS exported, local, noatime)
> > [EMAIL PROTECTED] ~ % mount | grep devfs
> > devfs on /dev (devfs, local)
> > devfs on /u/jails/asterisk/dev (devfs, local)
> > [EMAIL PROTECTED] ~ %
> 
> here's what i have
> 
> jls
>  JID  IP Address   Hostname Path
>1  10.0.0.200   jTEST.internal.net   /j/jTEST
> 
> mount
>   z on / (zfs, local)
>   devfs on /dev (devfs, local)
>   /dev/mirror/gm0s1a on /bootdir (ufs, local, soft-updates)
>   z/data on /data (zfs, local)
>   z/home on /home (zfs, local)
>   z/j on /j (zfs, local)
>   z/tmp on /tmp (zfs, local)
>   z/usr on /usr (zfs, local)
>   z/var on /var (zfs, local)
>   /j/jMROOT on /j/jTEST (nullfs, local, read-only)
>   /j/s/jTEST on /j/jTEST/s (nullfs, local)
>   devfs on /j/jTEST/dev (devfs, local)
> 
> which, i think?, says the same.
> 
> argh. confused. following too many threads with partial solutions ...
> 
> can you share your setup-a-jail-on-a-zfs'd-host steps?

To be honest, I don't do much with them really.  I mostly just set them
up to get a clean environment for playing around in without fear of
destroying anything of real importance.

I follow the instructions in jail(8) where DESTDIR is a location to ZFS
setup.

-- WXS
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: jail on ZFS - "Unable to mount devfs"

2008-01-08 Thread snowcrash+freebsd
hi wesley,

> I have a jail running in a ZFS environment.
>
> [EMAIL PROTECTED] ~ % jls
>JID  IP Address  Hostname  Path
>  3  192.168.1.100   asterisk  /u/jails/asterisk
> [EMAIL PROTECTED] ~ % mount | grep "data"
> data on /u (zfs, NFS exported, local, noatime)
> [EMAIL PROTECTED] ~ % mount | grep devfs
> devfs on /dev (devfs, local)
> devfs on /u/jails/asterisk/dev (devfs, local)
> [EMAIL PROTECTED] ~ %

here's what i have

jls
   JID  IP Address   Hostname Path
 1  10.0.0.200   jTEST.internal.net   /j/jTEST

mount
z on / (zfs, local)
devfs on /dev (devfs, local)
/dev/mirror/gm0s1a on /bootdir (ufs, local, soft-updates)
z/data on /data (zfs, local)
z/home on /home (zfs, local)
z/j on /j (zfs, local)
z/tmp on /tmp (zfs, local)
z/usr on /usr (zfs, local)
z/var on /var (zfs, local)
/j/jMROOT on /j/jTEST (nullfs, local, read-only)
/j/s/jTEST on /j/jTEST/s (nullfs, local)
devfs on /j/jTEST/dev (devfs, local)

which, i think?, says the same.

argh. confused. following too many threads with partial solutions ...

can you share your setup-a-jail-on-a-zfs'd-host steps?

thanks!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: jail on ZFS - "Unable to mount devfs"

2008-01-08 Thread Wesley Shields
On Tue, Jan 08, 2008 at 07:08:04AM -0800, snowcrash+freebsd wrote:
> hi patrick,
> 
> > 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.
> 
> using the ServiceJail model, after populating the jail skeleton and
> running mergemaster, the two commands i run are,
> 
>  /usr/bin/cap_mkdb /j/jSKEL/etc/login.conf
>  /usr/sbin/pwd_mkdb -d /j/jSKEL/etc -p /j/j/etc/master.passwd
> 
> which should take care of that.
> 
> > 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.
> 
> hm.  i did not do that this time around.  i'd built my jail-world with
> *both* NO_MAILWRAPPER=true & NO_SENDMAIL=true, so i mayhave caused
> myself a problem.
> 
> rather than cp'ing bins, tobe safe, i'll just rebuild world ... and
> see in a bit if that helps.
> 
> thanks.
> 
> > 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.
> 
> ??
> 
> if that's true, then that renders the rest moot -- and i have a problem.
> 
> atm, i have
> 
> cat /etc/fstab
>   /dev/mirror/gm0s1a /bootdirufs rw1 1
>   /dev/mirror/gm0s1b noneswapsw0 0
>   /dev/acd0  /cdrom  cd9660  ro,noauto 0 0
>   /j/jMROOT  /j/jTESTnullfs  ro0 0
>   /j/s/jTEST /j/jTEST/s  nullfs  rw0 0
> 
> zfs list
>   NAME  USED  AVAIL  REFER  MOUNTPOINT
>   z5.23G   213G   250M  /z
>   z/data 20K   213G20K  /data
>   z/home   28.5K   213G  28.5K  /home
>   z/j23K   213G23K  /j
>   z/tmp 406K   213G   406K  /tmp
>   z/usr4.88G   213G  4.88G  /usr
>   z/var 105M   213G   105M  /var
> 
> where z/j is a zfs mount.
> 
> i *can* access the jail, and do just about 'all' i need to in the jail
> (builds, exec, etc).
> 
> but do *not* yet know if, by running the jail on zfs space whehter
> i've compromised anything.
> 
> do you have a reference for your comment?  or, perhaps, someone else
> can comment, as well?

I have a jail running in a ZFS environment.

[EMAIL PROTECTED] ~ % jls
   JID  IP Address  Hostname  Path
 3  192.168.1.100   asterisk  /u/jails/asterisk
[EMAIL PROTECTED] ~ % mount | grep "data"
data on /u (zfs, NFS exported, local, noatime)
[EMAIL PROTECTED] ~ % mount | grep devfs
devfs on /dev (devfs, local)
devfs on /u/jails/asterisk/dev (devfs, local)
[EMAIL PROTECTED] ~ % 

-- WXS
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: jail on ZFS - "Unable to mount devfs"

2008-01-08 Thread snowcrash+freebsd
hi patrick,

> 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.

using the ServiceJail model, after populating the jail skeleton and
running mergemaster, the two commands i run are,

 /usr/bin/cap_mkdb /j/jSKEL/etc/login.conf
 /usr/sbin/pwd_mkdb -d /j/jSKEL/etc -p /j/j/etc/master.passwd

which should take care of that.

> 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.

hm.  i did not do that this time around.  i'd built my jail-world with
*both* NO_MAILWRAPPER=true & NO_SENDMAIL=true, so i mayhave caused
myself a problem.

rather than cp'ing bins, tobe safe, i'll just rebuild world ... and
see in a bit if that helps.

thanks.

> 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.

??

if that's true, then that renders the rest moot -- and i have a problem.

atm, i have

cat /etc/fstab
  /dev/mirror/gm0s1a /bootdirufs rw1 1
  /dev/mirror/gm0s1b noneswapsw0 0
  /dev/acd0  /cdrom  cd9660  ro,noauto 0 0
  /j/jMROOT  /j/jTESTnullfs  ro0 0
  /j/s/jTEST /j/jTEST/s  nullfs  rw0 0

zfs list
  NAME  USED  AVAIL  REFER  MOUNTPOINT
  z5.23G   213G   250M  /z
  z/data 20K   213G20K  /data
  z/home   28.5K   213G  28.5K  /home
  z/j23K   213G23K  /j
  z/tmp 406K   213G   406K  /tmp
  z/usr4.88G   213G  4.88G  /usr
  z/var 105M   213G   105M  /var

where z/j is a zfs mount.

i *can* access the jail, and do just about 'all' i need to in the jail
(builds, exec, etc).

but do *not* yet know if, by running the jail on zfs space whehter
i've compromised anything.

do you have a reference for your comment?  or, perhaps, someone else
can comment, as well?

thanks!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: jail on ZFS - "Unable to mount devfs"

2008-01-08 Thread Gelsema, P (Patrick)
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
>   z6.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/usr5.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!
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
>

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"