Move plex media


Download a SQlite editor
https://sqlitebrowser.org/dl/

Shutdown Plex

BACKUP first and then Open your Database:
"C:\Users\YOUR-USERNAME\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db"

Update everything the used to be in drive C to the same exact path but on drive S

UPDATE section_locations 
SET root_path = REPLACE(root_path, 'C:', 'S:') 
WHERE root_path LIKE 'C:%';

UPDATE media_parts 
SET file = REPLACE(file, 'C:', 'S:') 
WHERE file LIKE 'C:%';

Save the changes and exit your DB editor

Restart Plex

Thanks

Fast secure erase of /dev/nvme0n1 using Ubuntu 22.04 LTS live


Check your disk:
sudo -i
apt install nvme-cli
nvme list

Erase your disk:
nvme format -s1 /dev/nvme0n1

Verify it is really all zeros:
cmp /dev/nvme0n1 /dev/zero

Verify with a progress bar:
apt install pv
pv /dev/nvme0n1 | cmp /dev/zero

Really all zeros:
cmp: EOF on after byte 512110190592, in line 1

Not really all zeros:
/dev/zero differ: byte 449, line 1

Thanks