Deletion of old data

Stopping of services

systemctl list-units --type=service --state=running #to see all the running services
sudo systemctl stop docker.service
sudo systemctl stop docker.socket #Stopped docker services and socket, which also means immich is stopped
sudo systemctl stop smbd.service #stopped samba 
sudo systemctl stop syncthing@pubuntu.service #syncthing is stopped to not try sync empty folder to a backup location
sudo systemctl stop jellyfin.service #Stopped jellyfin server
sudo systemctl stop transmission-daemon.service #Stopped transmission-daemon

[//]: What is a [daemon]?

Destroying the RAID configuration

cat /proc/mdstat #To check the status of RAID made by mdadm, the device name was /dev/md0
lsblk #to find the mount point, mounted at /mnt/nas
sudo umount /mnt/mas #Unmount the device
sudo mdadm --stop /dev/md0 #Stop the RAID 5 configuration
cat /proc/mdstat # To check the status of RAID, it's gone - shows no activre raid
lsblk # To check if the drives are assembled individually
 
 sudo mdadm --zero-superblock /dev/sdb
  sudo mdadm --zero-superblock /dev/sdc
   sudo mdadm --zero-superblock /dev/sdd # To permanently wipe the RAID signature from the drives
   
   sudo mdadm --examine /dev/sdb
   sudo mdadm --examine /dev/sdc
   sudo mdadm --examine /dev/sdd # This examines the drive for any metadata, it returns, "No md superblock detedcted on <drive>"

Final cleaning of data and filesystem

lsblk -o NAME,SIZE,TYPE,MODEL # Provide info on the disks, helps to identify the os disk and other drives MUST NOT TOUCH OS DRIVE
 
sudo wipefs -a /dev/sdb
sudo wipefs -a /dev/sdc
sudo wipefs -a /dev/sdd #Wipe all the data
 
lsblk #check the status again, however it is clean

The drives are now clean

sudo shutdown -h now #Shutdown to replace the drives

Installation of new OS

Installed the OS in SSD, formatted the drive in ex4 filesytem and mounted them in three separate places.

  1. Data - For sensitive data such as immich, notes and others
  2. Media - For all the media server etc
  3. Backup - This will be a drive which will periodically mount it self and does back through rsync and then unmount. It will keep the drive physically inactive and hence safe
  4. Some Settings were changed