[systemd-devel] [PATCH 2/2] Add +C attrib to the journal files directories

Lennart Poettering lennart at poettering.net
Wed Apr 8 14:15:03 PDT 2015


On Sat, 21.03.15 12:56, Goffredo Baroncelli (kreijack at libero.it) wrote:

> From: Goffredo Baroncelli <kreijack at inwind.it>
> 
> Add +C attrib to the journal files directories. The journal file format
> behaves bad on a BTRFS filesystem: the performances decrease during the
> time.
> To avoid this issue, this tmpfile.d snippet sets the NOCOW attribute to the
> journal files directories, so newly created journal files inherit the NCOOW
> attribute.

I think it would be good if much of this explanation would actually be
in the tmpfiles snippet. 

> 
> Be aware that the NOCOW attribute disables the BTRFS checksums, prevent BTRFS
> to rebuild a corrupted file in a RAIDx filesystem. However the perfomances
> increase.
> In a single disk filesystem (or a filesystem without redundancy) it is safe
> to use the NOCOW flags.
> ---
>  tmpfiles.d/journal-nocow.conf | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>  create mode 100644 tmpfiles.d/journal-nocow.conf
> 
> diff --git a/tmpfiles.d/journal-nocow.conf b/tmpfiles.d/journal-nocow.conf
> new file mode 100644
> index 0000000..8d9c1e8
> --- /dev/null
> +++ b/tmpfiles.d/journal-nocow.conf
> @@ -0,0 +1,19 @@
> +#  This file is part of systemd.
> +#
> +#  systemd is free software; you can redistribute it and/or modify it
> +#  under the terms of the GNU Lesser General Public License as published by
> +#  the Free Software Foundation; either version 2.1 of the License, or
> +#  (at your option) any later version.
> +
> +# See tmpfiles.d(5) for details
> +
> +# set the journal file as NOCOW; make sense only for BTRFS
> filesystem

This will not set "the journal file" as NOCOW, but will set the flag
for the directory as a whole. Please explain this more accurately.

> +# WARNING: the NOCOW attribute disables the BTRFS checksums, prevent BTRFS
> +#          to rebuild a corrupted file in a RAIDx filesystem. It is suggested
> +#          to disables these setting in this kind of filesystem.
> +#          However in a single disk filesystem (or a filesystem without 
> +#          redundancy) it is safe to use the NOCOW flag.
> +#          Setting the NOCOW flag the perfomances increase.

This is not correct english.

> +
> +h /var/log/journal/%m - - - - +C
> +h /var/log/journal/remote - - - - +C

I think /var/log/journal itself should also get this treatment.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list