# Plexmediaserver corrupted database

**URL:** <https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943>\
**Category:** General Discussion\
**Created:** [6 February 2026 14:19 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943 "2026-02-06T14:19:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![sroland81](https://dietpi.com/forum/user_avatar/dietpi.com/sroland81/32/8700_2.png) [@sroland81](https://dietpi.com/forum/u/sroland81)\
**Post date:** [6 February 2026 14:19 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/1 "2026-02-06T14:19:24Z")

</div>

Hi, i think i had an issue with a disk power cable that i now fixed, but no service is starting.

```sh
root@DietPi:\~# journalctl -fu plexmediaserver.service
Feb 06 14:07:45 DietPi systemd\[1\]: plexmediaserver.service: Scheduled restart job, restart counter is at 2.
Feb 06 14:07:45 DietPi systemd\[1\]: Starting plexmediaserver.service - Plex Media Server…
Feb 06 14:07:45 DietPi systemd\[1\]: Started plexmediaserver.service - Plex Media Server.
Feb 06 14:07:45 DietPi Plex Media Server\[2720\]: Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=1 (N4soci10soci_errorE)
Feb 06 14:07:45 DietPi systemd\[1\]: plexmediaserver.service: Main process exited, code=exited, status=255/EXCEPTION
Feb 06 14:07:46 DietPi systemd\[1\]: plexmediaserver.service: Failed with result ‘exit-code’.
Feb 06 14:07:51 DietPi systemd\[1\]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.
Feb 06 14:07:51 DietPi systemd\[1\]: plexmediaserver.service: Start request repeated too quickly.
Feb 06 14:07:51 DietPi systemd\[1\]: plexmediaserver.service: Failed with result ‘exit-code’.
Feb 06 14:07:51 DietPi systemd\[1\]: Failed to start plexmediaserver.service - Plex Media Server.

```

Sonarr, bazarr and radarr are starting fine. I have the plexmediaserver mounted in a raid5 arrayt via bind, but i think this folder was not available during the hard drive issue. The issue probably was that when upgrading the server’s CPU i must have left a loosen sata power cable and a disk was resetting the link all the time. Now i have tighten all cables and the thing got fixed but plexmediaserver is screwed. How can i regenerate the corrupted data or DB without reinstalling?

Best regards.

---

<div class="post-metadata">

**Author:** ![sroland81](https://dietpi.com/forum/user_avatar/dietpi.com/sroland81/32/8700_2.png) [@sroland81](https://dietpi.com/forum/u/sroland81)\
**Post date:** [6 February 2026 15:25 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/2 "2026-02-06T15:25:12Z")

</div>

> [@sroland81](#):
>
> ```auto
> root@DietPi:\~# journalctl -fu plexmediaserver.service
> Feb 06 14:07:45 DietPi systemd\[1\]: plexmediaserver.service: Scheduled restart job, restart counter is at 2.
> Feb 06 14:07:45 DietPi systemd\[1\]: Starting plexmediaserver.service - Plex Media Server…
> Feb 06 14:07:45 DietPi systemd\[1\]: Started plexmediaserver.service - Plex Media Server.
> Feb 06 14:07:45 DietPi Plex Media Server\[2720\]: Error: Unable to set up server: sqlite3_statement_backend::prepare: database disk image is malformed for SQL: PRAGMA cache_size=1 (N4soci10soci_errorE)
> Feb 06 14:07:45 DietPi systemd\[1\]: plexmediaserver.service: Main process exited, code=exited, status=255/EXCEPTION
> Feb 06 14:07:46 DietPi systemd\[1\]: plexmediaserver.service: Failed with result ‘exit-code’.
> Feb 06 14:07:51 DietPi systemd\[1\]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.
> Feb 06 14:07:51 DietPi systemd\[1\]: plexmediaserver.service: Start request repeated too quickly.
> Feb 06 14:07:51 DietPi systemd\[1\]: plexmediaserver.service: Failed with result ‘exit-code’.
> Feb 06 14:07:51 DietPi systemd\[1\]: Failed to start plexmediaserver.service - Plex Media Server.
> 
> ```
> 
> Sonarr, bazarr and radarr are starting fine. I have the plexmediaserver mounted in a raid5 arrayt via bind, but i think this folder was not available during the hard drive issue. The issue probably was that when upgrading the server’s CPU i must have left a loosen sata power cable and a disk was resetting the link all the time. Now i have tighten all cables and the thing got fixed but plexmediaserver is screwed. How can i regenerate the corrupted data or DB without reinstalling?

I think i fixed, i realized that plexmediaserver keeps backups and restored one of those.

---

<div class="post-metadata">

**Author:** ![sroland81](https://dietpi.com/forum/user_avatar/dietpi.com/sroland81/32/8700_2.png) [@sroland81](https://dietpi.com/forum/u/sroland81)\
**Post date:** [6 February 2026 17:00 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/3 "2026-02-06T17:00:21Z")

</div>

Now i’m dealing with some strange behavior of dietpi-drive\_manager

It seems that drive\_manager freezes because there is a mounted folder from an external hard drive i used to copy some media (USB hard drive) that it is not connected right now and is still shows in mount

```auto
root@DietPi:\~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1958964k,nr_inodes=489741,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=600,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=396060k,mode=755,inode64)
/dev/sdc1 on / type ext4 (rw,noatime,lazytime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=41,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=1535)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/credentials/systemd-journald.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
systemd-1 on /mnt/backup type autofs (rw,relatime,fd=57,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=3731)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime,lazytime,size=3145728k,inode64)
tmpfs on /var/log type tmpfs (rw,nosuid,nodev,noatime,lazytime,size=1048576k,inode64)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/dev/md3 on /mnt/raid5 type ext4 (rw,noatime,stripe=512)
/dev/md3 on /mnt/dietpi_userdata type ext4 (rw,noatime,stripe=512,x-systemd.after=local-fs.target)
/dev/md3 on /opt type ext4 (rw,noatime,stripe=512,x-systemd.after=local-fs.target)
/dev/md3 on /var/lib/plexmediaserver type ext4 (rw,noatime,stripe=512,x-systemd.after=local-fs.target)
tmpfs on /run/credentials/getty@tty1.service type tmpfs (ro,nosuid,nodev,noexec,relatime,nosymfollow,size=1024k,nr_inodes=1024,mode=700,inode64,noswap)
root@DietPi:\~#

```

the mount is

systemd-1 on /mnt/backup type autofs

Sonarr and even accessing to tha tfolder in the terminal causes the terminal to not give back the prompt. dietpi-drive\_manager just hangs there for ages

I once managed to access the drive\_manager throug dietpi-launcher and the backup external disk was not there, i just wanted to remove it.

It is not in the fstab also

```auto
root@DietPi:\~# cat /etc/fstab
# You can use “dietpi-drive_manager” to setup mounts.
# NB: It overwrites and re-creates physical drive mount entries on use.
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------
#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=3G,noatime,lazytime,nodev,nosuid,mode=1777
tmpfs /var/log tmpfs size=1G,noatime,lazytime,nodev,nosuid
#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf, glusterfs, mergerfs, bind, Btrfs subvolume
#----------------------------------------------------------------
/mnt/raid5/plexmediaserver /var/lib/plexmediaserver none bind,nofail,x-systemd.after=local-fs.target 0 0
/mnt/raid5/opt /opt none bind,nofail,x-systemd.after=local-fs.target 0 0
/mnt/raid5/dietpi_userdata /mnt/dietpi_userdata none bind,nofail,x-systemd.after=local-fs.target 0 0
#----------------------------------------------------------------
# SWAP SPACE
#----------------------------------------------------------------
#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
UUID=ede52685-b675-4db7-8920-ea48aabebaf3 / ext4 noatime,lazytime,rw 0 1
UUID=a523a189-4b48-49b4-81af-d7508e38261e /mnt/raid5 ext4 noatime,lazytime,rw,noauto,x-systemd.automount

```

how can i fix this? because i cannot add a directory to sonarr because when i click in /mnt in keeps spinning for ages, i think its because backup folder is there.

Cheers.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [6 February 2026 17:44 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/4 "2026-02-06T17:44:28Z")

</div>

simply force an unmount

```auto
sudo umount -f /path/to/mountpoint

```

or reboot the system.

---

<div class="post-metadata">

**Author:** ![sroland81](https://dietpi.com/forum/user_avatar/dietpi.com/sroland81/32/8700_2.png) [@sroland81](https://dietpi.com/forum/u/sroland81)\
**Post date:** [7 February 2026 02:50 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/5 "2026-02-07T02:50:16Z")

</div>

It never gives me the prompt back.

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [7 February 2026 08:09 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/6 "2026-02-07T08:09:13Z")

</div>

What exactly do you mean by that?

Unlike Windows, Linux typically does not provide any feedback when a command has been successfully executed. This has nothing to do with DietPi, but applies to all Linux-based systems. Normally, feedback is only provided when an error occurs or when you have a script that explicitly generates output.

Or do you mean that it then hangs? In that case, the system is unable to perform the `unmount` correctly, but should come back after a timeout. The easiest way to resolve this is to reboot the system.

---

<div class="post-metadata">

**Author:** ![sroland81](https://dietpi.com/forum/user_avatar/dietpi.com/sroland81/32/8700_2.png) [@sroland81](https://dietpi.com/forum/u/sroland81)\
**Post date:** [8 February 2026 01:16 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/7 "2026-02-08T01:16:46Z")

</div>

I ended up rebooting and deleting the mount point. I’m running into all sort of different problems, this time on plex, i add some movies and series in their folders, re-scan de media and they never show up. I even created another directory to import from, and nothing. I’m issuing this commands in dietpi for ownership and it always worked fine.

```auto
chown -R radarr:dietpi /mnt/raid5/peliculas/
chmod 777 /mnt/raid5/peliculas/*
chown -R sonarr:dietpi /mnt/raid5/series/
chmod 777 /mnt/raid5/series/*

```

should i reinstall plexmediaserver all together? journalctl shows nothing.

---

<div class="post-metadata">

**Author:** ![sroland81](https://dietpi.com/forum/user_avatar/dietpi.com/sroland81/32/8700_2.png) [@sroland81](https://dietpi.com/forum/u/sroland81)\
**Post date:** [8 February 2026 01:59 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/8 "2026-02-08T01:59:10Z")

</div>

I ended up reinstalling plexmedia server but had to do it manually through the .deb file because dietpi wont download plexmanager due to some key issues in the repository. I hope i can make backups of the collection since i spend time fixing titles, posters and correcting year versions of thing that have the same name.

Cheers!

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [8 February 2026 01:59 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/9 "2026-02-08T01:59:22Z")

</div>

> [@sroland81](#):
>
> ```auto
> chown -R radarr:dietpi /mnt/raid5/peliculas/
> chmod 777 /mnt/raid5/peliculas/*
> chown -R sonarr:dietpi /mnt/raid5/series/
> chmod 777 /mnt/raid5/series/*
> 
> ```

Your commands only apply to the files inside the folders, but the folder itself need execute permissions so plex can enter it. The user is also almost not important, since `plex`, `radarr` and `sonarr` users belong to the `dietpi` group.

```auto
chmod -R 777 /mnt/raid5/peliculas
chmod -R 777 /mnt/raid5/series
chown -R radarr:dietpi /mnt/raid5/peliculas
chown -R sonarr:dietpi /mnt/raid5/series

```

# edit:

If you want to be more strict and don’t use 777, you can do

```auto
chown -R :dietpi /mnt/raid5/peliculas
chown -R :dietpi /mnt/raid5/series

chmod -R 775 /mnt/raid5/peliculas
chmod -R 775 /mnt/raid5/series

chmod g+s /mnt/raid5/peliculas
chmod g+s /mnt/raid5/series

```

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [8 February 2026 11:21 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/10 "2026-02-08T11:21:07Z")

</div>

> [@sroland81](#):
>
> I ended up reinstalling plexmedia server but had to do it manually through the .deb file because dietpi wont download plexmanager due to some key issues in the repository.

The developers at Plex themselves tampered with their repository, which led to the errors. [Dietpi-update issues (plexmediaserver). · Issue #7925 · MichaIng/DietPi · GitHub](https://github.com/MichaIng/DietPi/issues/7925#issuecomment-3843930843)

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [9 May 2026 11:21 UTC](https://dietpi.com/forum/t/plexmediaserver-corrupted-database/24943/11 "2026-05-09T11:21:50Z")

</div>

Closed on 9 May 2026 11:21 UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
