[LIVE] Automatic SSD TRIM on shutdown of XBMC Live?
#1
I have hdparm and wiper.sh that i can run manually, but im wondering how could i make it so that it will run automaticly on shutdown.
Already tried adding script to /etc/init.d and linking it to /etc/rc0.d with no luck.
I'm not very familiar with linux.
Reply
#2
Does your ssd have native trim support? what brand/model is it? most distros source /etc/rc.local.shutdown so you can put it there.
Need help programming a Streamzap remote?
Reply
#3
Model is OCZ Vertex Series SATA II 2.5" SSD 32Gb.
Specs says "TRIM Support" and atleast running wiper.sh manually seems to work.

I'll try adding rc.local.shutdown.
edit: no luck with that either.
Reply
#4
If the ssd has native trim support, and you're using ext4 filesystem on it, include the discard mount option and it's handled by the kernel.

Example /etc/fstab
Code:
/dev/sda1   /   ext4    defaults,noatime,discard    0    1

See this wiki page if you're running an SSD on Linux: https://wiki.archlinux.org/index.php/SSD
Need help programming a Streamzap remote?
Reply
#5
As i already told i'm not too familiar with linux...

/etc/fstab looks like this atm.
Code:
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid, 0       0
# / was on /dev/sda1 during installation
UUID=b4b784cf-95bb-4a24-a580-9a9ca8026094 /               ext4    errors=remount-ro 0       1
For some reason i have this feeling that it shouldnt look like that and i've prolly made something wrong when partitioning the drive(?)
Reply
#6
The UUID line replaces the /dev/sda1 line and is perfectly acceptable. I have no idea about that error=remount-ro option. Perhaps your distro needs it. If you're sure your ssd supports native TRIM, change the last line to look like this:

Code:
UUID=b4b784cf-95bb-4a24-a580-9a9ca8026094 /               ext4    errors=remount-ro,noatime,discard 0       1

Reboot the machine for those settings to take effect or type the following to remount /

Code:
# mount -o remount /
Need help programming a Streamzap remote?
Reply

Logout Mark Read Team Forum Stats Members Help
[LIVE] Automatic SSD TRIM on shutdown of XBMC Live?0