Linux Lite Forums
Trim support - Printable Version

+- Linux Lite Forums (https://www.linuxliteos.com/forums)
+-- Forum: Hardware - Support (https://www.linuxliteos.com/forums/forumdisplay.php?fid=6)
+--- Forum: Hard Drives and SSDs (https://www.linuxliteos.com/forums/forumdisplay.php?fid=26)
+--- Thread: Trim support (/showthread.php?tid=3532)



Trim support - carchaser - 12-05-2016

Can some please fur ther explain this yellow box to me.  I'm fairly new to this and don't understand what I'm looking at since there is no direct command and example.  I don't understand the copy area in the yellow box and how I'm supposed to modify it.  I coped this from the help manual:

Terminal Command:
                 
sudo leafpad /etc/rc.local

Above the line exit 0 in that file, add the TRIM command fstrim -v for every EXT4 partition from your fstab file.
Copy the text below and edit it to match your set up. We include the creation of a log for you so you can check if trim is performed during boot up. The log is in /var/log/trim.log
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

LOG=/var/log/trim.log
echo “*** $(date -R) ***” >> $LOG
fstrim -v /boot >> $LOG
fstrim -v / >> $LOG
fstrim -v /home >> $LOG
echo " " >> $LOG

exit 0


Re: Trim support - Valtam - 12-05-2016

Before we start, can you please open a terminal and type in the following commands:

Code:
lsblk -d -o name,rota

Code:
df -h

and report back here with the results.


Re: Trim support - carchaser - 12-25-2016


carchaser@LinuxBox:~$ lsblk -d -o name,rota
NAME ROTA
sda    0
sr0    1
carchaser@LinuxBox:~$
carchaser@LinuxBox:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G    0  1.9G  0% /dev
tmpfs          389M  6.5M  383M  2% /run
/dev/sda5        71G  4.7G  63G  7% /
tmpfs          1.9G  364K  1.9G  1% /dev/shm
tmpfs          5.0M  4.0K  5.0M  1% /run/lock
tmpfs          1.9G    0  1.9G  0% /sys/fs/cgroup
cgmfs          100K    0  100K  0% /run/cgmanager/fs
tmpfs          389M  44K  389M  1% /run/user/1000
carchaser@LinuxBox:~$




(12-05-2016, 03:16 AM)Jerry link Wrote: Before we start, can you please open a terminal and type in the following commands:

Code:
lsblk -d -o name,rota

Code:
df -h

and report back here with the results.



Re: Trim support - Valtam - 12-26-2016

Assuming you have got up to this point in the Help Manual, continue with the following.

Open a terminal and do:

Code:
sudo leafpad /etc/rc.local

copy the below into it overwriting the existing contents:

Code:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

LOG=/var/log/trim.log
echo “*** $(date -R) ***” >> $LOG
fstrim -v / >> $LOG
echo " " >> $LOG

exit 0

then carry on with the rest of the Trim tutorial in the Help Manual.


Re: Trim support - carchaser - 12-27-2016

This did it!  Thank you so much for the help Jerry!  I'm loving Linux Lite 3.2!





(12-26-2016, 03:54 AM)Jerry link Wrote: Assuming you have got up to this point in the Help Manual, continue with the following.

Open a terminal and do:

Code:
sudo leafpad /etc/rc.local

copy the below into it overwriting the existing contents:

Code:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

LOG=/var/log/trim.log
echo “*** $(date -R) ***” >> $LOG
fstrim -v / >> $LOG
echo " " >> $LOG

exit 0

then carry on with the rest of the Trim tutorial in the Help Manual.



Re: Trim support - Valtam - 12-27-2016

Cool Smile