LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bedrock Linux
User Name
Password
Bedrock Linux This forum is for the discussion of Bedrock Linux.

Notices


Reply
  Search this Thread
Old 12-17-2021, 10:20 PM   #1
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
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.
 
Old 12-18-2021, 08:05 AM   #2
ParadigmComplex
Bedrock Linux Founder
 
Registered: Feb 2016
Distribution: Bedrock Linux
Posts: 179

Rep: Reputation: Disabled
I don't see why Bedrock would be a factor in such a decision.
 
Old 12-21-2021, 04:42 PM   #3
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651

Original Poster
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
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.
 
Old 12-21-2021, 09:50 PM   #4
ParadigmComplex
Bedrock Linux Founder
 
Registered: Feb 2016
Distribution: Bedrock Linux
Posts: 179

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 12-30-2021, 09:11 AM   #5
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 651

Original Poster
Blog Entries: 135

Rep: Reputation: 188Reputation: 188
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bedrock: bedrock poki remains on UTC no matter what jr_bob_dobbs Bedrock Linux 5 09-03-2019 05:10 AM
Would this be a valid script for fstrim in rc.6? tobyl Slackware 2 04-07-2015 11:58 AM
[SOLVED] bedrock not using brsh.conf, dropped to bedrock's /bin/sh Siljrath Linux - Distributions 2 08-25-2014 05:47 AM
[SOLVED] Running fstrim manually on a swap partition - can it be done? flokofcgulls Slackware 3 05-31-2013 11:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Bedrock Linux

All times are GMT -5. The time now is 12:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration