LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-08-2019, 02:05 PM   #1
Mr Marmmalade
Member
 
Registered: Oct 2002
Location: Scotland
Distribution: Debian
Posts: 214

Rep: Reputation: 26
Buster SSD Setup


Hi, I installed Debian 10 yesterday & most things are running well thus far! I have an SSD and normally set the following for Debian 9:

1. fstab - add noatime for SSD partitions.

2. Enable TRIM for it using the provided example systemd services:
cp /usr/share/doc/util-linux/examples/fstrim.service /etc/systemd/system/
cp /usr/share/doc/util-linux/examples/fstrim.timer /etc/systemd/system/
systemctl enable fstrim.timer

3. Set the following udev rule tells the system to use the deadline scheduler for any non-rotation drives present:
echo -e 'ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"' > /etc/udev/rules.d/60-schedulers.rules

I've done the first step as normal, but the fstrim.* files don't exist in Buster.

I've found a README.Debian (in /usr/share/doc/util-linux/) that says:

Quote:
Periodic fstrim for SSD disks
-----------------------------

fstrim(8) is used on a mounted filesystem to discard blocks which are not in
use by the filesystem. This is useful in particular for solid-state drives
(SSDs).

A systemd service and matching timer is available to periodically perform
fstrim on relevant filesystems, but is *not* enabled by default. To enable it
according to the default weekly cadence, just do the following as root:

systemctl enable fstrim.timer
But no mention of copying the example fstrim.* files first. I've checked all of the files in the destination directory (/etc/systemd/system/) and can't see any filename or contents that refer to fstrim.

My question about step 2 is; is it now really as simple as just running the final command without first copying-in the two fstrim.* files?

I guess step three will be same as before as there's currently nothing else in the target directory, presumably safe to run the same command again.


Last edited by Mr Marmmalade; 07-08-2019 at 02:19 PM.
 
Old 07-08-2019, 02:07 PM   #2
Mr Marmmalade
Member
 
Registered: Oct 2002
Location: Scotland
Distribution: Debian
Posts: 214

Original Poster
Rep: Reputation: 26
Does anyone still have Debian 9 installed that could see how the README.Debian file I quoted looks like on it please?

I've now spotted the word "just" towards the end of what I quoted above, implying the previous process was more involved (i.e. the two copy steps I had to do in Debian 9). Hence, it likely is really as simple as it seems. Maybe the fstrim no longer needs those two files any more & it is baked into systemd some where or other.

Last edited by Mr Marmmalade; 07-08-2019 at 02:09 PM.
 
Old 07-08-2019, 02:14 PM   #3
Mr Marmmalade
Member
 
Registered: Oct 2002
Location: Scotland
Distribution: Debian
Posts: 214

Original Poster
Rep: Reputation: 26
Ah, I've risked it for a biscuit & just run the command:

root@debian:~# systemctl enable fstrim.timer
Created symlink /etc/systemd/system/timers.target.wants/fstrim.timer → /lib/systemd/system/fstrim.timer.

So, that looks like it is doing the necessary itself. Happy days!
 
Old 07-08-2019, 02:16 PM   #4
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, KDE Neon, Arch, Void
Posts: 3,152

Rep: Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976Reputation: 976
Yeah, the proliferation of SSD's in consumer systems got the Debian team to already have the services part of the default install. You figured it out just before I was able to post that.
 
1 members found this post helpful.
Old 07-08-2019, 02:41 PM   #5
Mr Marmmalade
Member
 
Registered: Oct 2002
Location: Scotland
Distribution: Debian
Posts: 214

Original Poster
Rep: Reputation: 26
Thanks for confirming!

I've also run the third step & rebooted my PC & it hasn't gone up in flames yet, so I guess that's worked too. :P

Thanks.
 
Old 07-11-2019, 10:36 AM   #6
sudowtf
Member
 
Registered: Nov 2013
Posts: 199

Rep: Reputation: 45
thanks guys, i would not have thought to even look into it.
systemctl enable = success without prio cp's for me.

Last edited by sudowtf; 07-11-2019 at 10:37 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I have a SSD a 500GB drive and a 2TB drive and want to move Ubuntu from 500GB to SSD greatormesby Linux - Newbie 12 07-06-2015 09:58 AM
To SSD or not to SSD jlinkels Linux - Hardware 14 10-02-2012 07:36 AM
SSD raid1 vs SSD raid10 advice ? wonker Linux - Hardware 8 05-23-2012 01:46 AM
brain buster... sbs2003 setup with linux? samills70 Linux - General 0 06-25-2004 08:08 AM

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

All times are GMT -5. The time now is 09:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration