Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2014 11:43:25 -0800
From:      aurfalien <aurfalien@gmail.com>
To:        dteske@FreeBSD.org
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: mdconfig via rc.conf
Message-ID:  <6292A1D0-80B0-4553-9FC9-CE2BC61EC92C@gmail.com>
In-Reply-To: <18af01cf38a4$b278b1c0$176a1540$@FreeBSD.org>
References:  <A2D8BD58-D9D8-4E16-B84D-25D37E195ADE@gmail.com> <18af01cf38a4$b278b1c0$176a1540$@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 5, 2014, at 10:56 AM, dteske@FreeBSD.org wrote:

>=20
>=20
>> -----Original Message-----
>> From: aurfalien [mailto:aurfalien@gmail.com]
>> Sent: Tuesday, March 4, 2014 2:14 PM
>> To: FreeBSD Mailing List
>> Subject: mdconfig via rc.conf
>>=20
>> Hi,
>>=20
>> Are there any other parameters I would need to setup a ram disk at =
boot
> time?
>>=20
>> I have this in my rc.conf;
>>=20
>> mdconfig_md100=3D"-t malloc -s 12G"
>>=20
>> I've opted not to mount or format it for now.
>>=20
>> But upon boot, I do not see the md100 device.
>>=20
>> Is there anything I need in rc.conf to enable this?
>>=20
>> Thanks in advance,
>>=20
>> - aurf
>>=20
> [Devin Teske]=20
>=20
> Sorry for late reply. But here's what you want...
>=20
> # In /etc/rc.conf
> mdconfig_md0=3D"-t malloc -s 12G"
>=20
> # In /etc/fstab
> /dev/md0 /mymountpoint ufs rw,noatime 0 0
>=20
> You see... /etc/rc.d/mdconfig will perform "mount -d /dev/md0" to see
> if there is a mountpoint configured for md0 in /etc/fstab.
>=20
> If "mount -d /dev/md0" reports that there is no entry for md0, then =
the
> /etc/rc.d/mdconfig script will not mount your device.
>=20
> Also, as others have mentioned, you can not (currently) arbitrarily =
have
> gaps in the numbering system. You have to start with md0 and then use
> md1, md2, ad nauseum. The script /etc/rc.d/mdconfig currently stops at
> the first undefined value. So in the case of not setting md0 but only =
a
> single md100, nothing will be done (0 being undefined terminates the
> loop).
> --=20
> Devin

So if I do;

mdconfig -a -t swap -s 12G

I get /dev/md0 no issues.  I chose swap rather then malloc due to RWs =
suggestion previously.

Keep in mind I don=92t wish to mount it just yet.

However if I put the value in rc.conf;

mdconfig_md0=3D=93-a -t swap -s 12G=94

I do not see an /dev/md device

- aurf

"Janitorial Services"







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6292A1D0-80B0-4553-9FC9-CE2BC61EC92C>