Re: Mount order for ZFS, jails, and nullfs

2010-09-25 Thread CyberLeo Kitsana
On 09/24/2010 11:03 AM, Torbjorn Granlund wrote:
 ...
 Unfortunately, FreeBSD's mount seems unable to perform mounts of ZFS
 volumes.

Sure, it can:

8
(f84104b2)[r...@akisha ~]# zfs create akisha/mnttmp
(f84104b2)[r...@akisha ~]# touch /zfs/akisha/mnttmp/test
(f84104b2)[r...@akisha ~]# ls -l /zfs/akisha/mnttmp
total 1
-rw-r--r--  1 root  wheel  - 0 Sep 25 01:39 test
(f84104b2)[r...@akisha ~]# zfs set mountpoint=legacy akisha/mnttmp
(f84104b2)[r...@akisha ~]# ls -l /zfs/akisha/mnttmp
ls: /zfs/akisha/mnttmp: No such file or directory
(f84104b2)[r...@akisha ~]# mount -t zfs akisha/mnttmp /mnt/tmp
(f84104b2)[r...@akisha ~]# ls -l /mnt/tmp
total 1
-rw-r--r--   1 root  wheel  -  0 Sep 25 01:39 test
(f84104b2)[r...@akisha ~]# umount /mnt/tmp
(f84104b2)[r...@akisha ~]# ls -l /mnt/tmp
total 0
(f84104b2)[r...@akisha ~]#
8

On 8.1-RELEASE.

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
cyber...@cyberleo.net

Furry Peace! - http://.fur.com/peace/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount order for ZFS, jails, and nullfs

2010-09-25 Thread Robert Bonomi
 From owner-freebsd-questi...@freebsd.org  Fri Sep 24 11:02:59 2010
 To: freebsd-questions@freebsd.org
 From: Torbjorn Granlund t...@gmplib.org
 Date: Fri, 24 Sep 2010 18:03:06 +0200
 Subject: Mount order for ZFS, jails, and nullfs

 In jails, I'd like a local ZFS /, a read-only nullfs-mounted /usr, and a
 local /usr/local.  (I'd also have read-only nullfs-mounted /bin, /lib,
 /libexec, but let's forget about that for now.)

 This way, I can upgrade the master /usr once, in one place, and have all
 jails inherit it.  And my dear jail inmates can install anything in
 /usr/local (such as their favourite packages/ports).

 I.e., things should look like this:

 /myjail/zfs
 /myjail/usr nullfs ro
 /myjail/usr/local   zfs

 There is no problem to make this happen by issuing a handful of commands
 manually after boot, but I cannot seem to get it to work automatically,
 with existing boot mechanism.  The problem is that the mount of /usr
 will be attempted before ZFS has mounted /myjail, the jail's root.

 ZFS maintains its own mount table.  It is possible to disable the
 automated mounting in ZFS by specifying the pseudo mountpoint legacy,
 and then--according to the FreeBSD manual--mount it with mount(8).
 Unfortunately, FreeBSD's mount seems unable to perform mounts of ZFS
 volumes.

 How can I achieve the result I want after a reboot?

if the traditional way doesn't work for you, the solution is don't use
the traditional way'.  grin?

Seriously.

For the stuff that has to  mount _after_ zfs is running (i.e. '/myjail/usr'),
mark them as 'noauto' in the fstab.  

Do the 'equivalent' for any zfs fs that mounts _below_ those points (i.e.,
'/myjail/user/local').

That way the normal stages in the boot process will _not- mount them 
prematurely.

THEN, add a boot script that requires zfs' and wherever the actual zfs
mounts are done. In -that- script, insert 'manual' commands, _in_the_order_
you need things to happen in.

It is advisable to drop notes in /etc/fstab and the zfs equivalent, that
these filesystems are automatically mounted by the {mumble} script.  Such
notes save _lots_ of hair-tearing in the future, when you have to trouble-
shoot something you don't remember the details of doing.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Mount order for ZFS, jails, and nullfs

2010-09-24 Thread Torbjorn Granlund
In jails, I'd like a local ZFS /, a read-only nullfs-mounted /usr, and a
local /usr/local.  (I'd also have read-only nullfs-mounted /bin, /lib,
/libexec, but let's forget about that for now.)

This way, I can upgrade the master /usr once, in one place, and have all
jails inherit it.  And my dear jail inmates can install anything in
/usr/local (such as their favourite packages/ports).

I.e., things should look like this:

/myjail/zfs
/myjail/usr nullfs ro
/myjail/usr/local   zfs

There is no problem to make this happen by issuing a handful of commands
manually after boot, but I cannot seem to get it to work automatically,
with existing boot mechanism.  The problem is that the mount of /usr
will be attempted before ZFS has mounted /myjail, the jail's root.

ZFS maintains its own mount table.  It is possible to disable the
automated mounting in ZFS by specifying the pseudo mountpoint legacy,
and then--according to the FreeBSD manual--mount it with mount(8).
Unfortunately, FreeBSD's mount seems unable to perform mounts of ZFS
volumes.

How can I achieve the result I want after a reboot?


(The reply use ezjail! is not the right one.  :-) It does not do what
I want to do.  I dislike its symlink forest, and that it creates just
one ZFS filesystem for the entire jail.)

-- 
Torbjörn
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount order for ZFS, jails, and nullfs

2010-09-24 Thread Torbjorn Granlund
krad kra...@gmail.com writes:

  use zfs mount/umount
  
How?

The zfs mount command does not work anyting like the mount(8) command
but for ZFS volumes.  The zfs mount mounts a volume using its
mountpoint property.  But if that's set to legacy, then zfs mount will
hardly work, since it cannot take a mount point parameter.

The real problem is how to make all types of mounts to be made in a
top-to-bottom order.  Even if 'zfs mount' would work like I think you
assume it works, that would not help, as far as I can tell.

-- 
Torbjörn
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount order for ZFS, jails, and nullfs

2010-09-24 Thread krad
On 24 September 2010 17:03, Torbjorn Granlund t...@gmplib.org wrote:

 In jails, I'd like a local ZFS /, a read-only nullfs-mounted /usr, and a
 local /usr/local.  (I'd also have read-only nullfs-mounted /bin, /lib,
 /libexec, but let's forget about that for now.)

 This way, I can upgrade the master /usr once, in one place, and have all
 jails inherit it.  And my dear jail inmates can install anything in
 /usr/local (such as their favourite packages/ports).

 I.e., things should look like this:

 /myjail/zfs
 /myjail/usr nullfs ro
 /myjail/usr/local   zfs

 There is no problem to make this happen by issuing a handful of commands
 manually after boot, but I cannot seem to get it to work automatically,
 with existing boot mechanism.  The problem is that the mount of /usr
 will be attempted before ZFS has mounted /myjail, the jail's root.

 ZFS maintains its own mount table.  It is possible to disable the
 automated mounting in ZFS by specifying the pseudo mountpoint legacy,
 and then--according to the FreeBSD manual--mount it with mount(8).
 Unfortunately, FreeBSD's mount seems unable to perform mounts of ZFS
 volumes.

 How can I achieve the result I want after a reboot?


 (The reply use ezjail! is not the right one.  :-) It does not do what
 I want to do.  I dislike its symlink forest, and that it creates just
 one ZFS filesystem for the entire jail.)

 --
 Torbjörn
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org



use zfs mount/imount
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Mount order for ZFS, jails, and nullfs

2010-09-24 Thread krad
On 24 September 2010 18:52, krad kra...@gmail.com wrote:



 On 24 September 2010 17:03, Torbjorn Granlund t...@gmplib.org wrote:

 In jails, I'd like a local ZFS /, a read-only nullfs-mounted /usr, and a
 local /usr/local.  (I'd also have read-only nullfs-mounted /bin, /lib,
 /libexec, but let's forget about that for now.)

 This way, I can upgrade the master /usr once, in one place, and have all
 jails inherit it.  And my dear jail inmates can install anything in
 /usr/local (such as their favourite packages/ports).

 I.e., things should look like this:

 /myjail/zfs
 /myjail/usr nullfs ro
 /myjail/usr/local   zfs

 There is no problem to make this happen by issuing a handful of commands
 manually after boot, but I cannot seem to get it to work automatically,
 with existing boot mechanism.  The problem is that the mount of /usr
 will be attempted before ZFS has mounted /myjail, the jail's root.

 ZFS maintains its own mount table.  It is possible to disable the
 automated mounting in ZFS by specifying the pseudo mountpoint legacy,
 and then--according to the FreeBSD manual--mount it with mount(8).
 Unfortunately, FreeBSD's mount seems unable to perform mounts of ZFS
 volumes.

 How can I achieve the result I want after a reboot?


 (The reply use ezjail! is not the right one.  :-) It does not do what
 I want to do.  I dislike its symlink forest, and that it creates just
 one ZFS filesystem for the entire jail.)

 --
 Torbjörn
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org



 use zfs mount/imount


whops s/i/u/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ZFS jails

2010-08-22 Thread jhell
On 08/21/2010 23:57, Joe wrote:
 I am thinking about running zfs on the host for everything except
 booting the system. I plan to create a 1gb zfs area which I want to use
 for a jail directory tree.
 
 Is this possible?

In other words, why would it not be possible ?.

Have fun it sounds like you have a system that could have gave you a
reply before this question had been answered here.


Regards,

-- 

 jhell,v
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ZFS jails

2010-08-22 Thread Glen Barber
On 8/21/10 11:57 PM, Joe wrote:
 I am thinking about running zfs on the host for everything except
 booting the system. I plan to create a 1gb zfs area which I want to use
 for a jail directory tree.
 
 Is this possible?

Yep.

   # zfs create -o quota=1G tank/usr/jail

Regards,

-- 
Glen Barber
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ZFS jails

2010-08-22 Thread krad
On 22 August 2010 13:49, Glen Barber glen.j.bar...@gmail.com wrote:

 On 8/21/10 11:57 PM, Joe wrote:
  I am thinking about running zfs on the host for everything except
  booting the system. I plan to create a 1gb zfs area which I want to use
  for a jail directory tree.
 
  Is this possible?

 Yep.

   # zfs create -o quota=1G tank/usr/jail

 Regards,

 --
 Glen Barber
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 freebsd-questions-unsubscr...@freebsd.org

 you might want the reserve as well
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


ZFS jails

2010-08-21 Thread Joe
I am thinking about running zfs on the host for everything except 
booting the system. I plan to create a 1gb zfs area which I want to use 
for a jail directory tree.


Is this possible?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org