Bug 412565 - Mount options
Summary: Mount options
Status: RESOLVED WORKSFORME
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-03 16:06 UTC by Recesvintvs
Modified: 2019-10-08 17:12 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Recesvintvs 2019-10-03 16:06:39 UTC
When mounting a partition in Plasma, Dolphin mainly, I don't know which mount options are being used.
This needs to be configurable because, for example, I have an external USB disk I use to save tons of documents: PDF, EPUB, ODT, old Windows formats, etc. These type of files are very well compressed, saving a lot of space ("modern disk are so big that space is not an issue" is a shitty excuse, sorry if any one was thinking to reply to me with that nonsense. I decide what is big enough for my necessities, not other persons) and loading faster for the disk needs to read less data, more useful than it sounds when you have some 400 MB PDFs on a slow mechanic disk on an USB 2 connection. So, I formatted that disk in BTRFS and wrote a line in my fstab to mount it using the BTRFS compression.
Well, I read somewhere that Dolphin doesn't read fstab to mount external partitions, ergo I suppose that my BTRFS disk isn't being mounted as I really want when I mount it through Dolphin or any other KDE app; it very probably isn't even being mounted with compression support, right?

So, I suggest to add an avanced tab or something like that to configure mount options for external drives. Maybe the configuration tool should not be for Dolphin especifically but a general one for Plasma, and sit in the System Preferencies app in the form of a KCM module.
Comment 1 Nate Graham 2019-10-03 16:38:19 UTC
Dolphin uses the Solid framework for mounting, which does read /etc/fstab and respects any manually-adjusted mount parameters you've defined. Can you confirm that the partition is actually not being mounted correctly, or is this a supposition?
Comment 2 Recesvintvs 2019-10-04 16:36:53 UTC
(In reply to Nate Graham from comment #1)
> Dolphin uses the Solid framework for mounting, which does read /etc/fstab
> and respects any manually-adjusted mount parameters you've defined. Can you
> confirm that the partition is actually not being mounted correctly, or is
> this a supposition?


I read somewhere, I think it was in the KDE forums, some years ago, that Dolphin had its own mount method. Perhaps was an old post. There's a lot of outdated info in KDE forums and many blogs that is obsolete and should be updated or deleted.

Anyway, the case is that Compsize (https://github.com/kilobyte/compsize) reports this about one of my docs-only folders:

Processed 16313 files, 12991 regular extents (12992 refs), 5967 inline.
Type       Perc     Disk Usage   Uncompressed Referenced  
TOTAL       99%       13G          13G          13G       
none       100%       13G          13G          13G       
lzo         49%      2.8M         5.6M         5.6M       
zstd        34%      5.7M          16M          16M 

I can't really swear the partition in question is being mounted incorrectly or the problem comes from other side, but considering this is a folder which content is only text documents, seems obvious that the BTRFS compression is not being used. Some PDF in this folder contain embedded JPG images and some others are PDF with the format's builtin compression, thus BTRFS doesn't try to [re]compress them, that's true, but a great percentage of the files in this folder are EPUB, ODT, DOC, TXT, MD, HTML... A miserable 1% of compression is way too few to believe that compression is really being applied.

Could you tell me if I can do any test or use any especific tool to make sure that Dolphin is the culprit, or not?
Comment 3 Nate Graham 2019-10-04 18:16:09 UTC
I'm afraid I don't know anything about BTRFS so I can't help you ascertain whether or not your partition is being mounted in the way you expect or not. Please do add a comment if you're able to discover that it's being mounted in a way that ignores the options you've set in /etc/fstab.
Comment 4 Recesvintvs 2019-10-05 19:53:33 UTC
I'm also afraid I don't know much about BTRFS or any other file system format. I'm just an average user and my technical knowledge is rather basic. The only way I know to verify how a partition has been mounted is simply using the command "mount", and a "mount | grep sdb1" returns:

/dev/sdb1 on /run/media/myuser/mountpoint type btrfs (rw,noatime,compress=zstd:3,noacl,space_cache,commit=60,subvolid=5,subvol=/)

I don't know if that's the correct way, but in case it is, I think that something is failing because even if mount says that zstd compression is being used, the numbers say the opposite. I can't believe that I get only a testimonial 1% of compression if zstd compression were really working.

I'll test by mounting the external disk manually creating a folder and copying some files, and then remounting with Dolphin, repeating the process and looking if it makes any difference. In case it would, I'll report back. In case it would not, I suppose the problem must come from something else and this bug should be closed.

Thank you. And if some other people read this and have any suggestion, I'm open to try them to solve the problem.
Comment 5 Recesvintvs 2019-10-08 17:11:47 UTC
I don't know the reason, but seems that old files hadn't been written using any compression. It seems that the small compression shown by Compsize corresponds with recently writen files, which are, effectively, being well compressed, reaching ratios up to 74% size reduction in folders with text only files.
Perhaps ancient versions of Dolphin didn't work very well, perhaps I had some bad installation issue. Who knows. But I have tested mounting both automatically in Dolphin and manually in Konsole, in 2 different disks, and the compression now is always done in the same amount, 37% in average. So Dolphin is working as expected and I'll have to defrag my BTRFS disk to recover some nice GBs.

You can mark this bug as invalid or what you consider adequate.
Comment 6 Nate Graham 2019-10-08 17:12:44 UTC
Awesome, happy to hear that things are working properly!