Bug 444723 - Support for per-folder Defrag, Scrub, and Compress operations on BTRFS disks
Summary: Support for per-folder Defrag, Scrub, and Compress operations on BTRFS disks
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Properties dialog (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-31 15:35 UTC by Emanuele
Modified: 2021-11-09 20:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
example (116.03 KB, image/jpeg)
2021-10-31 15:35 UTC, Emanuele
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuele 2021-10-31 15:35:13 UTC
Created attachment 143060 [details]
example

Fedora and openSUSE use Btrfs by default, it would be an improvement to support some Btrfs features directly on Dolphin. Trivially, with the btrfs driver for Windows 10 you have the Windows file manager with better support (create subvolumes, balance ...), actions that a Fedora user should do from the CLI.
Comment 1 Emanuele 2021-10-31 15:37:44 UTC
For other screenshots, since I don't know how to put them here, I had filed the bug on gitlab.

https://invent.kde.org/system/dolphin/-/issues/22
Comment 2 Nate Graham 2021-11-08 17:20:41 UTC
What exactly would Dolphin need for better support? Can you provide a list?
Comment 3 Emanuele 2021-11-08 21:44:34 UTC
Thank you for answering, you of KDE you are always so kind and helpful. 

I don't know in which place it is best to insert these options, maybe right click> Properties? Or in the right click list?

- Create Subvolume
Creating a separate subway has some advantages, mainly + that are excluded from the snapshots.
Example from CLI: 
emanu@fedora ~> btrfs subvolume create test
Create subvolume './test'

emanu@fedora ~> ls -l | grep test
drwxr-xr-x. 1 emanu emanu      0  8 nov 22.27 test

- Defrag
Select a folder, you can choose to make a Defrag, useful on the database or to comply files already written by selecting the algorithm.
https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-filesystem#EXAMPLES

- Scrub
https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-scrub

- Compress folder or file set
Example, it can isolate you to create a suburb or set a folder with different compression algorithm, diablaiming compression etc.
example:  btrfs property set <file> compression 

I was surprised, installing the BTRFS driver on Windows, to have all this in the file manager.
Available here:  https://github.com/maharmstone/btrfs

Is it difficult for Dolphin to know if you are on a BTRFS filesystem and show these options?
Comment 4 Nate Graham 2021-11-08 22:42:56 UTC
> Thank you for answering, you of KDE you are always so kind and helpful. 
Aww, you're too kind!

Creating a subvolume would be something I expect you'd do in a partitioning app like Partition Manager. I'd recommend you open a new bug report for it there.

For Defrag, Scrub, and Compress operations, the most logical place for these would be in the properties window for a folder, which comes from KIO. Moving the bug report there.
Comment 5 Emanuele 2021-11-08 23:14:40 UTC
Subvolumes behave like normal folders for users, is having them on Dolphin the best place?  And you have the advantage of Btrfs if you use snapshot and btrfs send.  If I have to create a folder I do it from Dolphin.
Comment 6 Nate Graham 2021-11-08 23:48:10 UTC
How often does a BTRFS user create subvolumes compared to how often a typical file manager user creates folders, though?
Comment 7 Emanuele 2021-11-09 20:03:11 UTC
Safely the frequency will be minor, compared to creating folders, but the problem is that creating a folder/subvolume in a specific location on the user's home is possible?
Example:
- I have the "Downloads" folder, I remove it and create it as a subvolume.
- I go to any other folder of my user and create the subvolume/folder with a click
To be clarified that so you create a nested subvolume with user permissions: you can remove it as any other folder, there is no need to specify mounting points on "fstab".

On the Partition Manager, in my opinion, it's ok to add the functionality of creating BTRFS subvolume, but at the system level, to the Toplevel and Flat, in this case you need to specify the mount point, but this will be for a request for separate functionality, because Maybe a little more complex and with a good UX design.
Comment 8 Emanuele 2021-11-09 20:16:53 UTC
I created an example video: https://youtu.be/bjoj612HGsQ