Try BTRFS (Again!)

**** I do not mind deleting the post if seen confusing/wrong/unnecessary… ******

I will try BTRFS (Again!)
As per a discussion with @dalto some time ago, where at the end I promised I will read and learn more about BTRFS.

No need to mention again the problem of BTRFS+Snapshots causing Baloo to keep reindexing “/home”

After I learned a little about BTRFS (and even less about Snapper or Snapping in general) I thought I would just start and convert to BTRFS without taking or using/installing any snapshot software as a start point.

Why no snapshots? Just to avoid Baloo reindexing, to understand “practically” the BTRFS file system, then I can look at snapshots.

So, to start I will give you my current situation (next post), and a few questions (after next post), in hope I understand more and convert without messing up my system, and be ready later to use snapshots without any issues.

Why all of the above?

  • Understood from @dalto that he actually uses BTRFS, Snapshots (including “/home”) without having any issues of Baloo reindexing “/home” while many snapshots of his "/home ar taken and not reindexed. So, why can’t I do it!
  • The future of Linux is in BTRFS (I believe the future has already started but I am still back in time)

The benefits I am expecting from BTRFS without auto snapshots via Snapper or TimeShift:
1- File compression
2- Deduplication
3- (I hope I got it right), in EXT4 (assuming 1 SSD, total size 250GB, of which 50GB reserved for system you are left with 200GB for data, even if the system is taking actually only 10GB.)
In BTRFS there are two subvolumes (like partitions) one for system and the other for data where both their sizes change according to actual use. That is the system will be taking actually only 10GB not the full 50GB as in EXT4 and the rest (240GB) goes fully for data.
4- (Hopefully) I can start with doing a manual snapshot of the system ONLY without “/home”

Just for reference (like summarising) allow me to put a summary of our discussion below ( What is in parentheses ( ) is @dalto 's, what is not in parentheses is mine)

I Suggested BTRFS takes snapshots of only the file system not ‘/home’
(You decide which subvolumes you want to snapshot. )

(Baloo has an easy UI which allows you to decide what you do and don’t want to index. Why can’t you simply exclude the snapshots?)

(This seems like a setup or a design issue to me. I have hundreds of snapshots of /home and none of them are getting indexed. I don’t even have them excluded by baloo.)

(If you put snapshots with user readable privileges inside the part of your system that baloo is indexing then that will happen.)

(((snapper makes the snapshot directories only readable by root so baloo would never index them.)))

(It looks like you might have been using timeshift.)

As you mentioned earlier that you already have BTRFS and Baloo and NOT having this problem reported by several users, so I may conclude that:

Baloo is perfect on its own.
BTRFS is perfect on its own.
To use them both needs the users to be a bit techie to “design” the system as you mentioned in a post above.

(It seems that baloo triggers reindexing because of the way it identifies devices.)

I will try read more
********************* Here is my humble understanding **********

  • a subvolume is like a separate drive
  • a snapshot is like a copy of a folder or a subvolume
  • a great feature is deduplication and compression.
  • if i don’t take snapshots all benefit is compression

I would like to thank you all for your patience, your support, your understanding.
I hope you forgive me for this lengthy post and I hope I am not causing any trouble or breaking any rules.
I do not mind deleting this thread if you see it is unnecessary!
I am just trying to get the most out of my beloved EndeavourOS and my beloved community.
Thank you.

Here is my system:

Drives:
  Local Storage: total: 232.89 GiB used: 36.97 GiB (15.9%)
  ID-1: /dev/sda vendor: Samsung model: SSD 870 EVO 250GB size: 232.89 GiB
    speed: 6.0 Gb/s type: SSD serial: S5Y4NJ0R325556E rev: 1B6Q scheme: GPT
Partition:
  ID-1: / size: 227.88 GiB used: 35.84 GiB (15.7%) fs: ext4 dev: /dev/sda2
  ID-2: /boot/efi size: 299.4 MiB used: 464 KiB (0.2%) fs: vfat
    dev: /dev/sda1
Swap:
  Alert: No swap data was found.
[limo@limo ~]$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 232.9G  0 disk 
├─sda1   8:1    0   300M  0 part /boot/efi
└─sda2   8:2    0 232.6G  0 part /
sdb      8:16   1     0B  0 disk 
sr0     11:0    1  1024M  0 rom  
[limo@limo ~]$ 

CPU:
  Info: dual core model: Intel Core i5-3210M bits: 64 type: MT MCP
    smt: enabled arch: Ivy Bridge rev: 9 cache: L1: 128 KiB L2: 512 KiB
    L3: 3 MiB
  Speed (MHz): avg: 1253 high: 1291 min/max: 1200/3100 cores: 1: 1268
    2: 1233 3: 1220 4: 1291 bogomips: 19955
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3

System:
  Host: limo Kernel: 5.15.55-2-lts arch: x86_64 bits: 64 compiler: gcc
    v: 12.1.0 Desktop: KDE Plasma v: 5.25.3 tk: Qt v: 5.15.5 wm: kwin_x11 vt: 1
    dm: SDDM Distro: EndeavourOS base: Arch Linux

I have TimeShift installed with some snapshots already taken.
In TimesShift “Settings” it is “Snapshot Type” is “Rsync” and Snapshot Location: is at “sda2”
Filters:

  • /home/limo/** is excluded
  • /root/** is excluded

Do you need any more details?

Now, what is the best way to “convert” the filesystem to BTRFS (better not reinstalling though I do not mind - including wiping out my data)
How to convert to BTRFS without any snapshotting?
Would TimeShift configured to snapshot systm only (I believe not data and rsync) OK? I do not mind uninstalling it and deleting all snapshots.
Can TimeShift with current configuration be kept to snapshot sytsem only without '/home"?

Sorry for lots of questions.
I appreciate your patience and understanding.

I don’t think you should convert actually.

In the last topic, we determined that baloo has no issue with snapshots causing a re-index.

However, we also determined that there was an issue with baloo and the way it identifies devices causing issues on btrfs. Since that is still present, you will likely run into the same issues you had last time.

3 Likes

Thanks @dalto
I understood it was because of snapshots of “/home” that gets reindexed.
This is why I am thinking of not installing anything to take sanpshots automatically but manually take snapshot of system only.
Is it possible? Would it work this way?

It isn’t clear to me from reading through the issue comments that snapshots are the cause of that problem.

I think a better solution for you would be to put your indexable documents on a non-btrfs filesystem and the rest of the system on btrfs.

Thanks a lot @dalto
I tried once before But had a problem mounting/reading the EXT4 partition.

I will appreciate any guidance how can I convert system to BTRFS and keep my files on EXT4.

Apologies if I am giving you hard time!
I just though I better be a good boy and

Hopefully in the near future this would be sorted out!
Thank you very much @dalto

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.