Page 1 of 1

BTRFS and Rox Drive Mounter

Posted: Sun Sep 13, 2020 9:35 pm
by user1111
On my laptop I use a small/modest sized ext 1st partition for fatdog/system files (sda1), sda2 is a swap partition, sda3 is formatted to be a btrfs partition.

When I use rox to mount sda3 it automatically mounts with no btrfs compression being set, so I run a script in the root folder of that partition that remounts it with lzo compression activated i.e.

mount -o remount,compress=lzo /mnt/sda3

Running filemnt before and after that shows it as having correctly been set to use compression and btrfs-compsize /mnt/sda3 (or against individual files) indicates compression is occurring.
s.png
s.png (398.47 KiB) Viewed 495 times

My question is, is there a easier way, such as being able to set the default drives (bottom left corner) to automatically mount btrfs partitions with compress=lzo ? Such as perhaps adding something into my sda3 drives AppInfo files/folder ?

I don't really bother using the subvolumes and snapshot functions of btrfs, just really using it pretty much as a standard partition/filesystem (other than infrequent messing around with btrfs functions/capabilities as and when the fancy takes) for its background/transparent compression function. My laptop's HDD is relatively slow and for instance reducing a spreadsheet file down from 400MB to 300MB via lzo compression helps speed things up overall.

Re: BTRFS and Rox Drive Mounter

Posted: Mon Sep 14, 2020 1:57 pm
by JakeSFR
Most of mount options in /usr/sbin/fatdog-drive-icon-mount-helper.sh are hardcoded.
You could add a dedicated section for btrfs, though, e.g. between 'f2fs)' and '*)':

Code: Select all

f2fs) # special treatment for f2fs, otherwise conflict with xfs
	  mount -t f2fs $1 "$2"
 	  ;;
btrfs) # enable lzo compression for btrfs
	  mount -o compress=lzo $1 "$2"
	  ;;
*)	  # others - just mount it directly
	  mount $1 "$2" ;;
Another way, if you don't mind auto-mounting sda3 at boot time, would be to utilize /etc/fstab.

Greetings!

Re: BTRFS and Rox Drive Mounter

Posted: Mon Sep 14, 2020 9:14 pm
by user1111
Thanks. That fatdog-drive-icon-mount-helper.sh code works perfectly :thumbup:

Re: BTRFS and Rox Drive Mounter

Posted: Mon Sep 14, 2020 10:30 pm
by Clarity
Has this been automatically detected (corrected) in FD 811?

Re: BTRFS and Rox Drive Mounter

Posted: Mon Sep 14, 2020 10:44 pm
by user1111
It's not a bug Clarity. Just a desire. You can choose a range of compression methods with btrfs, I just personally like lzo for its speed, albeit with less compression.