Bug #4713
Auto remove with quota fails depending on mount type
100%
Description
I'm using an Odroid C2 running Ubuntu
Linux odroid64 3.14.79-116 #1 SMP PREEMPT Tue Sep 26 01:19:06 BRT 2017 aarch64 aarch64 aarch64 GNU/Linux
tvheadend 4.2.4~xenial arm64 Tvheadend
It's not a permission problem. I can 'su - hts;cd /home/hts/recordings;touch 1 2 3;rm 1 2 3'
Will paste success and errors along with mount options. Will see if I can also attach some screenshots of web configurations.
Works (directory of recordings is /home/hts/recordings and it's local)
Filesystem Size Used Avail Use% Mounted on
udev 716M 0 716M 0% /dev
tmpfs 172M 14M 159M 8% /run
/dev/mmcblk0p2 59G 1.2G 56G 3% /
tmpfs 859M 0 859M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 859M 0 859M 0% /sys/fs/cgroup
/dev/mmcblk0p1 128M 18M 111M 14% /media/boot
2017-11-07 18:16:50.889 dvr: running out of used disk space for dvr config "Default profile", required used space "25000 MiB", current used space "25039 MiB"
2017-11-07 18:16:50.889 dvr: Delete "until space needed" recording "The Ed Sullivan Show" with stop time "2017-11-07 16:30:00" and file size "272 MB"
2017-11-07 18:16:50.889 dvr: delete entry de088b83bc12b60435f4942b144b2273 "The Ed Sullivan Show" on "DECADES" start time 2017-11-07 15:59:30, scheduled for recording by "admin", retention "On file removal" removal "Until space needed"
2017-11-07 18:18:05.883 dvr: running out of used disk space for dvr config "Default profile", required used space "25000 MiB", current used space "25026 MiB"
2017-11-07 18:18:05.884 dvr: Delete "until space needed" recording "Judge Judy" with stop time "2017-11-07 16:30:00" and file size "1779 MB"
2017-11-07 18:18:05.885 dvr: delete entry 9fad6d9b936b48784207e2598c510444 "Judge Judy" on "CBS2-HD" start time 2017-11-07 15:59:30, scheduled for recording by "admin", retention "On file removal" removal "Until space needed"
2017-11-07 18:26:50.886 dvr: running out of used disk space for dvr config "Default profile", required used space "25000 MiB", current used space "25006 MiB"
2017-11-07 18:26:50.886 dvr: Delete "until space needed" recording "NBC 5 News at 4pm" with stop time "2017-11-07 17:00:00" and file size "2491 MB"
2017-11-07 18:26:50.886 dvr: delete entry fcb18e82ab882792c85565dffa0b1c20 "NBC 5 News at 4pm" on "NBC5 " start time 2017-11-07 15:59:30, scheduled for recording by "admin", retention "On file removal" removal "Until space needed"
Fails (directory of recordings is /home/hts/recordings and it's an NFS share)
Filesystem Size Used Avail Use% Mounted on
udev 716M 0 716M 0% /dev
tmpfs 172M 16M 157M 9% /run
/dev/mmcblk0p2 59G 1.2G 56G 3% /
tmpfs 859M 0 859M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 859M 0 859M 0% /sys/fs/cgroup
/dev/mmcblk0p1 128M 18M 111M 14% /media/boot
myth:/export/recordings 912G 824G 42G 96% /home/hts/recordings
2017-11-07 20:41:36.467 dvr: running out of used disk space for dvr config "Default profile", required used space "25000 MiB", current used space "25028 MiB"
2017-11-07 20:41:36.476 dvr: No "until space needed" recordings found for config "Default profile", aborting active recordings now!
2017-11-07 20:41:36.483 subscription: 0027: "DVR: Frasier" unsubscribing from "COZI "
2017-11-07 20:41:36.494 dvr: "Frasier" on "COZI ": End of program: Not enough disk space
2017-11-07 20:41:36.502 subscription: 0024: "DVR: Rowan & Martin's Laugh-In" unsubscribing from "DECADES"
2017-11-07 20:41:36.504 dvr: "Rowan & Martin's Laugh-In" on "DECADES": End of program: Not enough disk space
2017-11-07 20:41:36.562 subscription: 0025: "DVR: Bull" unsubscribing from "CBS2-HD"
2017-11-07 20:41:36.564 dvr: "Bull" on "CBS2-HD": End of program: Not enough disk space
2017-11-07 20:41:36.599 subscription: 0026: "DVR: This Is Us" unsubscribing from "NBC 5 "
2017-11-07 20:41:36.599 subscription: 001D: "keep" unsubscribing
2017-11-07 20:41:36.612 dvr: "This Is Us" on "NBC5 ": End of program: Not enough disk space
2017-11-07 20:41:36.612 subscription: 001B: "keep" unsubscribing
All recording fail and tvheadend basically stops. I did not change any configurations in tvheadend between these two tests. Just disabled my Autorecs rules and made the mount changes.
I have tried with both name and IP with the same result
192.168.0.50:/export/recordings /home/hts/recordings nfs _netdev,auto 0 0
myth:/export/recordings /home/hts/recordings nfs _netdev,auto 0 0
Files
History
Updated by Brent Bolin about 7 years ago
The NFS share is only a directory on the export. So the total used is NOT represented by what tvheaded is using. Not sure how tvheadend monitors it's usage
df -h
or
df -h /directory/of/recordings
Updated by Brent Bolin about 7 years ago
Manually calculated the MB size of the output of df -h
Filesystem Size Used Avail Use% Mounted on
Completely ignored the value and continued to record. I suspect it will error when all disk space is used.
Updated by Jaroslav Kysela about 7 years ago
Hmm. Could you run tvheadend process on console and prepend "strace -f -e trace=statfs,statfs64" when you're using NFS mount? Show me the statfs or statfs64 values.
Updated by Brent Bolin about 7 years ago
Any other way to run strace ? This is on an Odroid C2 ARM (credit card size device). There is no console
Updated by Brent Bolin about 7 years ago
- File output.txt output.txt added
From an ssh session
strace -o output.txt -f -e trace=statfs,statfs64 /usr/bin/tvheadend -f -u hts -g video
Updated by Jaroslav Kysela about 7 years ago
The problem is "f_fsid={0, 0}" . TVH's code currently skips this, so we cannot remove any file :-(
Updated by Brent Bolin about 7 years ago
Does it have something to do with the nfs exports ?
/export 192.168.0.0/24(rw,fsid=0,insecure,no_subtree_check,async)
/export/videos 192.168.0.0/24(rw,nohide,insecure,no_subtree_check,async)
/export/pictures 192.168.0.0/24(rw,nohide,insecure,no_subtree_check,async)
/export/recordings 192.168.0.0/24(rw,no_root_squash,nohide,insecure,no_subtree_check,async)
Ubuntu is nfs server
cat /etc/exports- /etc/exports: the access control list for filesystems which may be exported
- to NFS clients. See exports(5). #
- Example for NFSv2 and NFSv3:
- /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) #
- Example for NFSv4:
- /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
- /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
#/export 192.168.0.0/24(rw,fsid=0,insecure,no_subtree_check,async)
#/export/videos 192.168.0.0/24(rw,nohide,insecure,no_subtree_check,async)
Output here is kinda garbled. Do you think an nfs3 type export would help?
Updated by Jaroslav Kysela about 7 years ago
The fsid=0 for the NFSv4 server means that you're using the NFSv4 pseudo file system. So, the client sees fsid as zero, but tvh is trying to distinguish among mounted volumes. I need more time to study this.
Updated by Brent Bolin about 7 years ago
The strace indicates an NFS4 issue but does it even with NFS3
Verified only NFS3 running on the server(And only one export defined). Verified NFS3 running on the client. The error persists.
Maintain used storage space in MiB (0=disabled):
Error persists when setting actual disk usage on the directory or used space indicated by the system
df -h /home/hts/recordings
or
df -h
Updated by Jaroslav Kysela about 7 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|6cd246667aea40bb9c9c7d925558a7ec2fa5b503.
Updated by Jaroslav Kysela about 7 years ago
Fixed in v4.3-625-g6cd246667 and v4.2.4-13-gbaae26a21 .
Updated by Brent Bolin about 7 years ago
Indeed it is. Reinstalled going from release to stable
deb https://dl.bintray.com/tvheadend/deb xenial stable-4.2
Verified both NFS3 and NFS4 work
WebUI setting "Maintain used storage space in MiB (0=disabled):" should be set for mounted recording directory usage:
Example df -h /home/hts/recordings
And NOT system usage:
nfs_server:/export/recordings 912G 825G 41G 96% /home/hts/recordings