Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2021 02:28:49 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        =?UTF-8?Q?BERTRAND_Jo=c3=abl?= <joel.bertrand@systella.fr>, freebsd-hackers@freebsd.org
Subject:   Re: Mounting swap device on iscsi target
Message-ID:  <a9224923-13ce-63b6-b463-6a1b077ec74a@grosbein.net>
In-Reply-To: <8ab80674-a54f-8720-93b9-8161a590c373@systella.fr>
References:  <fe95f085-b516-f431-9bfd-6c4f9b63e900@systella.fr> <6a015119-1bd9-20a7-54ce-8ca9cbaadc23@grosbein.net> <0b3cada6-eaea-89ce-0f89-edd1f1f8e7a3@systella.fr> <a1381846-4a35-4427-1d76-969e7407fde7@grosbein.net> <8ab80674-a54f-8720-93b9-8161a590c373@systella.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
18.01.2021 1:43, BERTRAND Joël wrote:

>>> 	If I have understood, varmfs creates whole /var. I have some troubles
>>> with /var/at also. How can I create a file system in memory for /var/run
>>> and /var/at ?
>>
>> Read diskless(8) manual page, section CONFIGURATION.
> 
> 	I don't understand your answer. I have configured this workstation a
> long time ago and I have read this manual page to write its
> configuration. My question was : how create two ramdisks, one for
> /var/at, the second for /var/run in /etc/rc.conf ? I suppose I can write
> a script in /etc/rc.d, but I'm pretty sure somebody use diskless FreeBSD
> workstation also.

We have /etc/rc.initdiskless script that runs if there is (empty) /etc/diskless file at boot time.
In addition to diskless(8) manual page, please read comments at the beginning of /etc/rc.initdiskless,
they describe its mechanics in more details. In particular, it tells:

# The existence of a directory /conf/T/M causes this script to create a
# memory filesystem mounted as /M on the client.

So it is able to create as many in-memory file system as you need
once you provide diskless machine with correct /conf directory.

Use that, it works.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a9224923-13ce-63b6-b463-6a1b077ec74a>