Date: Fri, 2 Feb 2001 00:04:13 -0800 (PST) From: Matt Dillon <dillon@earth.backplane.com> To: Dima Dorfman <dima@unixfreak.org> Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, mi@aldan.algebra.com, jhb@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: mdconfig config file (was: cvs commit: src/sys/i386/conf GENERIC) Message-ID: <200102020804.f1284DN53771@earth.backplane.com> References: <20010202025501.D4BB73E02@bazooka.unixfreak.org>
next in thread | previous in thread | raw e-mail | index | archive | help
It doesn't make sense to pollute 'mdconfig' with functions that we already have an API available to perform. An API called 'mount'. Why not write a 'mount_md' program to do all the magic based on fstab options, similar to what mount_mfs used to do for MFS? A 'mount_md' would give us instant integration into existing kernel mechanisms, including startup (/etc/rc) mechanisms. -Matt :[cvs-(all|commiters) -> -hackers] : :> >> If anybody writes a patch to mdconfig to DTRT based on some :> >> less bogus /etc/fstab entries, I'll happily review and commit it. :> > :> >Does this sort of functionality really belong in mdconfig? :> :> Not by definition, and I'm not religious about it. : :Okay, any objections then to jhb's configuration file idea? The idea :is that mdconfig parses a file (md.conf or something) and sets up some :memory disks accordingly, including optional disklabel/newfs stuff. :Later, a simple 'ffs'-type fstab entry will mount it wherever the user :wants. This may be a little complicated for the simple /tmp case, but :I can think of some environments where this would be useful. vnconfig :also supports a similar config file option, so I think it's fitting :that mdconfig should, too. : :I've come up with a preliminary patch to teach mdconfig(8) to parse a :config file. It's a little early to be of practical use (and it lacks :the disklabel/newfs option), but it's a start. It's a little long :because I made some of the code in the switch(ch) block into functions :to avoid having two blocks doing the same thing, so I've decided not :to attach it not to bother the uninterested parties. If you could :take a minute or two and comment on it I'd appreciate it. You can :find it at http://www.unixfreak.org/~dima/mdconfig1.diff : :The current format of the config file is: : : <unit> <type> <argument=value>,<arg=value>,... : :for example: : : md0 swap size=64m : :Comments? Suggestions? : :Thanks in advance : : Dima Dorfman : dima@unixfreak.org : :P.S. Is there any reason the -b (baseaddr) option for preload disks :is currently unimplemented? The patch implements it (it was one line, :so I thought 'what the heck'); the ioctl works, but I was unable to :test it. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102020804.f1284DN53771>