Raspberry Pi and related Stuff

So I finally finished putting my Backups on the 3 Drives that I have, and managing all the corresponding Backup Locations with an rsync script. Decided against ZFS due to not using more than one drive each and its really only useful for RAID.

here is what I did on my Pi 4B:

  • Set up the 1TB QLC SSD with ext4 using mkfs.
  • Add a Directory to that Drive with sudo mkdir and sudo chown, and then just opening the properties of that directory to set Permissions, since I am the owner now and I didnt memorize the Bitmask for rwx yet properly. Why did I add that directory and dont just dump into the root Filesystem? Because ext4 does not like normal non-root Users doing that, and that is the proper way to handle Drives as a normal User.
  • Then I have set up Samba for better Drive access on the Pi. Took a while to get it to work and especially to not let it leak the fucking Home Directory with its default Settings.
  • Ofcourse I had to setup the other Client Side of the Samba Share too, otherwise I couldn’t access it. Luckily thanks to using VNC to get into the Pi, I already have a static local IP address set up for it, making it way easier.
  • But I noticed that I cant access it with Scripts, so I had to find a way to actually mount the thing with cifs, and that went all nice and well, but I did notice that now my network monitor was “freaking out”, while the drive was idle, and I do not like useless Network activity so ofcourse I had to set it up so that my backup script does sudo mount, rsync, sudo umount and I had to make it so it actually prompts me for said required Passwords, replacing sudo with kdesudo or lxqt-sudo does help for that case.
  • So I finally got the backup script working, but I seriously needed to reorganize the Stuff on my 1TB HDD, so I moved a shitload of Files from that HDD to the SSD overnight (yeah it took even longer than that btw)
  • Once everything on the HDD was moved, backed up or discarded, I reformatted that one from NTFS to ext4, and made a Folder identical to the one on the SSD. As you can guess that Drive is gonna be used to backup the contents of the SSD, since both have pretty much the same Size. And with rsync I very much noticed that Write Cache is definitely a thing on that HDD.
  • This was another 20 hour run of a Script to back shit up, but luckily everything was done by the Pi itself, so I wasn’t distracted by that one. And maybe also because I already did the reorganizing the first time and didn’t have to do that again.
  • But I was glad I could reboot my actual Computer, because I had to change the /etc/fstab File to fix a big giant mistake I made when I installed Kubuntu last year, aka removing the two external Drives I entered into it (and I even mounted them directly in my root Directory, which caused a lot of lag sometimes). I dont know if there is a refresh fstab command or something that @OvermindDL1 would be suggesting instead of a reboot, but rebooting is fucking easier.
  • Now to the 250MB SSD (which is that other drive from the fstab) was next. Made sure I knew what Data I backed up on it, so I could replicate a proper Backup Script, and then I formatted it with ext4 aswell, along with LUKS Encryption to make it an actually safe Backup for more important Data (unlike the Music and Videos stored on the 1TB Drives).
  • That 250MB Drive was unrelated to the Pi though, but I did test it on my GPD-WIN-2 just to make sure the whole password protection of the encrypted Drive actually works, which it “does”. Even though whoever made the Error Messages fucked up a lot. Inserting a wrong Password leads to “failed to mount”, while Inserting the right Password leads to “you are not authorized to mount this” followed by definitely having already mounted the Drive just fine and me being able to access it.

Lots of Stuff I got done, and I might even would have been more (such as GT6), if the regulars didn’t want to talk to me on IRC all the time recently.

3 Likes