Bug 122477 - [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring additional parameter in some cases
Summary: [patch] /etc/rc.d/mdconfig and mdconfig2 are ignoring additional parameter in...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 7.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2008-04-06 00:30 UTC by Juergen Unger
Modified: 2022-10-17 12:39 UTC (History)
0 users

See Also:


Attachments
file.diff (353 bytes, patch)
2008-04-06 00:30 UTC, Juergen Unger
no flags Details | Diff
file.diff (361 bytes, patch)
2008-04-06 00:30 UTC, Juergen Unger
no flags Details | Diff
conf-122477.diff (3.27 KB, patch)
2010-10-11 05:43 UTC, gcooper
no flags Details | Diff
conf-122477.patch (3.27 KB, patch)
2010-10-24 04:28 UTC, gcooper
no flags Details | Diff
conf-122477-stable_9.patch (1.96 KB, patch)
2012-01-02 19:53 UTC, Garrett Cooper
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Unger 2008-04-06 00:30:00 UTC
in the case _mdconfig_list or _mdconfig2_list is set
explicit in /etc/rc.conf because of non contingous
device-numbers of md-devices, then it is impossible to
activate a newly created and configured md-device
with the following command (sample):
/etc/rc.d/mdconfig2 start md4444

Fix: test3# diff -u mdconfig.orig mdconfig
test3# diff -u mdconfig2.orig mdconfig2
How-To-Repeat: given is a set of configured md-devices with an _mdconfig2_list
explicit set in /etc/rc.conf:

_mdconfig2_list="md1001 md1002 md1003"

create a new md-device with a file-backingstore:

dd if=/dev/zero of=/somwhere/out/there/5555.img bs=1M count=100
mdconfig -a -t vnode -f /somewhere/out/there/5555.img -u 5555
newfs /dev/md5555
mdconfig -d -u 5555

add it to rc.conf:

_mdconfig2_list="md1001 md1002 md1003 md5555"
mdconfig_md5555="-t vnode -f /somewhere/out/there/5555.img"

now try to use mdconfig2 to activate this configuration:

/etc/rc.d/mdconfig2 start md5555

then he complains about md1001 already there where it only should
process md5555.

the below patches are fixing this while preserving the known
behaviour in the common known cases.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-04-06 01:48:01 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Over to maintainer(s).
Comment 2 Mike Makonnen 2008-05-06 12:27:21 UTC
_mdconfig_list and _mdconfig2_list are internal variables of 
rc.d/mdconfig and rc.d/mdconfig2 respectively. They may change at any 
time without notice. You should not be setting them in /etc/rc.conf.

Cheers.
-- 
Mike Makonnen       | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc
mtm @ FreeBSD.Org   | AC7B 5672 2D11 F4D0 EBF8  5279 5359 2B82 7CD4 1F55
FreeBSD             | http://www.freebsd.org
Comment 3 gcooper freebsd_committer freebsd_triage 2010-10-11 05:43:36 UTC
    IMO, the problem with this feature is lack of documentation when
it was converted from ramdisk_* to mdconfig_md*. How does this patch
work for you (you get the support you like via mdconfig_units)?
    This also removes all of the outdated documentation for ramdisk_*
because it's no longer used by rc(8).
Thanks,
-Garrett
Comment 4 gcooper freebsd_committer freebsd_triage 2010-10-24 04:28:40 UTC
On Sun, Oct 10, 2010 at 9:43 PM, Garrett Cooper <gcooper@freebsd.org> wrote:
>    IMO, the problem with this feature is lack of documentation when
> it was converted from ramdisk_* to mdconfig_md*. How does this patch
> work for you (you get the support you like via mdconfig_units)?
>    This also removes all of the outdated documentation for ramdisk_*
> because it's no longer used by rc(8).


(Resending with a .patch extension just in case)
    Does anyone have any comments about the attached patch?
Thanks!
-Garrett
Comment 5 Garrett Cooper 2012-01-02 19:53:15 UTC
 	The following patch is an updated copy of the prior version to 
stable/9 // head. It might be needed for stable/8 as well.
Thanks, 
-Garrett
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:35 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 7 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:39:40 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>