Blocklist-Update.sh is a script that I wrote to manage blocklists from bluetack etc to be used in conjunction with Transmission torrent downloader in Linux/MacOS. The script can be taylored to work with Qbittorrent as well, but the placement of the blocklists means you'd have to redirect the blocklist to go somewhere locally manageable as Transmission uses its own blocklist directory in .config. I believe there are about 10 lists there now. It works well for my needs. It can be ran weekly using crontab in standard user profile. To download: blocklist-update.sh To download the others: Github
I was searching for more information regarding SSDs last night as
that is what I now use, I found an interesting little tip that most
users will never have to worry about, but people using Arch Linux,
Manjaro or Windows that was cloned from another drive may want to
consider checking this. The Partition manager within Linux normally
takes good care to ensure that you have some free space to be used
by the SSD in the event that a cell becomes worn out or corrupted.
Also, Linux generally ensures that a proper amount of unallocated
drive space is set aside preceeding the partition. However, on my own
image of Manjaro, I discovered that this was not the case. The
partition was “out of alignment”. To fix this situation, I found
an article on Lifehacker that went into instructional detail about
how to solve this from a live environment or an image of Gparted.
Gparted is a separate live environment of Linux that is based on
Debian and uses Gparted as the main tool to manage partitions and
help fix boot drives.
To check the drive’s partition alignment, you simply have to type a
couple of commands. The first command puts you in Parted or
Gparted’s Command Line Interface. The command is this, sudo
parted /dev /sd(x) . The x is
the drive letter, ie sda. The
command opens Parted in the terminal, the next command, align-check
opt (n), is the second command
which shows you either a 1 or a 0 to let you know if you are aligned
or not. 0 equals misaligned and 1 equals aligned. The n in
parenthesis is a variable to stand for whatever the drive partition
number is, ie sda1 or sda2. If you let Manjaro or Ubuntu set up the
partitions for you, your default partition might /dev
/sda1. If your partitions are
out of alignment, you might want to refer to the article to fix
that, but this will cause two writes instead of one when modifying
data on the drive and this is bad for performance and lifespan.
Another issue, Manjaro also sets
discard as an option in fstab by default. While we want our drives to
trim once a week, it’s not recommended to leave the option enabled
all the time, this degrades drive performance over time and can cause
RAM and CPU usage to spike needlessly. To stop this from happening,
type in a terminal: sudo cp /etc /fstab /etc /fstab.old &&
sudo nano /etc /fstab. This
will make a backup of your fstab file, this is important as fstab is
the file that Linux looks at before mounting your drives at bootup.
This will then proceed to open the file in the nano text editor. To
get rid of discard, simply remove the word discard and the comma
before it from the file on all drives and then press CTRL + O and
CTRL + X to save and exit. After you are satisfied, if you need trim
you can run it as follows; sudo fstrim -v –all then
reboot. To set up fstrim on a weekly basis, run sudo
systemctl enable fstrim.timer && sudo systemctl enable
fstrim.service && sudo systemctl start fstrim.timer &&
sudo systemctl start fstrim.service. These
commands will ensure that fstrim service runs once a week in Manjaro.
Ubuntu does this by default so you won’t even have to worry. My
scripts do this per user requests already.
Link to the guy who got me working on this: https://www.youtube.com/watch?v=XcLnk-o7JIo
Link to my scripts: https://github.com/jackrabbit335/UsefulLinuxShellScripts
Comments
Post a Comment