Jellyfin Forum
System.IO.IOException: No space left on device - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: System.IO.IOException: No space left on device (/t-system-io-ioexception-no-space-left-on-device)

Pages: 1 2


System.IO.IOException: No space left on device - OreoCollas - 2024-09-17

Hello. I spun up a virtual Jellyfin server. It seemed to be working but was being a bit sluggish. When I did a reboot Jellyfin did not start so after Googling it I ran sudo -u jellyfin /usr/bin/jellyfin start and I got the following error:

Error whilst attempting to create folder
System.IO.IOException: No space left on device : '/home/jellyfin/.local/share/jellyfin'
  at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
  at System.IO.Directory.CreateDirectory(String path)
  at Jellyfin.Server.Helpers.StartupHelpers.CreateApplicationPaths(StartupOptions options)

It seems like Jellyfin filled my drive which isn't entirely surprising cause I only gave it a 10GB drive. I upped it to 20GB and followed a guide online to expand the partition but I am still getting the same error. Can someone help me out. I'm not sure if I didn't expand it correctly or if I need to configure Jellyfin to be able to use the new space? This is what my partitions currently look like.

jellyfin@jellyfin:~$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
[sudo] password for jellyfin:
NAME                      FSTYPE      SIZE MOUNTPOINT            LABEL
loop0                    squashfs      55M /snap/core18/1880
loop1                    squashfs    55.7M /snap/core18/2829
loop2                    squashfs    38.8M /snap/snapd/21759
loop3                    squashfs      64M /snap/core20/2318
loop4                    squashfs    71.3M /snap/lxd/16099
loop5                    squashfs    91.9M /snap/lxd/29619
sr0                                  1024M
xvda                                    20G #This used to be 10G
├─xvda1                                  1M
├─xvda2                  ext4          1G /boot
└─xvda3                  LVM2_member 17.6G  #This used to be 9.something G
  └─ubuntu--vg-ubuntu--lv ext4        17.6G /  #This used to be 9.something G
xvdb                                  12.8T
└─xvdb1                  ntfs        12.8T /media/ExternalDrive1 Elements

Please let me know if you need further information.


RE: System.IO.IOException: No space left on device - TheDreadPirate - 2024-09-17

The correct way to interact with Jellyfin when installed via apt is with systemctl.

Code:
sudo systemctl <start/stop/restart/status> jellyfin

If Jellyfin filled the drive, it is very likely the database is corrupted.

Share the out of this command via pastebin.

Code:
sudo journalctl -u jellyfin -n 200 --no-pager

If the database is corrupt I can walk you through purging your data and starting over. Keep in mind that, depending on the size of your library, Jellyfin can pull down multiple GB of metadata, generate multiple GB of trickplay images, etc.

Additionally, transcodes are written to disk.


RE: System.IO.IOException: No space left on device - OreoCollas - 2024-09-17

Thankyou for your reply.

When I do sudo systemctl status jellyfin I get
● jellyfin.service - Jellyfin Media Server
Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/jellyfin.service.d
└─jellyfin.service.conf
Active: failed (Result: core-dump) since Tue 2024-09-17 08:39:43 UTC; 7h ago
Process: 979 ExecStart=/usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS (code=dumped, signal=ABRT)
Main PID: 979 (code=dumped, signal=ABRT)

Sep 17 08:39:43 jellyfin systemd[1]: jellyfin.service: Main process exited, code=dumped, status=6/ABRT
Sep 17 08:39:43 jellyfin systemd[1]: jellyfin.service: Failed with result 'core-dump'.
Sep 17 08:39:43 jellyfin systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 9.
Sep 17 08:39:43 jellyfin systemd[1]: Stopped Jellyfin Media Server.
Sep 17 08:39:43 jellyfin systemd[1]: jellyfin.service: Start request repeated too quickly.
Sep 17 08:39:43 jellyfin systemd[1]: jellyfin.service: Failed with result 'core-dump'.
Sep 17 08:39:43 jellyfin systemd[1]: Failed to start Jellyfin Media Server.

When I do sudo journalctl -u jellyfin -n 200 --no-pager I get https://pastebin.com/KGPiQh9p


RE: System.IO.IOException: No space left on device - TheDreadPirate - 2024-09-17

Go to /etc/jellyfin and delete migrations.xml then "sudo systemctl restart jellyfin". Let me know if it still doesn't start and I will walk you through starting from a clean slate.


RE: System.IO.IOException: No space left on device - OreoCollas - 2024-09-17

did this and checked status and this was the response

jellyfin.service - Jellyfin Media Server
Loaded: loaded (/lib/systemd/system/jellyfin.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/jellyfin.service.d
└─jellyfin.service.conf
Active: failed (Result: core-dump) since Tue 2024-09-17 20:34:06 UTC; 31s ago
Process: 7610 ExecStart=/usr/bin/jellyfin $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLYFIN_ADDITIONAL_OPTS (code=dumped, signal=ABRT)
Main PID: 7610 (code=dumped, signal=ABRT)

Sep 17 20:34:05 jellyfin systemd[1]: jellyfin.service: Main process exited, code=dumped, status=6/ABRT
Sep 17 20:34:05 jellyfin systemd[1]: jellyfin.service: Failed with result 'core-dump'.
Sep 17 20:34:06 jellyfin systemd[1]: jellyfin.service: Scheduled restart job, restart counter is at 5.
Sep 17 20:34:06 jellyfin systemd[1]: Stopped Jellyfin Media Server.
Sep 17 20:34:06 jellyfin systemd[1]: jellyfin.service: Start request repeated too quickly.
Sep 17 20:34:06 jellyfin systemd[1]: jellyfin.service: Failed with result 'core-dump'.
Sep 17 20:34:06 jellyfin systemd[1]: Failed to start Jellyfin Media Server.


RE: System.IO.IOException: No space left on device - TheDreadPirate - 2024-09-17

If you're ok with starting over, follow these steps.

Code:
sudo apt purge jellyfin*
sudo rm -rf /etc/jellyfin /var/lib/jellyfin /var/cache/jellyfin
curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash

Copy and paste those commands and jellyfin should be purged and running a clean slate setup. Make sure to clear your browser cache as well.


RE: System.IO.IOException: No space left on device - OreoCollas - 2024-09-18

I have done that. It seems like Jellyfin is running but I am unable to log into the web interface. I'm assuming I need to create a user? How would I do this from the CLI?


RE: System.IO.IOException: No space left on device - TheDreadPirate - 2024-09-18

You don't need to create a user via command line. Clear your browser cache or Ctrl+f5.


RE: System.IO.IOException: No space left on device - OreoCollas - 2024-09-18

So I purged Jellyfin and reset it up but it seems like it still does not have full access to the drive as when I added my movies to Jellyfin the drive filled up again. Is there something else I can try or should I just nuke the server and set it all up using a larger drive from the start? Is there a recommended drive size for Jellyfin? The movies are being stored on a different drive so this drive is just being used for the Jellyfin files.


RE: System.IO.IOException: No space left on device - TheDreadPirate - 2024-09-18

Keep in mind that metadata and trickplays take up a lot of space, depending on the size of your library.

Posters, banners, actor images, chapter images, keyframes, extracted subtitles, trickplay images, etc., are all written to disk.

I have 270 movies, 4700 TV show episodes, 500 music videos, and 4100 songs. My jellyfin data directory and cache directory, combined, are just shy of 20GB.

Code:
chris@rat-trap:~$ du -sh /var/lib/jellyfin /var/cache/jellyfin
18G     /var/lib/jellyfin
1.9G    /var/cache/jellyfin

Depending on the size of your library and the options you enabled your jellyfin data directory could be larger. Than you have to take into consideration that your OS and all the installed applications take up space as well.

That doesn't take into consideration that, by default, jellyfin writes transcode files to /var. But this is configurable and can be on a separate disk.

100GB is probably a "safe" size for your root partition. 20GB is much too small.