<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 2, 2023 at 9:37 AM James Abernathy <<a href="mailto:jfabernathy@gmail.com">jfabernathy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 2, 2023 at 9:19 AM James Abernathy <<a href="mailto:jfabernathy@gmail.com" target="_blank">jfabernathy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 2, 2023 at 9:11 AM James <<a href="mailto:jam@tigger.ws" target="_blank">jam@tigger.ws</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br><div><br><blockquote type="cite"><div>On 2 Jun 2023, at 8:59 pm, James Abernathy <<a href="mailto:jfabernathy@gmail.com" target="_blank">jfabernathy@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 2, 2023 at 8:33 AM James <<a href="mailto:jam@tigger.ws" target="_blank">jam@tigger.ws</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br><div><br><blockquote type="cite"><div>On 2 Jun 2023, at 8:08 pm, Richard Shaw <<a href="mailto:hobbes1069@gmail.com" target="_blank">hobbes1069@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div dir="ltr">On Fri, Jun 2, 2023 at 6:54 AM James <<a href="mailto:jam@tigger.ws" target="_blank">jam@tigger.ws</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>There is quite a lot of discussion on why not to use btrfs with maria<div><a href="https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/58" target="_blank">https://gitlab.archlinux.org/archlinux/infrastructure/-/issues/58</a></div></div></div></blockquote><div><br></div><div>There's a few different solutions if you already have the files created since the +C must be done at creation.<br></div><div><br></div><div>My method is to:<br>mv <file> <file>_backup</div><div>touch <file></div><div>chattr <a class="gmail_plusreply" id="m_-5149961451836525521m_5046770216557393565m_-5666949718224613862m_-6087249095224027248plusReplyChip-1">+C <file></a></div><div>dd if=<file>_backup of=<file></div><div><br></div><div>You can add bytesize (bz=1M) or similar to speed it up. I did this with a 1TB blockchain file successfully.</div><div></div></div></div></div></blockquote><br></div><div>Mostly for Jim Abernathy's info, I pretty much stick to ext4, but was toying with idea of changing</div><div><br></div><div>James</div></div></blockquote><div><br></div><div>I've used btrfs in a RAID 1 mirror array on my production backend with mariadb for a year plus a few months without issues. I update about once a month and that usually requires a reboot. The boot ssd also was installed with btrfs with timeshift snapshots every hour.</div><div><br></div><div>I didn't do anything about COW disable at the time of install. I see from the archlinux link that someone said it was addressed 2 years ago??? If that's true, should I even need to worry about chattr <a class="gmail_plusreply" id="m_-5149961451836525521m_5046770216557393565m_-5666949718224613862plusReplyChip-0">+C <file>???</a></div><div><br></div><div>I learned most of what I know about BTRFS usage from the Kubuntu Forum. They have a BTRFS category and I'll ask for knowledge over there.</div><div><br></div><div>I make special arrangements for COW issues for Virtual Machines by keeping all qcow2 files on a separate ssd formatted ext4. I think that is required because qcow2 files already use COW. I prefer this instead of chattr +C /var/lib/libvirt/images. Using a separate ext4 ssd has the added benefit of not having to recreate VMs when I change Distro every month or so because some defect in my brain requires it.</div></div></div></div></blockquote><br></div><div>Jim if you uncover anything interesting please post it (or even just mail me)</div><div>thanks</div><div>James</div></div></blockquote><div><br></div><div>It must be fixed. I did lsattr /var/lib/mysql/ and the whole directory has the COW disabled:</div><div><br></div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">[root@eos-mythtv-master mythtv]# lsattr /var/lib/mysql/
</span><br>---------------C------ /var/lib/mysql/aria_log_control
<br>---------------C------ /var/lib/mysql/aria_log.00000001
<br>---------------C------ /var/lib/mysql/ibdata1
<br>---------------C------ /var/lib/mysql/ib_logfile0
<br>---------------C------ /var/lib/mysql/mysql
<br>---------------C------ /var/lib/mysql/performance_schema
<br>---------------C------ /var/lib/mysql/sys
<br>---------------C------ /var/lib/mysql/mysql_upgrade_info
<br>---------------C------ /var/lib/mysql/<a href="http://multi-master.info" target="_blank">multi-master.info</a>
<br>---------------C------ /var/lib/mysql/ddl_recovery-backup.log
<br>---------------C------ /var/lib/mysql/mythconverg
<br>---------------C------ /var/lib/mysql/ib_buffer_pool
<br>---------------C------ /var/lib/mysql/ddl_recovery.log
<br>---------------C------ /var/lib/mysql/ibtmp1
<br>---------------C------ /var/lib/mysql/eos-mythtv-master.pid</span></div></div></blockquote><div><br></div><div><br></div><div>FYI, this isn't the result I get with my production backend built over a year ago on Ubuntu 22.04 The result posted above is from Ubuntu 23.04.  So I'm guessing I might need to do something on the production system to be safe??</div><div><br></div><div>Jim A</div></div></div></blockquote><div><br></div><div>The KubuntuForum guys think this is a performance issue with possible impacts on HDD thrashing and wear and tear on SSDs; not data integrity. It might not be an issue on low activity databases like mythconverg compared to a database used only by a popular web server.</div><div><br></div><div>They reference this discussion: </div><div><a href="https://superuser.com/questions/1124312/should-the-nodatacow-mount-option-be-used-in-btrfs-in-a-database-server-does-it">https://superuser.com/questions/1124312/should-the-nodatacow-mount-option-be-used-in-btrfs-in-a-database-server-does-it</a><br></div><div><br></div><div><span style="color:rgb(17,17,17);font-family:Arial,Helvetica,Verdana,sans-serif;font-size:13px">What I found out further is that the Kubutnu 22.04 LTS version of mariadb, when installed on my production machine, didn't have chattr +C set for the mysql directories and all the files do NOT have the COW disabled. Only my test system with Endeavour OS (Archlinux) has that set to COW disabled.</span><br style="color:rgb(17,17,17);font-family:Arial,Helvetica,Verdana,sans-serif;font-size:13px"><br style="color:rgb(17,17,17);font-family:Arial,Helvetica,Verdana,sans-serif;font-size:13px"><span style="color:rgb(17,17,17);font-family:Arial,Helvetica,Verdana,sans-serif;font-size:13px">My whole /var/lib/mysql directory is only 500MB with the only active database (mythconverg) being less than 100MB. I think the database only changes when data changes related to the metadata for TV recordings. So very infrequent updating.</span><br style="color:rgb(17,17,17);font-family:Arial,Helvetica,Verdana,sans-serif;font-size:13px"><br style="color:rgb(17,17,17);font-family:Arial,Helvetica,Verdana,sans-serif;font-size:13px"><span style="color:rgb(17,17,17);font-family:Arial,Helvetica,Verdana,sans-serif;font-size:13px">I think I'm going to leave the production system alone until it's time to move to a new version of LTS and make sure COW disable is set in that version of mariadb.</span><br></div><div><span style="color:rgb(17,17,17);font-family:Arial,Helvetica,Verdana,sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(17,17,17);font-family:Arial,Helvetica,Verdana,sans-serif;font-size:13px">Jim A</span></div><div><span style="color:rgb(17,17,17);font-family:Arial,Helvetica,Verdana,sans-serif;font-size:13px"><br></span></div></div></div>