LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Bedrock Linux (https://www.linuxquestions.org/questions/bedrock-linux-118/)
-   -   bedrock, fstrim (https://www.linuxquestions.org/questions/bedrock-linux-118/bedrock-fstrim-4175705088/)

jr_bob_dobbs 12-17-2021 10:20 PM

bedrock, fstrim
 
At the moment all of my partitions except for /boot are on a thin provisioned LVM. Is it safe to run fstrim on bedrock?

Thank you.

ParadigmComplex 12-18-2021 08:05 AM

I don't see why Bedrock would be a factor in such a decision.

jr_bob_dobbs 12-21-2021 04:42 PM

So, fstrim has no problem interactions with etcfs, crossfs or any other bedrock bits?

A bit of caution for things seems appropriate, so hence my original question.

So far I've only been performing fstrim on the bedrock partition when booted off of one of the other OS's.

Thank you.

ParadigmComplex 12-21-2021 09:50 PM

Ah, I think I see: you're concerned about etcfs and crossfs and fstrim all share "fs" - filesystem - in their names, and thus may be related.

etcfs and crossfs work on the virtual filesystem layer, not the block layer. They operate the same as utilities like ls and cat, agnostic to the underlying hardware or filesystem. etcfs and crossfs are referred to as filesystems because of how the user interacts with them, and not because of how they interact with the hardware.

If you run `cat /home/dobbs/.config/vlc/vlcrc`, cat's request goes to the kernel, which does some work then returns the results to cat. The kernel is abstracting the underlying hardware and filesystem. cat doesn't know or care if it's reading from ext4 or btrfs, from a spinny harddrive or an SSD, with or without trim enabled.

If you `cat /bedrock/cross/applications/vlc.desktop`, the request goes to the kernel, which does some work and returns the result to cat. The difference is here, that work involves asking crossfs what to do. crossfs reads some files to figure it out. When it does so, the request goes to the kernel - same as with cat. The kernel abstracts the underlying hardware and filesystem from crossfs, too. crossfs doesn't know or care if it's reading from ext4 or btrfs, from a spinny harddrive or an SSD, with or without trim enabled.

Just like ls and cat, etcfs and crossfs do not care about trim or not trim. They operate at a different level of abstraction.

jr_bob_dobbs 12-30-2021 09:11 AM

Just now, I ran fstrim via the way I'd done it in previous distros:
Code:

# fstrim -v -a
/bedrock/strata/bedrock/hsc: 42.7 GiB (45830045696 bytes) trimmed on /dev/azura/sloppy
/bedrock/strata/bedrock/home: 28.9 GiB (31041122304 bytes) trimmed on /dev/azura/homie
#

It didn't do the / partition. Most unexpected. That's a new one on me. Also, after /hsc and before /home, there was a pause or hesitation of almost a minute. That was also unexpected.

Ran it a different way:
Code:

# fstrim -v -A
/hsc: 0 B (0 bytes) trimmed on /dev/azura/sloppy
/home: 81.2 MiB (85180416 bytes) trimmed on /dev/azura/homie
/: 5.9 GiB (6376587264 bytes) trimmed on /dev/azura/vindi
#

That time it did the slash partition and also it seemed to run much faster. The distinction between -a (currently mounted devices that can discard) and -A (devices in fstab that can discard) seems subtle to me but apparently isn't.


All times are GMT -5. The time now is 04:50 PM.