Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

set up TRIM

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
TomXtal
Posts: 5
Joined: 2023-09-04 20:11
Been thanked: 1 time

set up TRIM

#1 Post by TomXtal »

I’m setting up a new install of Debian 12.5 btrfs on a new SSD, question do I need to set up TRIM on my newly installed SDD I will also be setting it up with snapper.

In the fstab should I use the line below.

Code: Select all

btrfs   rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@ 0       0
btrfs   rw,noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@home	0       0
I see on some forums the info below.

Code: Select all

UUID=??????  /              btrfs   defaults        0 0
UUID=??????  /home     btrfs   subvol=home,compress=zstd:1 0 0
UUID=?????? /.snapshots            btrfs subvol=.snapshots,compress=zstd:1 0 0 
UUID=?????? /home/.snapshots  btrfs subvol=home/.snapshots,compress=zstd:1 0 0
Which method is the best one to use.

TomX

User avatar
kc1di
Posts: 282
Joined: 2007-03-12 12:52
Location: Somewhere In Maine
Has thanked: 5 times
Been thanked: 11 times

Re: set up TRIM

#2 Post by kc1di »

Trim on most machines is setup automatically to run weekly. You can check with this command in a terminal.
systemctl cat fstrim.timer
You should see an output similar to this.

Code: Select all

[Unit]
Description=Discard unused blocks once a week
Documentation=man:fstrim
ConditionVirtualization=!container
ConditionPathExists=!/etc/initrd-release

[Timer]
OnCalendar=weekly
AccuracySec=1h
Persistent=true
RandomizedDelaySec=6000

[Install]
WantedBy=timers.target
It can be changed to run daily if you choose.
Dave
Morse Code -An Early digital mode !
Bookworm
John 3:16
Registered Linux User # 462608

TomXtal
Posts: 5
Joined: 2023-09-04 20:11
Been thanked: 1 time

Re: set up TRIM

#3 Post by TomXtal »

Hi kc1di
Thanks for the help.

TomX

User avatar
kc1di
Posts: 282
Joined: 2007-03-12 12:52
Location: Somewhere In Maine
Has thanked: 5 times
Been thanked: 11 times

Re: set up TRIM

#4 Post by kc1di »

Your welcome, enjoy!
Dave
Morse Code -An Early digital mode !
Bookworm
John 3:16
Registered Linux User # 462608

Aki
Global Moderator
Global Moderator
Posts: 2979
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 75 times
Been thanked: 407 times

Re: set up TRIM

#5 Post by Aki »

Hello,

I hope you sorted it out. :)

If yes, please, mark the discussion as "solved" manually adding the text tag "[Solved]" at the beginning of the subject of the first message (after other tags, if any). It is also an opportunity to the make the subject more understandable to other forum users and readers, if necessary; i.e. :
[Solved] How to set up the SSD disk TRIM
Please, use code tags to include commands, their logs and configuration files in the body of a message. I made it for you in previous posts.

Thanks.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply