produKtnz's picture

2 Problems: I installed Turnkey Torrentserver on a 4tb Raid1 set - HDD controller is an enterprise LSI MEGARAID P something somehting, with 4TB WD SE Drives.

Turnkey linux runs inside a VM, standard setup in every way except 4 virt cores and 8gb ram assigned (probably overkill buyt have 64GB to play with).


Problem 1: Torrent server ran out of HDD space. I have deleted torrents through the Transmission interface but diskspace is not released - still full of Liux Distro's. I have deleted files from within samba shares that I mapped a network drive to, no joy

Problem 2:

When I visit the IP of the Turnkey server and goto file manager, I see this: No funtionality, just looks like a guide on css/html/php formating


Point: I'm a Windows guy, trying to make the move to Linux where possible - I run Pihole, Plex, Turnkey Torrent Server and Ubuntu server hosting on my home server. I am not that great with linux, so help with some of the basics and maybe some direction to go in would be hugely appreciated :)

Jeremy Davis's picture

My guess is that the harddrive has filled up, which means that the web based services are failing to run properly... You noted that you deleted some torrents, but torrent files themselves are really small. So unless you actually deleted the downloaded files themselves, it may not have made any difference (and may be what has lead to your confusion?).

Whilst TurnKey does come with WebUI tools, I highly recommend ensuring that you can access it via commandline too (and even if you have access via a VM window, personally, I prefer having an SSH client which can use native copy/paste etc but YMMV).

So if you can log in to a shell (either via SSH or via VM window), try running this:

df -h

Hopefully you should be able to get the gist of what is going on from the output. In case it's not so clear; to assist you to decode what that means, here's the output from a server I have handy:

Filesystem                Size  Used Avail Use% Mounted on
udev                      2.0G     0  2.0G   0% /dev
tmpfs                     395M  5.4M  390M   2% /run
/dev/mapper/turnkey-root  6.1G  3.0G  2.8G  52% /
tmpfs                     2.0G     0  2.0G   0% /dev/shm
tmpfs                     5.0M     0  5.0M   0% /run/lock
tmpfs                     2.0G     0  2.0G   0% /sys/fs/cgroup

If you look for the line that is "Mount on" "/" that is known as your root volume. It's were everything (other than any other mounts) is stored). So you can see on mine, I have 6.1G available, 52% or 3.0G used, leaving 2.8G available.

Assuming that yours looks somewhat similar, you have a few options. You can just clear up some free space and reboot and hopefully all the web services should "just work" again. Alternatively, if you wish to increase the storage size, assuming that you are using LVM (as I am; e.g. your root volume should be a similar "Filesystem" to mine; i.e. /dev/mapper/turnkey-root or similar) then that's another option.

If you want to clean up, you can move through the filesystem using 'cd DIR_NAME' (where DIR_NAME is a directory name) and 'ls' to check the files and directories. When you find an candidate to remove, you can use 'rm FILENAME' to delete it (i.e. delete FILENAME; or 'rm -r DIR_NAME' to delete a directory and all it's contents). Be careful though, as rm doesn't ask for confirmation and files are not easily recovered!

I'm not 100% sure, but I think that by default, the torrents are saved somewhere within /srv/storage. So change to that dir; with 'cd /srv/storage', then run 'ls' the check what is in there.

If you have plenty of space disk space, then increasing the disk size is possibly a good idea anyway. If you are using LVM then in the earlier 'df' output, you would have something similar to what I have in mine; i.e. the "Filesystem" should be '/dev/mapper/turnkey-root' or similar. To double check, run 'lvs'. Here's my output:

  LV     VG      Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root   turnkey -wi-ao----   

So mine has a VG (volume group) of 'turnkey' and 2 LVs (logical volumes) of 'root' and 'swap_1'. Note that the turnkey/root LV is available via /dev/turnkey/root or /dev/mapper/turnkey-root (they're the same thing and are actually both just symlinks to the real device, which is probably named something like /dev/dm-0).

If you can confirm that you are using LVM, it'll make increasing the root volume size pretty easy. Have a look at this old blog post. It's really dated (almost 10 years old!), but I double checked it recently and it should still work 100%.

Hopefully that helps head you in the right direction?! If not and you need me to explain anything, please feel free to ask. If I've overlooked anything or you get significantly different results to me, please share as much info as possible and I'll try again! :)

produKtnz's picture

Feel like I'm getting paid support here :) just wow!

Because you wrote such an amazingly long post, i'll have to quote a bit just for easy contextual reading. Thankfully this 


My Praise post: Belongs there as a seperate to post to any of this, unrelated. 


My guess is that the harddrive has filled up

Correct, as I stated "Problem 1: Torrent server ran out of HDD space. " I then said I deleted torrents to free up space. To do this I mounted a mapped drive to /srv/storage/download, right clicked on Transmission torrents and selected Trash data and remove torrents, found that the torrent file (downloaded content) remained on disk.
I then copied that content and deleted the files via SAMBA mapped drive. This had no effect on the space used on disk. HDD remained full.
Restarted the VM, no change.


While writing I thought it would be good to go back and check the volume use. 

I logged back into the interface via IP addy and HELLO! the file browser now works but I have made no changes.
So where's all the space gone? RECYCLE BIN!@! Grr.
Utilization of HDD Space

lets dig deeper....

Well I failed at that because I do not yet understand enough of file browsing via command line.
cd, cd / , cd - etc is I all know, but the directory is /dev/mapper/turnkey-root can't be navigated to in this context

-bash: /dev/mapper/turnkey-root: Permission denied

Well we could always try GUI right? RIGHT?!


At this point, I'd have to discard replying to the rest of your excellent writeup and save the rest for another time, I'll use some elbowgrease to clear the recyclebin aand I'll challenge myself to do this via SSH.

Wierd how I don't know how to commandline browse effectively yet I'm happy to spinup a vm of Ubuntu server lts and create a VPS with LAMP and host a website with a few thousand registered users....... Unfortunately I'm one of those learn what I need to learn to do the job and skip the erratta in-between. 

Jeremy Davis's picture

FWIW we do also offer paid support, the difference is the speed of response and the ability to hold your hand a bit more and a bit longer... :)

Looking at your 'df -h' output, that certainly confirms that your system has run out of space (perhaps rebooting cleared enough room to allow some processes to restart properly?!).

And it seems you've worked it where all the space has gone and it was the fact that Samba (SMB) files go to the "trash" rather than actually being immediately deleted. I missed that you deleted the files via Samba in your initial post. TBH, because I'm a Linux only user with a preference for commandline these days, it probably wouldn't have occurred to me for some time...! :) So great work on working that out!

Seeing as you appear to have ~188MB free, I suggest that you install a commandline tool called 'ncdu' (ncurses disk usage). It's pretty small, so should install ok. Install like this:

apt install ncdu -y

Then use it like below. Note that command will check the root filesystem ('/'). To check a specific subdirectory (recursively), instead of '/', put the relevant sub dir (e.g. /srv/storage). To check the current directory (recursively) don't note anything after the command.

ncdu /
Wierd how I don't know how to commandline browse effectively yet I'm happy to spinup a vm of Ubuntu server lts and create a VPS with LAMP and host a website with a few thousand registered users....... Unfortunately I'm one of those learn what I need to learn to do the job and skip the erratta in-between.

It seems to me that you're just missing a few fundamental bits of info. The fact that you're having a go and are comfortable firing up servers bodes well for your Liux user future! :)

I recall when I first started playing with Linux (I was a Windows "power user" - apparently the worst type of Linux learner!), someone told me that I needed to "play harder" because "if you're not breaking things, then you're not playing hard enough". And it's through fixing things that you learn the most! :)

To give you some more insight into the Linux filesystem, there is a saying that "everything in Linux is a file". It doesn't mean that literally everything in Linux is an actual file. What if does mean though is that everything within Linux (including hardware) is represented as a file! And the hardware and system components are represented as files within the "special" filesystem trees in /dev, /proc and /sys. So unlike most of the filesystem, files within these sub dirs are not actual files on your hard drive in the usual sense. They are "virtual files" generated at boot time.

The "real" devices (harddrives, partitions, LVM volumes, etc) that your actual files reside on can be found in /dev ('dev' as an abbreviation of devices). So on a Linux system the harddrives (physical or virtual) are generally represented by files such as /dev/sda, /dev/sdb, /dev/sdc, an so on. As I hinted in my previous thread (sorry if it was a bit dense in places...) LVM (sort of a bit like software level RAID) uses devices such as /dev/mapper/turnkey-root. So that "file" (/dev/mapper/turnkey-root) is not your root filesystem, it's the "device" that your root filesystem resides on. Hopefully that makes some sense?!

So to check the actual filesystem, you need to know where that is mounted. In this case we know that it's the root volume (so is mounted as '/'). I hope that helps you understand how things work a bit better?!

Jeremy Davis's picture

The ncdu command should find it, but I meant to mention that the "recycled"/"trashed" files should be found in a "hidden" directory, probably called ".trash" (note filenames that start with a dot are not visible when you do a 'ls' - to show them, add an '-a' (all) switch. I.e.

ls -a

Add new comment