Bug 935596

Summary: BTRFS root partition should have a /var/lib/mysql subvolume
Product: [openSUSE] openSUSE Tumbleweed Reporter: Robert Munteanu <rombert>
Component: InstallationAssignee: E-mail List <yast2-maintainers>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: aschnell, bwiedemann, chcao, dsterba, jreidinger, mpluskal
Version: Current   
Target Milestone: ---   
Hardware: All   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Robert Munteanu 2015-06-22 11:59:02 UTC
The default subvolume list should include a /var/lib/mysql subvolume. This allows MySQL data files to be excluded from snapper snapshots and maybe in the future to have different mount parameters, like nodatacow.
Comment 1 Bernhard Wiedemann 2015-06-23 07:55:26 UTC
I thought, it was usually recommended to run databases on XFS or ext3/4
(but I guess, yast does not propose that yet)

/var/lib/pgsql should be handled the same anyway.

and there are many other candidates in /var/lib
that you dont want rolled back,
such as /var/lib/libvirt/images
Comment 2 Robert Munteanu 2015-06-23 08:06:33 UTC
I filed this request since there are already subvolumes in /var/lib

- /var/lib/mailman
- /var/lib/pgsql
- /var/lib/named

and I assumed the partitioner aims to create as many meaningful default subvolumes. There are indeed some more, like /var/lib/libvirt/images, and  whatever docker uses for storage.
Comment 3 David Sterba 2015-06-23 13:55:03 UTC
I think we can't avoid creating the exceptions list, compared to "all directories in /var/lib shall be subvolumes" approach. Eg. the rpm database in /var/lib/rpm must match the running / .

I'm counting like 100 directories under /var/lib on my desktop and most of them look like the rollback is undesired.

There are examples (like the rpm db) that must not be a subvolume, and the list of 'must be subvolume' like proposed above and current snapper exceptions. The rest should be decided case-by-case but I think the preferred default is to create subvolumes.

We could provide a tool/script to switch a given directory to a subvolume as a fallback solution.
Comment 4 Josef Reidinger 2015-06-24 15:35:54 UTC
done and as bonus no-cow attribute added ( authot huha )
quote: "Available with libstorage6-2.25.23 and yast2-storage-3.1.57 ."