Date: Sat, 6 Jul 2002 22:55:52 +0200 From: Bernd Walter <ticso@cicely5.cicely.de> To: Chris Hedley <cbh@teabag.demon.co.uk> Cc: current@FreeBSD.ORG Subject: Re: Possible solution to /tmp on md filesystem Message-ID: <20020706205552.GD23704@cicely5.cicely.de> In-Reply-To: <20020706210223.H698-100000@teabag.cbhnet> References: <20020706210223.H698-100000@teabag.cbhnet>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 06, 2002 at 09:08:39PM +0100, Chris Hedley wrote:
> Hi all,
>
> If anyone's still looking at the /tmp on md stuff, I've thrown together a
> workaround/solution based on the "mount_md" idea. Okay, I know that using
> a shell-script for a mount program may be seen as a Bad Thing and I'm not
> sure I want to broadcast my duff shell-programming for all to see, but
> I'll post it if anyone's interested. What I've done is to create a proto
> file for disklabel to use based on the intended size of the filesystem as
> specified in /etc/fstab which creates a normal multi-partition disc style
> "a" partition which skips the first cylinder, newfses it and mounts the
> result. Seems to work okay, although since it mucks about with disklabel
> then I'd recommend some caution.
>
> If it turns out to be useful I'm happy to convert it into a rather more
> robust C equivalent. This is, of course, based on the assumption that I
> haven't entirely missed the point! :)
I abused diskless_mount for md filesystems:
[351]cicely5> cat /etc/rc.md
DEV=`mdconfig -a -t swap -s 1400M`
disklabel -r -w ${DEV} auto
newfs /dev/${DEV}c
tunefs -n enable /dev/${DEV}c
mount /dev/${DEV}c /tmp
chmod 1777 /tmp
DEV=`mdconfig -a -t swap -s 800M`
disklabel -r -w ${DEV} auto
newfs /dev/${DEV}c
tunefs -n enable /dev/${DEV}c
mount /dev/${DEV}c /var/run
chmod 755 /var/run
[352]cicely5> grep rc.md /etc/rc.conf
diskless_mount="/etc/rc.md"
It's running fine on i386.
md currently doesn't work on alpha because of 8k pagesize brokenness.
--
B.Walter COSMO-Project http://www.cosmo-project.de
ticso@cicely.de Usergroup info@cosmo-project.de
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020706205552.GD23704>
