BTRFS and Rox Drive Mounter

versatile 64-bit multi-user Linux distribution

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
user1111

BTRFS and Rox Drive Mounter

Post 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 493 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.
User avatar
JakeSFR
Posts: 276
Joined: Wed Jul 15, 2020 2:23 pm
Been thanked: 159 times

Re: BTRFS and Rox Drive Mounter

Post 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!
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
user1111

Re: BTRFS and Rox Drive Mounter

Post by user1111 »

Thanks. That fatdog-drive-icon-mount-helper.sh code works perfectly :thumbup:
Clarity
Posts: 3843
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1633 times
Been thanked: 526 times

Re: BTRFS and Rox Drive Mounter

Post by Clarity »

Has this been automatically detected (corrected) in FD 811?
user1111

Re: BTRFS and Rox Drive Mounter

Post 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.
Post Reply

Return to “FatDog64”