pantz.org banner
Keep drives unmounted with systemd
Posted on 12-01-2020 21:28:15 UTC | Updated on 12-01-2020 21:37:26 UTC
Section: /software/systemd/ | Permanent Link

When trying to add a new partition to a hard drive, you used to be able to just unmount the drive and perform your work. In SystemV init style systems, the drive would never just mount itself back up without any type of action being taken like the mount command being run. Contrast this to systemd, where if you just unmount a drive to perform a task like a fsck or a re-partition, when you try to access the device the drive is attached to for example, with a partitioning software like parted, systemd will mount the drive back up. This makes it very difficult to do something that used to be very simple. I seem to say that a lot with systemd.

What to do to keep the drive unmounted

To actually keep the drive unmounted the whole time you do your work, you have to perform the following steps.

  1. Edit the /etc/fstab file and comment out the drive you want to work on.
  2. Run a systemctl daemon-reload
  3. Unmount the drive and perform your work
  4. After finishing your work, uncomment the drive you commented out
  5. Run a systemctl daemon-reload
  6. Mount up your drive if systemd did not do it for you

What the hell is going on

During system boot systemd takes all of the fstab entries and generates native mount units for them. If you edit something in fstab you have to tell systemd so it can re-generage new updated units for the fstab entries. This is what the "systemctl daemon-reload" does. This will re-run all generators, and cause systemd to reload units from disk. Read more about it here.

Reddit!

Related stories

Spotify song dupe checking is awful
Posted on 11-22-2020 02:59:15 UTC | Updated on 11-22-2020 03:05:45 UTC
Section: /software/spotify/ | Permanent Link

Have you ever made a big playlist on Spotify, and then tried to add another song to the list that was already on it? Did Spotify tell you that song is already on the list? If your lucky it did. I've come to find out that the way Spotify checks playlists for dupes is so very basic it is only mildly helpful. I've got playlists with multiples of the same song

How does this happen?

It seems Spotify is checking on 3 things to see if a song is a dupe. The song title, the album title and the artist name. If all 3 match, then Spotify sees it as a dupe. The problem is, songs that show up as singles don't match the album name. The same goes for the same song on an compilation album. Since the album does not match it is not seen as a duplicate by Spotify. So they happily put it on your playlist.

Better Spotify dupe checking exists

This is the bare minimum to do dupe checking. There are so many better ways to check for duplicate songs, and I started looking at the Spotify API to pull my playlist info to start doing my own dupe checking. Then I thought, I can't be the only who has seen this problem. One Google search later, and I found that someone has written a much better dupe checker that will also remove the songs it finds as well.The website is called Spotify Dedup. It uses Spotify's API to allow it access to your account to read and modify your playlists. This sounds shady, but it does not have access to your personal info. Just your music. After your finished removing your duplicate songs, you can revoke its access to your account. I've used it with no issues, and it does a fantastic job. The developer has a way to buy them a coffee, and I gladly did that. They saved me hours of development time to fix this glaring issue with Spotify.

Spotify you can do better

Come on Spotify you can do better dupe checking. Heck, if you need the code because you just can't figure it out, Spotify Dedup shares it over on GitHub. Please fix this.

Reddit!

Related stories

Using a VPN could make you think websites are broken
Posted on 09-27-2020 03:34:12 UTC | Updated on 09-27-2020 03:41:32 UTC
Section: /software/vpn/ | Permanent Link

Have you ever visited or tried to log into a website, and been greeted by odd error messages like "Access Denied" or "Oops something went wrong". Your thinking "What the heck? I'm just trying to use your site as it was intended". Then you figure the site must be having some type of technical issue, and either move on, or try back later. Well, even if you try back later for days you still get the same errors. Then you turn off your VPN, magically the site works perfectly fine. This is your first introduction into the world of banned service providers AKA black/block lists

Preface

I will preface this by saying that the examples below were tested on one of the the largest VPN providers out there. You might or might not have issues using your VPN provider, but weird errors are something to keep in mind when sites just seem to break, and you can't figure out why. It might look to you like the site is broken, but this is just the site designers way of protecting themselves from abuse.

Website security

When you see all of these errors, odd messages, or connection issues, much of it is done on purpose. Websites will setup security services or appliances to block connections from networks that give them issues or cause trouble. VPN providers or large hosting services like Amazon usually end up on these lists. VPN's and hosting providers are services people can hide behind to abuse websites. This abusive behaivor is something the websites don't want to deal with. They will throw up a message or error to let you know that there was an issue. They will never tell you what that issue was, nor will they likely ever tell you that you have been blocked. If they did this then an attacker might change tactics or providers to see if they can get through another way. That is the worst part of this process. The site won't tell you it's messing with you, it will just make it look like it has broken itself in a gentle and annoying way. From the websites point of view, it's just protecting itself.

Examples of how sites protect themselves

Sites perform all kinds of antics when encountering IP's they don't trust. For example ...

Examples of protection from real websites

Note: All sites below work perfectly fine with VPN off. These errors only happen with VPN on.

Conclusion

Hopefully you don't encounter these issues with your VPN provider. But if one day you start seeing odd problems with a website, and you just can't figure out what's going on, always try to turn your VPN off if you have one. If your seeing one of the type of issues above, and you are not using a VPN, then you might just be on a block of IP address's from a provider that is causing grief for certain websites. If that happens, this is where a VPN might be able to help you. If you can find a VPN that has not been marked as troublesome by the same website your having issue with, then you can use it to access the site. Go figure.

Reddit!

Related stories


RSS Feed RSS feed logo

About


3com

3ware

alsa

alsactl

alsamixer

amd

android

apache

areca

arm

ati

auditd

awk

badblocks

bash

bind

bios

bonnie

cable

carp

cat5

cdrom

cellphone

centos

chart

chrome

chromebook

cifs

cisco

cloudera

comcast

commands

comodo

compiz-fusion

corsair

cpufreq

cpufrequtils

cpuspeed

cron

crontab

crossover

cu

cups

cvs

database

dbus

dd

dd_rescue

ddclient

debian

decimal

dhclient

dhcp

diagnostic

diskexplorer

disks

dkim

dns

dos

dovecot

drac

dsniff

dvdauthor

e-mail

echo

editor

emerald

ethernet

expect

ext3

ext4

fat32

fedora

fetchmail

fiber

filesystems

firefox

firewall

flac

flexlm

floppy

flowtools

fonts

format

freebsd

ftp

gdm

gmail

gnome

google

greasemonkey

greylisting

growisofs

grub

hacking

hadoop

harddrive

hba

hex

hfsc

html

html5

http

https

hulu

idl

ie

ilo

intel

ios

iperf

ipmi

iptables

ipv6

irix

javascript

kde

kernel

kickstart

kmail

kprinter

krecord

kubuntu

kvm

lame

ldap

linux

logfile

lp

lpq

lpr

maradns

matlab

memory

mencoder

mhdd

mkinitrd

mkisofs

moinmoin

motherboard

mouse

movemail

mplayer

multitail

mutt

myodbc

mysql

mythtv

nagios

nameserver

netflix

netflow

nginx

nic

ntfs

ntp

nvidia

odbc

openbsd

openntpd

openoffice

openssh

openssl

openvpn

opteron

parted

partimage

patch

perl

pf

pfflowd

pfsync

photorec

php

pop3

pop3s

ports

postfix

power

procmail

proftpd

proxy

pulseaudio

putty

pxe

python

qemu

r-studio

raid

recovery

redhat

router

rpc

rsync

ruby

saltstack

samba

schedule

screen

scsi

seagate

seatools

sed

sendmail

sgi

shell

siw

smtp

snort

solaris

soundcard

sox

spam

spamd

spf

spotify

sql

sqlite

squid

srs

ssh

ssh.com

ssl

su

subnet

subversion

sudo

sun

supermicro

switches

symbols

syslinux

syslog

systemd

systemrescuecd

t1

tcpip

tcpwrappers

telnet

terminal

testdisk

tftp

thttpd

thunderbird

timezone

ting

tls

tools

tr

trac

tuning

tunnel

ubuntu

unbound

vi

vpn

wget

wiki

windows

windowsxp

wireless

wpa_supplicant

x

xauth

xfree86

xfs

xinearama

xmms

youtube

zdump

zeromq

zic

zlib