Date: Fri, 13 Oct 2006 11:21:17 +0200 From: Gunther Nikl <gni@gecko.de> To: freebsd-arch@FreeBSD.ORG, matteo@FreeBSD.ORG Subject: Re: RFC: use of mdmfs "new" options in fstab Message-ID: <452F5A8D.8090609@gecko.de> In-Reply-To: <200610101521.k9AFLJSX033185@lurza.secnetix.de> References: <200610101521.k9AFLJSX033185@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------020706010402050204040408 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Oliver Fromme wrote: > Matteo Riondato wrote: > > This means that it's impossible to use mdmfs "new" option > > in fstab, which is quite limiting. > > Yes, it's a real PITA. For example, I would like to mount > several memory file systems from within fstab, but I don't > need nor want soft-updates. Howver, the -S option is not > available for mount_mfs. I was using a mfs /tmp on a 4.x setup and migrating it to 5.x was harder than expected. This included the wish to disable softupdates and using FFSv1. Before I noticed the rc support for md /tmp, I created a /sbin/mount_md script to get access to all fancy mdmfs options from within /etc/fstab. > (On a related note, I also don't want the .snap directory > to appear on those memory file systems. newfs(8) has the > -n option to suppress it, but mdmfs doesn't.) Attached is a patch (against 6-STABLE) that corrects the -n option. Its probably an oversight that -n has still the old meaning there. FWIW, the patch is incomplete since the manpage isn't changed. > > 2)disable bug-for-bug compatibility with mount_mfs when the > > program name is "mount_mfs" or "mfs". The "-C" otion will still be > > available for those who want compatibility. See attached > > mdmfs.c.diff . > > > > I would prefer option #2, but any comment is really appreciated. > > Personally, I would love to see #2 committed (and MFCed). Yes, that would be worthwhile. > Therefore I propose that your patch #2 be slightly > modified: When mdmfs is called as mount_mfs, don't > imply -C (hence all options are available), but do > imply -p 1777. Then it shouldn't break any existing > usages, as far as I can imagine. Good catch. At first I missed the implied -p 1777 when switching from mfs to my homegrown mount_md script. Gunther --------------020706010402050204040408 Content-Type: text/plain; name="dif-mdmfs.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dif-mdmfs.c" Index: mdmfs.c =================================================================== RCS file: /home/ncvs/src/sbin/mdmfs/mdmfs.c,v retrieving revision 1.23.2.1 diff -u -r1.23.2.1 mdmfs.c --- mdmfs.c 4 Nov 2005 19:37:14 -0000 1.23.2.1 +++ mdmfs.c 25 May 2006 12:21:44 -0000 @@ -121,7 +121,7 @@ compat = true; while ((ch = getopt(argc, argv, - "a:b:Cc:Dd:e:F:f:hi:LlMm:Nn:O:o:p:Ss:t:Uv:w:X")) != -1) + "a:b:Cc:Dd:e:F:f:hi:LlMm:NnO:o:p:Ss:t:Uv:w:X")) != -1) switch (ch) { case 'a': argappend(&newfs_arg, "-a %s", optarg); @@ -187,7 +187,7 @@ norun = true; break; case 'n': - argappend(&newfs_arg, "-n %s", optarg); + argappend(&newfs_arg, "-n"); break; case 'O': argappend(&newfs_arg, "-o %s", optarg); @@ -666,15 +666,15 @@ name = "mdmfs"; if (!compat) fprintf(stderr, -"usage: %s [-DLlMNSUX] [-a maxcontig] [-b block-size] [-c cylinders]\n" +"usage: %s [-DLlMNnSUX] [-a maxcontig] [-b block-size] [-c cylinders]\n" "\t[-d rotdelay] [-e maxbpg] [-F file] [-f frag-size] [-i bytes]\n" -"\t[-m percent-free] [-n rotational-positions] [-O optimization]\n" -"\t[-o mount-options] [-p permissions] [-s size] [-v version]\n" -"\t[-w user:group] md-device mount-point\n", name); +"\t[-m percent-free] [-O optimization] [-o mount-options]\n" +"\t[-p permissions] [-s size] [-v version] [-w user:group]\n" +"\tmd-device mount-point\n", name); fprintf(stderr, -"usage: %s -C [-lNU] [-a maxcontig] [-b block-size] [-c cylinders]\n" +"usage: %s -C [-lNnU] [-a maxcontig] [-b block-size] [-c cylinders]\n" "\t[-d rotdelay] [-e maxbpg] [-F file] [-f frag-size] [-i bytes]\n" -"\t[-m percent-free] [-n rotational-positions] [-O optimization]\n" -"\t[-o mount-options] [-s size] [-v version] md-device mount-point\n", name); +"\t[-m percent-free] [-O optimization] [-o mount-options] [-s size]\n" +"\t[-v version] md-device mount-point\n", name); exit(1); } --------------020706010402050204040408--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?452F5A8D.8090609>