From owner-freebsd-rc@FreeBSD.ORG Sat May 13 12:36:39 2006 Return-Path: X-Original-To: freebsd-rc@FreeBSD.org Delivered-To: freebsd-rc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0303E16A420; Sat, 13 May 2006 12:36:39 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from smtp.xbsd.org (xbsd.org [82.233.2.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57ACD43D48; Sat, 13 May 2006 12:36:38 +0000 (GMT) (envelope-from flz@FreeBSD.org) Received: from localhost (localhost.xbsd.org [127.0.0.1]) by smtp.xbsd.org (Postfix) with ESMTP id E1DE11150A; Sat, 13 May 2006 14:36:36 +0200 (CEST) Received: from smtp.xbsd.org ([127.0.0.1]) by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00267-09; Sat, 13 May 2006 14:36:27 +0200 (CEST) Received: from [192.168.21.7] (unknown [192.168.21.7]) by smtp.xbsd.org (Postfix) with ESMTP id 7F85611493; Sat, 13 May 2006 14:36:26 +0200 (CEST) Message-ID: <4465D2BF.7080703@FreeBSD.org> Date: Sat, 13 May 2006 13:36:15 +0100 From: Florent Thoumie User-Agent: Thunderbird 1.5.0.2 (Macintosh/20060308) MIME-Version: 1.0 To: freebsd-rc@FreeBSD.org X-Enigmail-Version: 0.94.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig45C3C57F6395E85C76D4C783" X-Virus-Scanned: amavisd-new at xbsd.org Cc: anders@FreeBSD.org, delphij@FreeBSD.org Subject: CFT: rc.d/mdconfig{,2} - ramdisk rc.d script extension to support all md(4) devices X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2006 12:36:39 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig45C3C57F6395E85C76D4C783 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable These scripts are supposed to extend the existing ramdisk rc.d script to vnode-backed md(4) devices. I added some features as well (mostly proposed by Anders). Malloc/Swap md(4) devices are created by mdconfig (as early as possible).= Vnode md(4) devices created from files located on root partition are created by mdconfig. The others md(4) devices are created by mdconfig2. Assuming there's an fstab entry for the md(4) device, they'll be fsck'ed (if !swap/malloc) or newfs'ed and mounted. Use as follows : mdconfig_md0=3D"-t malloc -s 10m" -> created by mdconfig mdconfig_md1=3D"-t swap -s 5m" -> created by mdconfig mdconfig_md2=3D"-t vnode -f /boot/foo.img" -> created by mdconfig mdconfig_md3=3D"-t vnode -f /boot/foo.uzip" -> created by mdconfig mdconfig_md4=3D"-t vnode -f /usr/local/test.img" -> created by mdconfig2 mdconfig_md6=3D"this one won't work since there's no mdconfig_md5" Additionally you can use the following options : mdconfig_mdX_owner, mdconfig_mdX_perms -> perms and owner changed by mdconfig2 mdconfig_mdX_newfs -> additional flags to pass to newfs for malloc/swap backed md(4) device mdconfig_mdX_files -> files to copy to the mounted mdX device by mdconfig= 2 mdconfig_mdX_cmd -> command run to populate the mounted mdX device by mdconfig2 (note that it's passed to eval, so you can use \${_mp} and \${_dev} to reference both the device and the mount point. There's currently no doc, I'll do it while people (you readers) are testing them. I might have forgotten to say something, so ask just in case you need some other information. Scripts are here: http://people.freebsd.org/~flz/local/mdconfig http://people.freebsd.org/~flz/local/mdconfig2 You'll need the additional patch to rc.subr as well: http://people.freebsd.org/~flz/local/rcsubr-seq.diff --=20 Florent Thoumie flz@FreeBSD.org FreeBSD Committer --------------enig45C3C57F6395E85C76D4C783 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEZdLGMxEkbVFH3PQRAoVjAJ9vBnO74EmKD8hoD6LkY28YNbMbZACaAl18 NQzwxF0ZS9RWW5520Mj2rHE= =kWUF -----END PGP SIGNATURE----- --------------enig45C3C57F6395E85C76D4C783--