databases should be created with chattr +C

  • Done
  • quality assurance status badge
Details
4 participants
  • Danny Milosavljevic
  • Efraim Flashner
  • Ludovic Courtès
  • Rutger Helling
Owner
unassigned
Submitted by
Efraim Flashner
Severity
normal
E
E
Efraim Flashner wrote on 12 Dec 2017 12:46
(address . bug-guix@gnu.org)
20171212114608.GB1873@macbook41
We support running GuixSD on top of btrfs, and the prevailing wisdom is
to mark databases (sqlite, postgresql, etc.) as 'chattr +C', that is, as
not copy-on-write. It is honored under ext4, but it shouldn't cause any
changes.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlovwX4ACgkQQarn3Mo9
g1Fhpw/6A46iev0r6CY0Ei+643qJLxkCW9DdFe2g2EYSyOMsYcwolpKURPXrDqGV
ST4q3lDGQAKRr3m68/Qp50F6enY6a+d1ytYovOCX9I8SRDCx3BxfhE25LghFTY20
JXOfd6pwKMPhbELRrsTln0H5BAaqozWTjDqTMpggFIWgOoqRkDKMJPsRMsWi3Uo9
PNfSkj8NYEqc9L5myQJ6NhKyyv1PP0js1K0hAmnC+SoAJFSP/boRE3RpPBTyLkQN
HLwOk5L1XocjrvawY0dIhatDcUXbXc+ZobPHr+o7QIzlTLGea7OWm87QS9h03acd
T5pekuxGJkGk/q9BJXrDrNM/VWD2xHs6jtmCSSoDNaFKmaGCDz9wZ3aQA+TPoAil
INM10oaJ+rszW+QdCe0oYcuQgYA3EsVcnnECGXZ8/69zcP0w+m96ipqSvndLmz5s
ZNnNfFPmtME9bQQM4GcDKoTTJevnhIjp/5E+3TituszLq8nwZoPkf2b2CAZD9ydF
hXan0c93Sk2C1ju75W3tKaMf0MnslEtKHuHbEC1tUCrUludkW8BiijTvnc/sDU7D
/Y2khLDVsSZMf2hBUKSqpIKjYWqPz5l5sBq7ZnFLN70OBylH0Kt0qOROw91siUnJ
59FofDGiHickNLuflrq9dJd8XoWRekcJMQ822WIb5TOUHDRpu/g=
=OYM8
-----END PGP SIGNATURE-----


R
R
Rutger Helling wrote on 13 Dec 2017 09:50
(address . 29675@debbugs.gnu.org)(address . efraim@flashner.co.il)
faea3e29b291d7ff118b54880b7b8124@mykolab.com
This should also be done with virtual machine images.
D
D
Danny Milosavljevic wrote on 13 Dec 2017 15:40
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 29675@debbugs.gnu.org)
20171213154003.29024f01@scratchpost.org
Hi Efraim,

On Tue, 12 Dec 2017 13:46:08 +0200
Efraim Flashner <efraim@flashner.co.il> wrote:

Toggle quote (5 lines)
> We support running GuixSD on top of btrfs, and the prevailing wisdom is
> to mark databases (sqlite, postgresql, etc.) as 'chattr +C', that is, as
> not copy-on-write. It is honored under ext4, but it shouldn't cause any
> changes.

It sounds reasonable to do that - but I don't think that relational databases are managed by the Guix store. Rather they are in /var or in the home directory. Long story short, it would make sense for Postgres and Sqlite upstream to do the chattr +C, if they don't already do it.
L
L
Ludovic Courtès wrote on 20 Dec 2017 14:12
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
87efnpy248.fsf@gnu.org
Hello,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (10 lines)
> On Tue, 12 Dec 2017 13:46:08 +0200
> Efraim Flashner <efraim@flashner.co.il> wrote:
>
>> We support running GuixSD on top of btrfs, and the prevailing wisdom is
>> to mark databases (sqlite, postgresql, etc.) as 'chattr +C', that is, as
>> not copy-on-write. It is honored under ext4, but it shouldn't cause any
>> changes.
>
> It sounds reasonable to do that - but I don't think that relational databases are managed by the Guix store. Rather they are in /var or in the home directory. Long story short, it would make sense for Postgres and Sqlite upstream to do the chattr +C, if they don't already do it.

I agree.

Efraim, unless we have a specific example, I’m inclined to close it as
“not-a-bug”, with the understanding that it’s an upstream issue rather
than something GuixSD-specific.

How does that sound?

Ludo’.
E
E
Efraim Flashner wrote on 20 Dec 2017 14:31
(name . Ludovic Courtès)(address . ludo@gnu.org)
20171220133112.GA16642@macbook41
On Wed, Dec 20, 2017 at 02:12:39PM +0100, Ludovic Courtès wrote:
Toggle quote (24 lines)
> Hello,
>
> Danny Milosavljevic <dannym@scratchpost.org> skribis:
>
> > On Tue, 12 Dec 2017 13:46:08 +0200
> > Efraim Flashner <efraim@flashner.co.il> wrote:
> >
> >> We support running GuixSD on top of btrfs, and the prevailing wisdom is
> >> to mark databases (sqlite, postgresql, etc.) as 'chattr +C', that is, as
> >> not copy-on-write. It is honored under ext4, but it shouldn't cause any
> >> changes.
> >
> > It sounds reasonable to do that - but I don't think that relational databases are managed by the Guix store. Rather they are in /var or in the home directory. Long story short, it would make sense for Postgres and Sqlite upstream to do the chattr +C, if they don't already do it.
>
> I agree.
>
> Efraim, unless we have a specific example, I’m inclined to close it as
> “not-a-bug”, with the understanding that it’s an upstream issue rather
> than something GuixSD-specific.
>
> How does that sound?
>
> Ludo’.

My intention was that after creating the database in /var that it should
get 'chattr +C file', but it actually looks like people are divided
between less fragmentation from not CoW for the database or more
recovery options from having it CoW and the checksumming, so closing it
and leaving it alone for now seems best.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlo6Zh4ACgkQQarn3Mo9
g1H7Pw/+NOxEFoq0jPIHF9i3IEdErSo1Z4iS/blFBy6VPk0H2XWty1FsRYIUreJr
VTIUI5R57dcNE+2eUR/JH2c5EOvuGdNoQD0FGVEgi8i7SnRsMB09brew9Obo5mj/
kMKsfh+XTxd0Xz2fWXJXxB++8VomzJJXNr8Nxm7LtTq039uyJ6Ez6oqu8a75e5FQ
Jrk4NSopM/4se8sncaVo7IaxOaCgGkKynqFYI0oDMUMA0h22C04ZLwCbgxkR6lxs
4ZRVBwkfuG+1KqYTSpIKbzTgb9+Cte4MvCdaIoXsm6wBICMbv566oQbC8eWfORBw
7c8hQ/M9igITYumcxMd7dGgQLD7sewQji8v22LPH9nA8LKUzhi6wnfrEzv4dA7Gt
/2lBmtfrBlJkCWbHvOR22NWH8EfOF6HQtqDoSyak0BEkNzGPVN/1kc2dlaQ0KtUO
MRfcw+CBXkS+yvof8+Qs1b8ibcGTJPXCj6EVFUGC8DQ/s9HXmOsWIyZb/NfcxYYB
Qjdmtccd5HovEYwbogxQG94ngt0Q1CkfXEntq+K/WIlzDGwxtAL1bsNhD+RBuOTd
gimeMwcTgFnJH1sxahNKSXX1gBQRlbOX3HlXpAwGuyrRmtMcTecDZvXyva5jWCEa
HCffSDYGtZ8fIgeE3WOSpRgFd0ax8Ig7OWk9ndSUq0oFo3qIgwo=
=fu5z
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 20 Dec 2017 14:50
control message for bug #29675
(address . control@debbugs.gnu.org)
871sjpwlsg.fsf@gnu.org
tags 29675 notabug
close 29675
?
Your comment

This issue is archived.

To comment on this conversation send an email to 29675@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 29675
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch