TVHeadend not enough disk space

Hi,

Solved by Funzinken in linked to thread in last post.

Why would TVH be reporting that I don’t have enough space on either the sd card or external hard drive? What do the numbers next to “Storage space:” in TVH actually refer to (example 1GiB/0/3GiB)?

I followed the suggestions here:

however, the problem persists.

Thanks,

Aaron

I can’t answer your specific question, since I don’t use TVH, but it will help others if you provide more details about the problem, including whether TVH has stopped working, and what exactly you’ve done so far to try to fix it? The thread you linked to seems to be discussing permission problems.

I have tried changing the path of where to save the downloaded videos, the maximum size allocated to the storage, the recording profile used. Nothing seems to work.

@Aaron_Spehr: Using the TVH web GUI and moving the mouse pointer over the numbers you should see some more information since there are tooltips implemented for an explanation.

Meaning left-to-right

  • free space
  • used space by TVH
  • total space on the configured volume

The path configured in

Configuration -> Recording -> Digital Video Recorder Profiles -> (default profile) -> Recording System Path

should already exists and of course the file permission should be appropriate. If you are not sure give this folder persmissions 777 using chmod command.

For the used TVheadend user check in

Configuration -> Users -> Access Entries

that the fields

  • change parameters
  • streaming
  • video recorder

have ALL flags enabled.

Addition:
But 1 GB free space is a very very low value, it will only be sufficient for some minutes MPEG2 videos. I hope you have a large USB stick or HDD connected.

Hi,

Ah ok! Well, I initially OSMC on a 4GB sd card that’s why it is displaying the above numbers! Is it possible to change where it looks for the saved videos and hence the size of the device (i.e the external hard drive)?

Yep, carefully read my previous post, again.

Yeah, I have 3TB over 2 hard drives! I have checked and doubled checked the path to the external drive and made sure the destination exist but still now difference. In the recording section of TVH I set the file permissions to 0666 and the directory permissions to 0777. On the actual hard drive all the folders have the following permissions drwxrwxrwx.

Perhaps you haven’t given write permissions to ALL path components for the user osmc?

Here an ssh session example (logged in as user osmc) for an NTFS formatted USB stick named CorsAir64 which I plugged into my Vero4k and created a directory tv_recordings where TVH should place the recordings to

osmc@osmc-vero4k:~$ whoami
osmc
osmc@osmc-vero4k:~$ df
Filesystem                                         1K-blocks       Used  Available Use% Mounted on
...
/dev/sdb1                                           62524412      89692   62434720   1% /media/CorsAir64
...
osmc@osmc-vero4k:~$ ls -ld /media
drwxr-xr-x 4 root root 4096 Dec 13 13:26 /media
(this permission will not work since /media is owned by root but no write access to others)

osmc@osmc-vero4k:~$ ls -ld /media/CorsAir64
drwxrwxrwx 1 osmc osmc 4096 Dec 13 13:25 /media/CorsAir64

osmc@osmc-vero4k:~$ cd /media/CorsAir64
osmc@osmc-vero4k:/media/CorsAir64$ mkdir /tv_recordings
mkdir: cannot create directory '/tv_recordings': Permission denied

osmc@osmc-vero4k:/media/CorsAir64$ sudo chmod 777 /media

osmc@osmc-vero4k:/media/CorsAir64$ mkdir tv_recordings
osmc@osmc-vero4k:/media/CorsAir64$ cd tv*
osmc@osmc-vero4k:/media/CorsAir64/tv_recordings$ pwd
/media/CorsAir64/tv_recordings

The default permissions of /media prevented the direct usage, so I simply gave it full permissions for all users(777). The path /media/CorsAir64/tv_recordings is the string to enter into THV’s field ‘recording system path’.

stat /media/pi/data
File: ‘/media/pi/data’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 812h/2066d Inode: 2 Links: 10
Access: (0777/drwxrwxrwx) Uid: ( 1000/ pi) Gid: ( 1000/ pi)
Access: 2017-12-12 12:06:42.700942109 +0000
Modify: 2017-12-12 12:06:38.690959723 +0000
Change: 2017-12-13 13:21:15.099108020 +0000
Birth: -

I created a user pi in TVH and tried to setup a recording under that user but it still me the “not enough disk space” message. I noticed “Birth” above does not have any information next to it have I missed something?

So, what are the permissions for

/media
/media/pi

?

I jut checked and it applied the chmod 777 to all the folders under “/media/pi”. So “/media/pi” has 750 then the data folder within has “777”, etc.

The default location for video saves in TVH:

stat /home/osmc/
File: ‘/home/osmc/’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: b302h/45826d Inode: 1703 Links: 11
Access: (0755/drwxr-xr-x) Uid: ( 1000/ osmc) Gid: ( 1000/ osmc)
Access: 2017-12-13 21:06:38.307950058 +1030
Modify: 2017-12-13 21:06:31.527967852 +1030
Change: 2017-12-13 21:06:31.527967852 +1030
Birth: -

Even a two minute recording failed!

@Aaron_Spehr: You should think again about the security and permissions.

  1. /home/osmc - is owned by user osmc and group osmc, you told that you created user pi for the recording. That means pi is another user, the permissions has to be at least drwxr-xrwx (757) for that directory if pi should have write access to it. The same for the parent directory /home which needs as well drwxr-xrwx (757).
    Since there is so small free space on the sd-card in theory you would have to adapt

TVH Web GUI: Configuration -> Recording -> Digital Video Recorder Profiles (default profile) -> Maintain free storage space in MiB

to a very small value; the default of free space TVH tries to keep is 1000 MiB

  1. Let’s talk again your connected external HDD and you tried path /media/pi/data
    The requirements are
  • the external disk is really mounted at path /media/pi … check this with the df command
  • give /media permissions drwxrwxrwx: sudo chmod 777 /media … pi is another user since /media is owned by root and group root. If one of the parent directories of your target one does not have write access for pi, it will fail!
  • give /media/pi permssions drwxrwxrwx: sudo chmod 777 /media/pi
  • /media/pi/data is owned by pi and has of course all permissions for this user as you already posted.

That’s all.

If it is still not working, please, post outputs from

  • sudo df
  • sudo ls -ld from all path components of your recording path like
    /media,
    /media/pi and
    /media/pi/data

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 7548488 5255464 1925476 74% /
devtmpfs 470128 0 470128 0% /dev
tmpfs 474736 0 474736 0% /dev/shm
tmpfs 474736 6816 467920 2% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 474736 0 474736 0% /sys/fs/cgroup
/dev/mmcblk0p1 42030 21847 20183 52% /boot
tmpfs 94948 0 94948 0% /run/user/109
/dev/sdb2 952123680 77868 903610784 1% /media/pi/data
tmpfs 94948 0 94948 0% /run/user/1000

On the pi with the hard drive
drwxrwxrwx 3 pi root 4096 Dec 12 13:27 /media
drwxrwxrwx+ 5 pi root 4096 Dec 13 08:33 /media/pi
drwxrwxrwx 10 pi pi 4096 Dec 12 12:06 /media/pi/data

mmmh,not sure

The plus sign indicates that there is a file access control set for /media/pi.
Please, paste the output of sudo getfacl -e /media/pi.

And, please, reset the owners and groups to the originals

sudo chown root:root /media
sudo chown osmc:osmc /media/pi
sudo chown osmc:osmc /media/pi/data

After that if you go to /media/pi/data (logged in as osmc), can you create a file or does it report a file permission error?

osmc@osmc-vero4k:~$ whoami
osmc
osmc@osmc-vero4k:~$ cd /media/pi/data
osmc@osmc-vero4k:/media/pi/data$ touch purgeme
osmc@osmc-vero4k:/media/pi/data$ ls -al purgeme
-rw-rw-rw- 1 osmc osmc 0 Dec 14 07:25 purgeme
osmc@osmc-vero4k:/media/pi/data$ rm purgeme
osmc@osmc-vero4k:/media/pi/data$

sudo chown root:root /media
sudo chown osmc:osmc /media/pi
sudo chown osmc:osmc /media/pi/data

The pi I have the hard drives connected to is different from the on running OSMC they are not the same pi so do I still user “osmc” or change it to “pi”?

@Aaron_Spehr: After 2 days you’re coming with this information? :slightly_frowning_face:

Sorry, I though I had mentioned it in my initial post!

file: media/pi

owner: pi

group: pi

user::rwx
user:pi:r-x #effective:r-x
group::— #effective:
mask::rwx
other::rwx

Sorry, I’m out from here. Please, restart from scratch and very precisely describe

  • How the OSMC device (a Pi?) sees the disks from this second Pi (how they are mounted)?
  • Why you think to need use a user pi on the OSMC device running TVHeadend?

Hope that someone else will find time for you.

The solution is in post #2 here