Re: More into /etc/rc.d/jail

From: Brooks Davis <brooks_at_one-eyed-alien.net>
Date: Tue, 9 Aug 2005 14:59:39 -0700
On Tue, Aug 09, 2005 at 11:43:30PM +0200, Jeremie Le Hen wrote:
> Hi,
> 
> > Hi,
> > I'm using jails inside md devices to limit the disk space each jail can use.  It's working great but I have to start manually all of them at startup.  Here's my drill:
> > 
> > mdconfig -a -t vnode -f ${IMAGE} -u ${ID}
> > fsck_ufs /dev/md${ID}c
> > mount /dev/md${ID}c ${DEST}
> > mount_devfs devfs ${DEST}/dev
> > jail -l -U root ${DEST} ${FQDN} ${IP} /bin/sh /etc/rc
> > 
> > Therefore, I can't use the /etc/rc.d/jail facility.  So I thought, it would be good to add *fsck before mounting* and an optional mdconfig beforehand.
> > 
> > jail_${NAME}_md_device=""    # The device to attach or NO
> > jail_${NAME}_image=""        # The image file containing the jail, used with md_device
> > jail_${NAME}_fsck_options="" # Options to pass to fsck
> > 
> > In fsck_options I could put "-t ufs".  Of course, /dev/md${ID}c must be present before mounting, could happen if the image isn't bsdlabel'ed.
> > 
> > I'm a terrible coder, I could do it, but I'll need coaching and I've never made a patch.  I would gladly hand that to someone else but I also need it to be done, I can't babysit the server forever.  So, how does it sound?
> 
> This was recently discussed in some thread.  The problem with this
> approach is that file backed md(4) devices are too slow to make it
> standard.  This is why this won't go into FreeBSD, IMHO.

Nonsense.  Integrating support for mounting file backed MD file systems
at boot would be quite logical even if md(4) devices are slow.  In a
large portion of cases, the overhead isn't relevent compared to the
administrative freedom granted by using files instead of partitions.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

Received on Tue Aug 09 2005 - 19:59:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:41 UTC