Yesterday, 05:32 AM
This thread is a year old, but I found a very easy way to do this for users that run a Linux distro that worked on my first attempt.
1) Make sure that you shutdown your Jellyfin server. Easiest way is to use the command
killall jellyfin
2) Create a copy of your current (old) HDD to the new HDD that you want to use. Make sure you preserve: Time, Permissions, Owner and Group.
I use Grsync, which is a very simple rsync GUI, where you can use these rsync options very easily.
I also just check in Verbose and Show transfer progress, but it's not necessary for the files in anyway.
3) After it is done, unmount and switch the drives.
4) Then you can create a Symlink (Symbolic Link) with the following command:
sudo ln -s "/media/{username}/{name of new drive}" "/media/{username}/{name of old drive}"
This will make it so that everything that tries to access your old drive will instead be redirected by your operating system to fetch the same files from the new drive (assuming of course that the directories and files inside are identical).
An example:
sudo ln -s "/media/user/Ironwolf Pro 8TB" "/media/user/HGST 1TB"
In this example, Ironwolf Pro 8TB is my new drive that I am going to use and the HGST 1TB is the old drive that I want to replace.
5) You can test it out that it works by simply using an ls command for the old drive that is no longer mounted on your system. But it should still list the directories as in this example below because of the Symlink.
ls "/media/user/HGST 1TB"
lost+found Movies Music 'Music Videos' TV
6) If it shows the directories that are now actually on the Ironwolf Pro 8TB drive, then the Symlink has been set up successfully and you can restart the Jellyfin server. I have it installed as a Flatpak.
flatpak run org.jellyfin.JellyfinServer
You should then see in the terminal that the server successfully finds your old drive, despite not being mounted anymore. It's a very easy workaround.
1) Make sure that you shutdown your Jellyfin server. Easiest way is to use the command
killall jellyfin
2) Create a copy of your current (old) HDD to the new HDD that you want to use. Make sure you preserve: Time, Permissions, Owner and Group.
I use Grsync, which is a very simple rsync GUI, where you can use these rsync options very easily.
I also just check in Verbose and Show transfer progress, but it's not necessary for the files in anyway.
3) After it is done, unmount and switch the drives.
4) Then you can create a Symlink (Symbolic Link) with the following command:
sudo ln -s "/media/{username}/{name of new drive}" "/media/{username}/{name of old drive}"
This will make it so that everything that tries to access your old drive will instead be redirected by your operating system to fetch the same files from the new drive (assuming of course that the directories and files inside are identical).
An example:
sudo ln -s "/media/user/Ironwolf Pro 8TB" "/media/user/HGST 1TB"
In this example, Ironwolf Pro 8TB is my new drive that I am going to use and the HGST 1TB is the old drive that I want to replace.
5) You can test it out that it works by simply using an ls command for the old drive that is no longer mounted on your system. But it should still list the directories as in this example below because of the Symlink.
ls "/media/user/HGST 1TB"
lost+found Movies Music 'Music Videos' TV
6) If it shows the directories that are now actually on the Ironwolf Pro 8TB drive, then the Symlink has been set up successfully and you can restart the Jellyfin server. I have it installed as a Flatpak.
flatpak run org.jellyfin.JellyfinServer
You should then see in the terminal that the server successfully finds your old drive, despite not being mounted anymore. It's a very easy workaround.