Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Oct 2017 06:58:45 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Md based tmpfs with zfs root system.
Message-ID:  <f38f69d4-09f2-caaf-582d-ee0aa59c07bd@FreeBSD.org>
In-Reply-To: <20171018164559.GA3267@anza.vindaloo.com>
References:  <20171018164559.GA3267@anza.vindaloo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--aH8ooV5C7cd51C48lug0OG9Ono4n9nHjs
Content-Type: multipart/mixed; boundary="mSjvxnoFQIQeBVHqSCgKepWoLLSu9awIr";
 protected-headers="v1"
From: Matthew Seaman <matthew@FreeBSD.org>
To: freebsd-questions@freebsd.org
Message-ID: <f38f69d4-09f2-caaf-582d-ee0aa59c07bd@FreeBSD.org>
Subject: Re: Md based tmpfs with zfs root system.
References: <20171018164559.GA3267@anza.vindaloo.com>
In-Reply-To: <20171018164559.GA3267@anza.vindaloo.com>

--mSjvxnoFQIQeBVHqSCgKepWoLLSu9awIr
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

On 18/10/2017 17:45, Christopher Sean Hilton wrote:
> Good day,
>=20
> I've using a new system with root on zfs. I've traditionally used a
> /dev/md* based tmpfs for /tmp. A little initial reading on the subject
> shows an argument about this practice but I didn't find any threads
> that provide a resolution. Furthermore, all the information that I
> found which says that this is a bad idea dates from about FreeBSD-8.2,
> and that's long obsolete.
>=20
> What's the current resolution on this for a FreeBSD 11-STABLE user?
> Should I avoid using a swap backed /dev/md based tmpfs filesystem for
> /tmp?
>=20

Using a tmpfs for /tmp is perfectly fine -- but you don't need to touch
any /dev/md devices; just add a line like this to /etc/fstab:

tmpfs		  /tmp	      tmpfs    rw,mode=3D1777	0	0

I do this as standard on my machines, including in all jails.  In fact,
I think using a temporary swap backed filesystem for ephemeral data is
an underused idea in FreeBSD: machines nowadays generally have much more
swap configured than they will actually use, and that diskspace is
otherwise wasted.

	Cheers,

	Matthew


--mSjvxnoFQIQeBVHqSCgKepWoLLSu9awIr--

--aH8ooV5C7cd51C48lug0OG9Ono4n9nHjs
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJZ6D8bXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkAT/RwP/15sjgJ8X0oCZ1Lcd/0dH7YL
CuiyKNYiWQOm2ARMx7MQR08EgWI7VYNpjlM1Flfz/lSRmRt9j9t0D0VvOyNeBn6f
9/1Kz3J38yLP6umpxgWOu0wD+AdmPN8lJnlv1cIq+SnBNEFNnfNf5mDtLdh0mYGR
kZM8f+ZNIM3Vg0dOFDrTfIkHnA99stljM0sI58Z7oOE8Yyi82XyD9nua62+PGkdS
42O5TpQR9TNY7RvxwMPoRXnNQCC7ClbBcLHCvwf8wmKtxELyO/zHzwLgUgVTgTwi
xqSezqa2KFbBYI7B73CP9ekLRPZ6oJ/V7cS9zUQhSc6xNsOeKeUKE9xQg0aAU/Fd
tvTCEw7LqB9fUi/g6++E1EmFevdxr//gG3RpS0Zpw9YDLzCh9NOUYUqj0pKLBN1e
IPRp/MNkZGrKnCfNCTigfp7fu9w6ihTrFObHPofeYQxTTQGyf1x4GIdAN6qkcmWn
s2NZ+JOPpgNe9RascXtBEZCsbz7EaEP/2gIhLAFHPIDGPFTSB/KrrYSqIQaajCqD
XiuqUs6ankHJdWp2tL7+Qkt6r3QGZR3w3E4Jz22Qzd3crerw47DmB5P3suq1ogFz
VgFv4bNVW70bya8lJ17g4tqMBET8R7yPO99K168SgKd+Jy5Dli8i6qLM90MGBgC7
Q9sEsve/6u7px2t0C3XR
=wgLa
-----END PGP SIGNATURE-----

--aH8ooV5C7cd51C48lug0OG9Ono4n9nHjs--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f38f69d4-09f2-caaf-582d-ee0aa59c07bd>