PDA

View Full Version : [SF8008] Movie list directory sort order



Willo3092
16-11-21, 20:58
Has anything changed in the directory sort function in ViX 6.0?
I have the default sort setting of 'recordings by date and other media by name' on ViX 5.4 and ViX 6.0 on the same receiver.

On ViX 5.4 and previous versions it has always showed the directories containing the newest recordings first.

62825

On ViX 6.0 the directories are just in alphabetic order and even changing to 'sort by date' doesn't work.

62826

I record to a NAS, not sure if this makes a difference?

ccs
16-11-21, 21:10
Is that the default ViX movielist you're using?

Willo3092
16-11-21, 21:17
Yes, with the Simple 1080 skin. The only thing I changed was the number of rows.

ccs
16-11-21, 21:18
Where does "Goto: MOVIES" come from?

Willo3092
16-11-21, 21:27
Oh sorry, I also have the coloured button designations changed to different shared folders on my NAS (Movies, Series and Recordings).

Willo3092
17-11-21, 12:44
Tried again and ViX 5.4 allows directories to be sorted by date but ViX 6.0 only sorts alphabetically even if sort by date is selected :confused:

birdman
17-11-21, 13:21
I have the default sort setting of 'recordings by date and other media by name' on ViX 5.4 and ViX 6.0 on the same receiver.Given that a directory is not a recording, I'd expect that to sort directories by name.

Joe_90
17-11-21, 13:30
Given that a directory is not a recording, I'd expect that to sort directories by name.

Maybe directory "Date Modified" could be a sort option?

Willo3092
17-11-21, 13:53
Given that a directory is not a recording, I'd expect that to sort directories by name.

Yes, so would I but in ViX 5.4 the directories in my recordings NAS share have always been sorted by whichever directory has the newest recordings with it set as 'recordings by date and other media by name'.
All other shared folders such as Movies and TV Series are alphabetical with the same settings.
The Movies share is similar to recordings, in that it has directories and individual files but it is all sorted alphabetically :confused:

This actually suited me in ViX 5.4 because I knew all of the latest recordings were in directories at the top of the list. In ViX 6.0 I would like to do the same but even sorting by date doesn't work.

abu baniaz
17-11-21, 15:53
Given that a directory is not a recording, I'd expect that to sort directories by name.
But some people put their recordings in a directory. It is a GUI option in the Timer menus asking where to put the recording.

Joe_90
17-11-21, 16:17
@abu - the files (recordings) within a directory can be sorted by date. It appears from @Willo's posts that Vix 6.0 is sorting the actual directories alphabetically by default whereas 5.4 was doing so by date. The linux command ls -al will sort directories by name. ls -alt will sort them by modification date/time with newest first.

birdman
17-11-21, 18:49
@abu - the files (recordings) within a directory can be sorted by date. It appears from @Willo's posts that Vix 6.0 is sorting the actual directories alphabetically by default whereas 5.4 was doing so by date.Which wouldn't help you if you had multiple directory levels, as the top level wouldn't change date when a lower level directory's date was changed.

birdman
17-11-21, 19:04
The code to do the sort (for "by date" - this hasn't changed in 6.0) is:

elif self.current_sort == MovieList.SORT_RECORDED:
self.list = sorted(self.list[:numberOfDirs], key=self.buildBeginTimeSortKey) + sorted(self.list[numberOfDirs:], key=self.buildBeginTimeSortKey)so the intention is to put all of the directories first, sorted by time, then any files, sorted by time.

The thing that has changed is buildBeginTimeSortKey(). It now returns 3 items, not 2. I'm not sure why....

EDIT: oddly, it can now return a name, despite the function supposedly setting up a time key.

It's this change that did it (lines 969/970):

https://github.com/OpenViX/enigma2/commit/ea343a1977250596d4c9669dcfc5f0e80b56bf13

Huevos
17-11-21, 19:04
Certain sorts are not available on a per directory basis. Only global.

I think this thread is a déjà vu of one we had in the private area about a year ago, but I can't find it at the moment.

Joe_90
18-11-21, 01:22
Which wouldn't help you if you had multiple directory levels, as the top level wouldn't change date when a lower level directory's date was changed.

This would be true, but I think the OP does not have subdirectories. He just wants his top directories sorted in date order. ;)

birdman
18-11-21, 02:54
Certain sorts are not available on a per directory basis. Only global.

I think this thread is a déjà vu of one we had in the private area about a year ago, but I can't find it at the moment.It's not. The sort code has been changed - supposedly as a Py3 change. See post #13.

Willo3092
18-11-21, 08:49
This would be true, but I think the OP does not have subdirectories. He just wants his top directories sorted in date order. ;)

Yes that's correct, no sub-directories.
On ViX 5.4 I could tell instantly which directory had a new recording in it because it was at the top of the list.

Huevos
18-11-21, 09:07
The code to do the sort (for "by date" - this hasn't changed in 6.0) is:

elif self.current_sort == MovieList.SORT_RECORDED:
self.list = sorted(self.list[:numberOfDirs], key=self.buildBeginTimeSortKey) + sorted(self.list[numberOfDirs:], key=self.buildBeginTimeSortKey)so the intention is to put all of the directories first, sorted by time, then any files, sorted by time.

The thing that has changed is buildBeginTimeSortKey(). It now returns 3 items, not 2. I'm not sure why....

EDIT: oddly, it can now return a name, despite the function supposedly setting up a time key.

It's this change that did it (lines 969/970):

https://github.com/OpenViX/enigma2/commit/ea343a1977250596d4c9669dcfc5f0e80b56bf13I don't know why the 3rd argument has been added. It does nothing as it will be the same for all. If anything if there is an empty argument it should be the first argument and then the double sort should not be necessary.

I'm not sure why Tony changed this code, possibly because of Simon's changes to eServiceRef code. But this should be sorting by date only.

twol
18-11-21, 10:10
I don't know why the 3rd argument has been added. It does nothing as it will be the same for all. If anything if there is an empty argument it should be the first argument and then the double sort should not be necessary.

I'm not sure why Tony changed this code, possibly because of Simon's changes to eServiceRef code. But this should be sorting by date only.

Looking back (with my limited access at the moment) I haven‘t been able to see why this change was made from my git, but I am pretty sure somebody else was in the loop because Movielist is not something I play around with usually!

Huevos
18-11-21, 15:01
Looking back (with my limited access at the moment) I haven‘t been able to see why this change was made from my git, but I am pretty sure somebody else was in the loop because Movielist is not something I play around with usually!

Don't worry, I've reverted it.
https://github.com/OpenViX/enigma2/commit/e3ee1518ad06cefc155eebe112d76fe5c1a6fa93

Considering the scale of the Py3 conversion it is not surprising the odd thing has slipped through net.

Willo3092
18-11-21, 18:57
It works fine on /media/hdd/movies/ but crashing on network drives :confused:

ViX 6.0.002 default_skin

62843

Huevos
18-11-21, 19:21
It works fine on /media/hdd/movies/ but crashing on network drives :confused:

ViX 6.0.002 default_skin

62843

Use this:

def buildBeginTimeSortKey(self, x):
print("x", x)
ref = x[0]
if ref.flags & eServiceReference.mustDescent and os.path.exists(ref.getPath()):
print("x[1]", x[1])
print("x[1] and -os.stat(ref.getPath()).st_mtime", x[1] and -os.stat(ref.getPath()).st_mtime)
return 0, x[1] and -os.stat(ref.getPath()).st_mtime
print("x[2]", x[2])
return 1, -x[2]
And get a full debug log.

Willo3092
18-11-21, 19:38
Here you go :

62844

62845

Huevos
18-11-21, 19:43
So, what is this doing in there?


< 2929.4290> 18:36:23.2748 x (eServiceReference(Name=/media/autofs/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/), None, 0, <Components.MovieList.MovieListData object at 0xae09b7c0>)

ccs
18-11-21, 20:03
Crashes for me as well, (recordings now started, so no more time at the moment) ...

Could this be from .e2settings.pkl ?



root@vuultimo4k:/media/autofs/SYNOLOGY# cat .e2*
▒▒:}▒(▒ moviesort▒K▒
description▒Kmovieoff▒▒ movielist▒u.root@vuultimo4k:/media/autofs/SYNOLOGY#



18:58:51.0538 [Trashcan] Debug path /media/autofs/SYNOLOGY/ => /media/autofs/SYNOLOGY/.Trash
18:58:51.0712 x (eServiceReference(Name=/media/autofs/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/), None, 0, <Components.MovieList.MovieListData object at 0xb018a328>)


18:58:51.0850 x (eServiceReference(Name=/media/autofs/SYNOLOGY/Cradle To Grave/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/SYNOLOGY/Cradle To Grave/), <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f518> >, -1, <Components.MovieList.MovieListData object at 0xb017f328>)
18:58:51.0851 x[1] <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f518> >
18:58:51.0852 x[1] and -os.stat(ref.getPath()).st_mtime -1479654224.3432539
18:58:51.0853 x (eServiceReference(Name=/media/autofs/SYNOLOGY/Ripper Street/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/SYNOLOGY/Ripper Street/), <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f380> >, -1, <Components.MovieList.MovieListData object at 0xb017f3e8>)
18:58:51.0854 x[1] <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f380> >
18:58:51.0855 x[1] and -os.stat(ref.getPath()).st_mtime -1559057441.6611743
18:58:51.0857 x (eServiceReference(Name=/media/autofs/SYNOLOGY/Holby/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/SYNOLOGY/Holby/), <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f440> >, -1, <Components.MovieList.MovieListData object at 0xb017f478>)
18:58:51.0858 x[1] <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017f440> >
18:58:51.0859 x[1] and -os.stat(ref.getPath()).st_mtime -1625487973.4663138
18:58:51.0861 x (eServiceReference(Name=/media/autofs/SYNOLOGY/Breathless/, String=2:47:1:0:0:0:0:0:0:0:/media/autofs/SYNOLOGY/Breathless/), <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017fba8> >, -1, <Components.MovieList.MovieListData object at 0xb017fbe0>)
18:58:51.0862 x[1] <enigma.iStaticServiceInformationPtr; proxy of <Swig Object of type 'ePtr< iStaticServiceInformation > *' at 0xb017fba8> >
18:58:51.0863 x[1] and -os.stat(ref.getPath()).st_mtime -1494857921.7117617
[MAIN] executing main
TuxTxt cache cleared
18:58:51.0866 Traceback (most recent call last):
18:58:51.0866 File "/usr/lib/enigma2/python/Screens/MovieSelection.py", line 1712, in reloadWithDelay
18:58:51.0893 self["list"].reload(self.current_ref, self.selected_tags, self.collectionName)
18:58:51.0893 File "/usr/lib/enigma2/python/Components/MovieList.py", line 630, in reload
18:58:51.0902 self.load(root, filter_tags, collection)
18:58:51.0903 File "/usr/lib/enigma2/python/Components/MovieList.py", line 841, in load
18:58:51.0913 self.list.sort(key=self.buildGroupwiseSortkey)
18:58:51.0914 TypeError: '<' not supported between instances of 'float' and 'NoneType'
18:58:51.0915 [ePyObject] (CallObject(<bound method MovieSelection.reloadWithDelay of <class 'Screens.MovieSelection.MovieSelection'>>,()) failed)
18:58:55.0753 [gRC] main thread is non-idle! display spinner!
/usr/bin/enigma2.sh: line 284: 5433 Killed LD_PRELOAD=$LIBS /usr/bin/enigma2

enigma2 has exited
========== Enigma2 log ends ==========

birdman
18-11-21, 20:38
Append "or 0.0" to both return statements from that function?

Huevos
18-11-21, 20:51
The question is why is there anything on /media/autofs as that is not a valid location for recordings. You can't even set that up.

Willo3092
18-11-21, 21:17
The question is why is there anything on /media/autofs as that is not a valid location for recordings. You can't even set that up.

That's weird, I hadn't noticed that but ViX 6.0.002 won't let you select that as a recording path any more. I have used that as my default path for the last 5 years.
It WILL let you select it from the 'Edit autotimer defaults' though and that is where my box is recording to.

62846

Huevos
18-11-21, 21:40
That's weird, I hadn't noticed that but ViX 6.0.002 won't let you select that as a recording path any more. I have used that as my default path for the last 5 years.
It WILL let you select it from the 'Edit autotimer defaults' though and that is where my box is recording to.

62846Ok, so now we know what is happening switch to this:

def buildBeginTimeSortKey(self, x):
ref = x[0]
if ref.flags & eServiceReference.mustDescent and os.path.exists(ref.getPath()):
return 0, x[1] and -os.stat(ref.getPath()).st_mtime or 0
return 1, -x[2]

ccs
18-11-21, 22:26
Looks ok, no crashes on my ET10K, I never record directly to the NAS, but just use it to move recordings off the HD.

So sort by date looks very random, but probably reflects the random nature of me moving files around.

(Autofs mounts have been very flakey these last 2 days, but get used so infrequently that I can't say when it started happening.

I spent ages yesterday messing about, no pattern emerged. Literally every combination of ET10K, Ultimo4k, Py3, Py2 worked and didn't work at some point.)

Huevos
18-11-21, 23:04
That's weird, I hadn't noticed that but ViX 6.0.002 won't let you select that as a recording path any more. I have used that as my default path for the last 5 years.
It WILL let you select it from the 'Edit autotimer defaults' though and that is where my box is recording to.

62846You've lost me. You should be able to record to the NAS just not "/media/autofs".

Willo3092
18-11-21, 23:23
My recording path is (or was) /media/autofs/recordings/
E2 is now saying it's not a valid partition.

I did update the synology firmware the other day though so I need to make sure it's not something to do with that.

I have checked the release notes and noticed this:

DSM 7.0.1 ends support for ext3. We strongly suggest backing up the data stored on your ext3 volumes and transferring the data to volumes with supported file systems before the update.

DSM 7.0.1 by default disables NTLMv1 and enables NTMLv2 only, so SMB clients (e.g., Windows XP devices, media players, network printers, smart TVs, and IP cameras) won’t be able to access your Synology NAS.
To restore the connection after the update, go to Control Panel > File Services > SMB > Advanced Settings > Others and enable NTLMv1 authentication.

As far as I remember I formatted all of the NAS drives as ext4 but can't remember how to check the filesystem now.

This is the message when trying to change the path:

62847

I'll boot into 5.4 when my good lady has finished watching TV and report back tomorrow.

Willo3092
18-11-21, 23:33
Just managed to check and all is good on ViX 5.4 so nothing to do with the Synology update.


62848 62849

ccs
18-11-21, 23:38
As far as I remember I formatted all of the NAS drives as ext4 but can't remember how to check the filesystem now.

It's hidden away in Storage Manager, mine's ext4.

Huevos
19-11-21, 01:32
@willo3092 and @ccs please get the output from "cat /proc/mounts".

Huevos
19-11-21, 02:33
https://github.com/openatv/enigma2/blob/7.0/lib/python/Components/MovieList.py#L799
Wrong in OpenATV too so most likely where it came from.

Huevos
19-11-21, 02:43
Hopefully sorting works properly from 6.0.003.003. Please test.

birdman
19-11-21, 03:29
https://github.com/openatv/enigma2/blob/7.0/lib/python/Components/MovieList.py#L799
Wrong in OpenATV too so most likely where it came from.That came about as a result of:
https://github.com/openatv/enigma2/commit/16a23d2917992c4737e38348b02f8dedb72227d9

where an mtime was morphed into a pathname (and the other return had an extra value added!).
Which was a fix for:
https://github.com/openatv/enigma2/commit/8c667f3f4e04a659a5239a894192730ec4cb6149

when all that was needed was the "or 0".

Huevos
19-11-21, 09:05
when all that was needed was the "or 0".No. That is to fix a different bug.

The "or 0" fixes this:

18:58:51.0866 Traceback (most recent call last):
18:58:51.0866 File "/usr/lib/enigma2/python/Screens/MovieSelection.py", line 1712, in reloadWithDelay
18:58:51.0893 self["list"].reload(self.current_ref, self.selected_tags, self.collectionName)
18:58:51.0893 File "/usr/lib/enigma2/python/Components/MovieList.py", line 630, in reload
18:58:51.0902 self.load(root, filter_tags, collection)
18:58:51.0903 File "/usr/lib/enigma2/python/Components/MovieList.py", line 841, in load
18:58:51.0913 self.list.sort(key=self.buildGroupwiseSortkey)
18:58:51.0914 TypeError: '<' not supported between instances of 'float' and 'NoneType'
18:58:51.0915 [ePyObject] (CallObject(<bound method MovieSelection.reloadWithDelay of <class 'Screens.MovieSelection.MovieSelection'>>,()) failed)
18:58:55.0753 [gRC] main thread is non-idle! display spinner!

The empty string fixes this:

< 2483.1435> Traceback (most recent call last):
< 2483.1435> File "/usr/lib/enigma2/python/Screens/MovieSelection.py", line 1712, in reloadWithDelay
< 2483.1457> self["list"].reload(self.current_ref, self.selected_tags, self.collectionName)
< 2483.1458> File "/usr/lib/enigma2/python/Components/MovieList.py", line 630, in reload
< 2483.1465> self.load(root, filter_tags, collection)
< 2483.1466> File "/usr/lib/enigma2/python/Components/MovieList.py", line 841, in load
< 2483.1476> self.list.sort(key=self.buildGroupwiseSortkey)
< 2483.1476> TypeError: '<' not supported between instances of 'str' and 'int'

The crashes happen based on what is in the list of items to be sorted.

Hopefully, my last commit fixes it for once and for all.
https://github.com/OpenViX/enigma2/commit/4077877a710dc13f68c1e972038a72db6fc2e836

Huevos
19-11-21, 09:46
I've sent a PR to OpenATV.
https://github.com/openatv/enigma2/pull/2120

Willo3092
19-11-21, 10:11
Now getting stuck on 49 after a reboot.

62850

Huevos
19-11-21, 10:22
Download the MovieList file from Github again.

Willo3092
19-11-21, 10:36
Still the same

62851

Huevos
19-11-21, 10:45
The file on my box came from github. Built last night at 02:30 and box works.

Try this:

sed -i 's/\x0//g' /usr/lib/enigma2/python/Components/MovieList.py

Huevos
19-11-21, 10:49
How did you download the file from github? Sounds like an encoding error has been introduced.

Willo3092
19-11-21, 10:54
Welcome to OpenViX for sf8008
openvix 6.0 sf8008

sf8008 login: root
Password:
root@sf8008:~# sed -i 's/\x0//g' /usr/lib/enigma2/python/Components/MovieList.py
root@sf8008:~#


I went to the file on github and switched to raw and copied and pasted the whole lot to MovieList.py


Is this the correct page for ViX 6.0 python components?

https://github.com/OpenViX/enigma2/tree/Dev-python3-compatible/lib/python


Sorry, I must have done something wrong. I just did the same from the above link and all is now working and sorting fine :thumbsup:

Willo3092
19-11-21, 11:21
@willo3092 and @ccs please get the output from "cat /proc/mounts".



Welcome to OpenViX for sf8008
openvix 6.0 sf8008

sf8008 login: root
Password:
Last login: Fri Nov 19 10:06:42 GMT 2021 on pts/0
root@sf8008:~# cat /proc/mounts
/dev/mmcblk0p16 / ext4 rw,relatime,data=ordered 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=469304k,nr_inodes=117326,mode=755 0 0
tmpfs /media tmpfs rw,relatime,size=64k,nr_inodes=117395 0 0
tmpfs /var/volatile tmpfs rw,relatime,size=469580k,nr_inodes=117395 0 0
/dev/sdd1 /media/hdd ext4 rw,relatime,data=ordered 0 0
/dev/mmcblk0p3 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,ioc harset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
/etc/auto.network /media/autofs autofs rw,relatime,fd=6,pgrp=2016,timeout=5,minproto=5,ma xproto=5,indirect 0 0
tmpfs /newroot tmpfs rw,relatime 0 0
root@sf8008:~#


All network mounts look fine in mount manager:

62852

I can access all of them from movie list but can't use as a recording location on ViX 6.0 but I can on ViX 5.4.

Huevos
19-11-21, 11:23
Probably running my "sed" command repaired the file.

ccs
19-11-21, 11:29
@willo3092 and @ccs please get the output from "cat /proc/mounts".



root@vuultimo4k:~# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext4 rw,relatime,nodelalloc,data=journal 0 0
devtmpfs /dev devtmpfs rw,relatime,size=799672k,nr_inodes=85983,mode=755 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
tmpfs /media tmpfs rw,relatime,size=64k 0 0
tmpfs /var/volatile tmpfs rw,relatime 0 0
/dev/sda1 /media/hdd ext4 rw,relatime,data=ordered 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
nfsd /proc/fs/nfsd nfsd rw,relatime 0 0
/etc/auto.network /media/autofs autofs rw,relatime,fd=6,pgrp=1675,timeout=5,minproto=5,ma xproto=5,indirect 0 0
root@vuultimo4k:~#





root@vuultimo4k:~# cat /etc/auto.network
# automounter configuration
ET10000 -fstype=nfs,rw,nolock,tcp,nfsvers=3,rsize=8192,wsiz e=8192,timeo=14,soft 192.168.1.132:/media/hdd/movie
SYNOLOGY -fstype=nfs,rw,nolock,tcp,nfsvers=3,rsize=8192,wsiz e=8192,timeo=14,soft 192.168.1.115:/volume1/ET10000
root@vuultimo4k:~#



root@vuultimo4k:~# nfsstat -o all
Server packet stats:
packets udp tcp tcpconn
0 0 0 0

Server rpc stats:
calls badcalls badfmt badauth badclnt
0 0 0 0 0

Server reply cache:
hits misses nocache
0 0 0

Server io stats:
read write
0 0

Server read ahead cache:
size 0-10% 10-20% 20-30% 30-40% 40-50% 50-60% 60-70% 70-80% 80-90% 90-100% notfound
32 0 0 0 0 0 0 0 0 0 0 0

Server file handle cache:
lookup anon ncachedir ncachenondir stale
0 0 0 0 0

Client packet stats:
packets udp tcp tcpconn
0 0 0 0

Client rpc stats:
calls retrans authrefrsh
432 0 432

Client nfs v3:
null getattr setattr lookup access
0 0% 152 35% 0 0% 38 8% 115 26%
readlink read write create mkdir
0 0% 63 14% 0 0% 0 0% 0 0%
symlink mknod remove rmdir rename
0 0% 0 0% 0 0% 0 0% 0 0%
link readdir readdirplus fsstat fsinfo
0 0% 0 0% 49 11% 3 0% 6 1%
pathconf commit
3 0% 0 0%

root@vuultimo4k:~#



root@vuultimo4k:~# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext4 (rw,relatime,nodelalloc,data=journal)
devtmpfs on /dev type devtmpfs (rw,relatime,size=799672k,nr_inodes=85983,mode=755 )
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tmpfs on /media type tmpfs (rw,relatime,size=64k)
tmpfs on /var/volatile type tmpfs (rw,relatime)
/dev/sda1 on /media/hdd type ext4 (rw,relatime,data=ordered)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/etc/auto.network on /media/autofs type autofs (rw,relatime,fd=6,pgrp=1675,timeout=5,minproto=5,m axproto=5,indirect)
root@vuultimo4k:~#

Huevos
19-11-21, 11:32
I can access all of them from movie list but can't use as a recording location on ViX 6.0 but I can on ViX 5.4.So, here...
https://github.com/OpenViX/enigma2/blob/Dev-python3-compatible/lib/python/Screens/Timeshift.py#L72

Add "autofs". And restart enigma.

Go in timeshiftsetup and see if it allows you to set up timeshift onto your NAS.

Willo3092
19-11-21, 11:47
62853

Hangs when rebooting

Huevos
19-11-21, 13:00
62853

Hangs when rebootingYou have broken the file somehow, or it is missing.

It is supposed to look like this:

supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'autofs')

birdman
19-11-21, 13:25
So, here...
https://github.com/OpenViX/enigma2/blob/Dev-python3-compatible/lib/python/Screens/Timeshift.py#L72

Add "autofs". And restart enigma.AFAIR "autofs" just shows for an autofs mountpoint. When you actually get a network file-system mounted there it will show up with whatever network protocol is used, so nfs (nfs3/nfs4?) or smb (cifs?).

birdman
19-11-21, 13:36
e.g.:


//samba.lacknet/GordonBackup on /var/volatile/tmp/x type cifs (rw,relatime,vers=
3.02,sec=ntlmssp,cache=strict,username=Gordon,doma in=,uid=0,noforceuid,gid=0,nof
orcegid,addr=192.168.1.242,file_mode=0755,dir_mode =0755,nounix,serverino,mapposi
x,rsize=1048576,wsize=1048576,echo_interval=60,act imeo=1)

(attempt to mount that using smb3 failed with, "mount error: smb3 filesystem not supported by the system")

Huevos
19-11-21, 13:41
So why don't their NAS mounts show in "cat /proc/mounts"?

Look at their posts #47 and #49.

ccs
19-11-21, 14:02
That's weird, I hadn't noticed that but ViX 6.0.002 won't let you select that as a recording path any more. I have used that as my default path for the last 5 years.
It WILL let you select it from the 'Edit autotimer defaults' though and that is where my box is recording to.

62846

I don't see any NAS options in "autotimer defaults"62854

but do in recordings & timeshift/recording and playback, where there are 2 SYNOLOGY's. 62855

Maybe I need to bookmark it first, but which one??

I bookmarked ET10000 and now it shows where expected, including default movie location and autotimer default location.

Huevos
19-11-21, 14:19
I don't see any NAS options in "autotimer defaults"62854

but do in recordings & timeshift/recording and playback, where there are 2 SYNOLOGY's. 62855

Maybe I need to bookmark it first, but which one??

I bookmarked ET10000 and now it shows where expected, including default movie location and autotimer default location.

And can you set it up?

ccs
19-11-21, 14:39
And can you set it up?

Changing autotimer default location to /media/autofs/ET10000 is working, now recording to the ET10K's default movielist.

Changing default movielocation to ET10000 isn't doing anything, list still comes up with /media/hdd/movie (despite rebooting).

Changing timer location in recording and playback also works.

Willo3092
19-11-21, 14:45
You have broken the file somehow, or it is missing.

It is supposed to look like this:

supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'autofs')

This is the raw page:

https://raw.githubusercontent.com/OpenViX/enigma2/Dev-python3-compatible/lib/python/Screens/Timeshift.py

I have replaced the original with supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'autofs') but still not booting.

62856

ccs
19-11-21, 14:52
Looks like a typo...


13:45:05.4369 File "/usr/lib/enigma2/python/Components/Timeshift.py", line 72
13:45:05.4369 supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'autofs')
13:45:05.4373 ^
13:45:05.4374 IndentationError: unindent does not match any outer indentation level
13:45:05.4417 [eDVBDB] ---- saving lame channel db
13:45:05.4478 [eDVBDB] saved 63 channels and 513 services!
13:45:05.4578 [eDVBResourceManager] release cached channel (timer timeout)

Willo3092
19-11-21, 15:04
This is what I have now


def isValidPartition(self, path):
if path is not None:
supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'autofs')
valid_partitions = []
for partition in Components.Harddisk.harddiskmanager.getMountedPart itions():
if partition.filesystem() in supported_filesystems:
valid_partitions.append(partition.mountpoint)
print("[" + self.__class__.__name__ + "] valid partitions", valid_partitions)
if valid_partitions:
return Components.Harddisk.findMountPoint(realpath(path)) +'/' in valid_partitions or Components.Harddisk.findMountPoint(realpath(path)) in valid_partitions
return False


But looks different in the py file

62857

Huevos
19-11-21, 16:00
Why are you mixing up spaces and tabs?

ccs
19-11-21, 16:00
supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'autofs') should line up with valid_partitions = []

Huevos
19-11-21, 16:07
I don't see any NAS options in "autotimer defaults"62854

but do in recordings & timeshift/recording and playback, where there are 2 SYNOLOGY's. 62855

Maybe I need to bookmark it first, but which one??

I bookmarked ET10000 and now it shows where expected, including default movie location and autotimer default location.

Can we stick with enigma and not autotimer. I'm starting to get confused. Question was are you able to set up the NAS as a recording location in Recordings or Timeshift.

Willo3092
19-11-21, 16:14
Why are you mixing up spaces and tabs?

Because I'm a moron. This is the Timeshift.py that I'm using if you can see what I've done wrong?
I just added , 'autofs' manually.

62858

62859

ccs
19-11-21, 16:26
Can we stick with enigma and not autotimer. I'm starting to get confused. Question was are you able to set up the NAS as a recording location in Recordings or Timeshift.

Add timer from epg and instant record both work, no additional options show up in timeshift location to save to NAS.

List still shows /media/hdd/movie.

These are the only changes (first 3 settings).

62860

ccs
19-11-21, 16:32
Because I'm a moron. This is the Timeshift.py that I'm using if you can see what I've done wrong?
I just added , 'autofs' manually.

62858

62859

Timeshift.py now looks ok, you've now hit a runtime error.

twol
19-11-21, 16:47
Because I'm a moron. This is the Timeshift.py that I'm using if you can see what I've done wrong?
I just added , 'autofs' manually.

62858

62859

You have mixed up compnents/timeshift and screens/timeshift. ????

Willo3092
19-11-21, 17:02
You have mixed up compnents/timeshift and screens/timeshift. ????

So I had, sorry.
Still getting not valid partition though.

62861

ccs
19-11-21, 17:23
Just guessing, maybe change nfs to nfsd ?




root@vuultimo4k:~# df -Ta
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/root ext4 3655616 413792 3036412 12% /
devtmpfs devtmpfs 799672 4 799668 0% /dev
proc proc 0 0 0 0% /proc
sysfs sysfs 0 0 0 0% /sys
debugfs debugfs 0 0 0 0% /sys/kernel/debug
tmpfs tmpfs 64 0 64 0% /media
tmpfs tmpfs 807996 220 807776 0% /var/volatile
/dev/sda1 ext4 975558636 828294904 147247348 85% /media/hdd
devpts devpts 0 0 0 0% /dev/pts
fusectl fusectl 0 0 0 0% /sys/fs/fuse/connections
nfsd nfsd 0 0 0 0% /proc/fs/nfsd
/etc/auto.network autofs 0 0 0 0% /media/autofs
root@vuultimo4k:~#

Willo3092
19-11-21, 17:37
Just guessing, maybe change nfs to nfsd ?
[/CODE]

That didn't work I'm afraid.

Commenting out all references to 'IsValidPartition' works for timeshift though.


def pathStatus(self, path):
if not isdir(path):
self.errorItem = self["config"].getCurrentIndex()
footnote = _("Directory '%s' does not exist!") % path
green = ""
# elif not self.isValidPartition(path):
# self.errorItem = self["config"].getCurrentIndex()
# footnote = _("Directory '%s' not valid. Partition must be ext or nfs") % path
# green = ""
elif not fileExists(path, "w"):
self.errorItem = self["config"].getCurrentIndex()
footnote = _("Directory '%s' not writeable!") % path
green = ""
elif not self.hasHardLinks(path): # Timeshift requires a hardlinks
self.errorItem = self["config"].getCurrentIndex()
footnote = _("Directory '%s' is not hard links capable!") % path
green = ""
else:
self.errorItem = -1
footnote = ""
green = self.greenText
self.setFootnote(footnote)
self["key_green"].text = green

# def isValidPartition(self, path):
# if path is not None:
# supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'autofs')
# valid_partitions = []
# for partition in Components.Harddisk.harddiskmanager.getMountedPart itions():
# if partition.filesystem() in supported_filesystems:
# valid_partitions.append(partition.mountpoint)
# print("[" + self.__class__.__name__ + "] valid partitions", valid_partitions)
# if valid_partitions:
# return Components.Harddisk.findMountPoint(realpath(path)) +'/' in valid_partitions or Components.Harddisk.findMountPoint(realpath(path)) in valid_partitions
# return False


Well it gets rid of the message, timeshift doesn't work using the NAS

ccs
19-11-21, 17:43
.... so it looks like supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'autofs') still isn't including the right filesystem.

How good are you at print statements?

Willo3092
19-11-21, 17:47
.... so it looks like supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'autofs') still isn't including the right filesystem.

How good are you at print statements?

I will have a go if you tell me what to do

twol
19-11-21, 17:48
Actually this may be an issue depending on how the Synology is setup e.g. ext4 or btrfs file system. The latter doesn‘t support hardlinks which are needed by Timeshift. I guess its fine for Recording but ???

ccs
19-11-21, 17:50
I will have a go if you tell me what to do

I think you'll have to wait until someone (alot) more knowledgeable can advise, I understand the theory, but the practice is another matter.

Willo3092
19-11-21, 17:56
Actually this may be an issue depending on how the Synology is setup e.g. ext4 or btrfs file system. The latter doesn‘t support hardlinks which are needed by Timeshift. I guess its fine for Recording but ???

I'm certain that everything is Ext4. Trouble is there is no Storage Manager in the latest firmware and I cant find out where it would tell me.

62862

twol
19-11-21, 18:00
That didn't work I'm afraid.

Commenting out all references to 'IsValidPartition' works for timeshift though.


def pathStatus(self, path):
if not isdir(path):
self.errorItem = self["config"].getCurrentIndex()
footnote = _("Directory '%s' does not exist!") % path
green = ""
# elif not self.isValidPartition(path):
# self.errorItem = self["config"].getCurrentIndex()
# footnote = _("Directory '%s' not valid. Partition must be ext or nfs") % path
# green = ""
elif not fileExists(path, "w"):
self.errorItem = self["config"].getCurrentIndex()
footnote = _("Directory '%s' not writeable!") % path
green = ""
elif not self.hasHardLinks(path): # Timeshift requires a hardlinks
self.errorItem = self["config"].getCurrentIndex()
footnote = _("Directory '%s' is not hard links capable!") % path
green = ""
else:
self.errorItem = -1
footnote = ""
green = self.greenText
self.setFootnote(footnote)
self["key_green"].text = green

# def isValidPartition(self, path):
# if path is not None:
# supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'autofs')
# valid_partitions = []
# for partition in Components.Harddisk.harddiskmanager.getMountedPart itions():
# if partition.filesystem() in supported_filesystems:
# valid_partitions.append(partition.mountpoint)
# print("[" + self.__class__.__name__ + "] valid partitions", valid_partitions)
# if valid_partitions:
# return Components.Harddisk.findMountPoint(realpath(path)) +'/' in valid_partitions or Components.Harddisk.findMountPoint(realpath(path)) in valid_partitions
# return False


Well it gets rid of the message, timeshift doesn't work using the NAS

So debug log should (hopefully) say why its not using it as Tineshift device

ccs
19-11-21, 18:08
I'm certain that everything is Ext4. Trouble is there is no Storage Manager in the latest firmware and I cant find out where it would tell me.

Storage Manager still on my Synology (Main Menu)...

62863

Willo3092
19-11-21, 18:32
Storage Manager still on my Synology (Main Menu)...

62863

Is that DSM 7.0.1?

I've found Storage Analyser

62864

My recordings folder is on Volume 1 though :confused:

Willo3092
19-11-21, 18:33
So debug log should (hopefully) say why its not using it as Tineshift device

Will try shortly, I have been summoned.

ccs
19-11-21, 18:43
Is that DSM 7.0.1?

My recordings folder is on Volume 1 though :confused:

Yes, I included it the attachment.:)

As a matter of interest, what do you have Maximum NFS protocol: set to ??

Willo3092
19-11-21, 19:17
Yes, I included it the attachment.:)

As a matter of interest, what do you have Maximum NFS protocol: set to ??

NFSv3, does it need to be 4? (bearing in mind everything works fine in ViX 5.4).

I've finally found Storage Manager and all drives are Ext4.

I also have no sub directories for my shared drives in /media/autofs/ although timer recordings are still working to my network mount okay.

This is the debug when enabling timeshift to the network:

62866

ccs
19-11-21, 19:52
I've had it set to NFSv3 for ages, but 2 days ago, after wasting hours trying to get nfs mounts to work again, I changed it to v4 and they immediately started working again.

One box stopped working a few hours later, but today they're both ok. I'd expect v3 to be the correct setting as ViX appears to be using v3, and so avoids any re-negotiating.

Answers on a postcard.....

BrokenUnusableAccount
19-11-21, 19:54
I went to the file on github and switched to raw and copied and pasted the whole lot to MovieList.py

To avoid pasting I always switch to raw and right click and save page as...

How did you "pasted the whole lot to MovieList.py"?

Willo3092
19-11-21, 20:09
To avoid pasting I always switch to raw and right click and save page as...

How did you "pasted the whole lot to MovieList.py"?

Opened MovieList.py in Notepad++ and CTRL A > DELETE then pasted the whole contents of the raw page.
Never thought of doing it your way. Will try it next time.

Willo3092
19-11-21, 20:18
I have flashed ViX 6.0.022 with no settings backup.
I've added one of my network shares as fstab rather than autofs and the sub-folder now appears in /media/net/ and I can access the files on it.
It still won't let me add the share as a recording or timeshift location and says that the directory is not valid. Partition must be ext of nfs.
I can however set it as the default autotimer recording location and it does record to it.

twol
19-11-21, 20:30
Debug log …… 18:06:14.5904 [Timeshift] TimeshiftPath: Current='/media/hdd/timeshift/', Default='/media/hdd/timeshift/', Choices='['/media/hdd/timeshift/', '/media/autofs/RECORDINGS/', '/media/autofs/SERIES-BACKUP/']'

Willo3092
19-11-21, 20:44
I just ran Timeshift.py from ViX 5.4 through an online python 3 converter and that works.
It allows me to select the NAS as a timeshift location and I can see the timeshift files on the NAS. Rewinding live TV works.

Attached here:

62868

Is it just a matter of comparing the 2 versions and seeing what is different or is it going to be totally different?

birdman
19-11-21, 20:45
So why don't their NAS mounts show in "cat /proc/mounts"?Because they aren't currently mounted.
autofs works by mounting it for you when you try to access it. It then tries to unmount it every 10 mins (default?) and doesn't worry if it fails - just means it's in use.
The object is to only have things mounted when they are in use, so as not to have too many mountpoints. The place I worked had (potentially) ~5000 automount points - you didn't (== couldn't) mount them all at the same time.
It worked OK.

birdman
19-11-21, 20:48
So why don't their NAS mounts show in "cat /proc/mounts"?
The relevant thing is that "autofs" is not a valid file-system to record to, as it has no space. It just what the automount daemon controls to do actual mounting of real file-systems.
It should be "nfs" and "cifs".

birdman
19-11-21, 20:50
Why are you mixing up spaces and tabs?Because use of tabs is silly (what it represents is undefined).
Python standard is actually 4 spaces.

ccs
19-11-21, 20:52
Because they aren't currently mounted.
autofs works by mounting it for you when you try to access it. It then tries to unmount it every 10 mins (default?) and doesn't worry if it fails - just means it's in use.
The object is to only have things mounted when they are in use, so as not to have too many mountpoints. The place I worked had (potentially) ~5000 automount points - you didn't (== couldn't) mount them all at the same time.
It worked OK.

...I thought I'd got the NAS movielist open when I posted /proc/mounts earlier.

Anyway, now playing a recording....


root@vuultimo4k:~# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext4 rw,relatime,nodelalloc,data=journal 0 0
devtmpfs /dev devtmpfs rw,relatime,size=799672k,nr_inodes=85983,mode=755 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
tmpfs /media tmpfs rw,relatime,size=64k 0 0
tmpfs /var/volatile tmpfs rw,relatime 0 0
/dev/sda1 /media/hdd ext4 rw,relatime,data=ordered 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
nfsd /proc/fs/nfsd nfsd rw,relatime 0 0
/etc/auto.network /media/autofs autofs rw,relatime,fd=6,pgrp=1674,timeout=5,minproto=5,ma xproto=5,indirect 0 0
192.168.1.115:/volume1/ET10000 /media/autofs/SYNOLOGY nfs rw,relatime,vers=3,rsize=8192,wsize=8192,namlen=25 5,soft,nolock,proto=tcp,timeo=14,retrans=2,sec=sys ,mountaddr=192.168.1.115,mountvers=3,mountproto=tc p,local_lock=all,addr=192.168.1.115 0 0
root@vuultimo4k:~#

birdman
19-11-21, 20:52
Just guessing, maybe change nfs to nfsd ?No. That's something completely different.

birdman
19-11-21, 20:55
Actually this may be an issue depending on how the Synology is setup e.g. ext4 or btrfs file system. The latter doesn‘t support hardlinks which are needed by Timeshift. I guess its fine for Recording but ???btrfs supports hardlinks.


[gmllaptop]: cd gml4410/
/media/gml4410/LocalBackup/gml4410
[gmllaptop]: touch FILE
[gmllaptop]: ln FILE LINK
[gmllaptop]: ls -l FILE LINK
-rw-r--r-- 2 gml4410 ukgcs 0 Nov 19 19:53 FILE
-rw-r--r-- 2 gml4410 ukgcs 0 Nov 19 19:53 LINK
[gmllaptop]: df -T /media/gml4410/LocalBackup/
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/nvme0n1p12 btrfs 83007488 26018496 56695056 32% /media/gml4410/LocalBack
up

birdman
19-11-21, 20:57
I'm certain that everything is Ext4. Trouble is there is no Storage Manager in the latest firmware and I cant find out where it would tell me.Can you login to a command line there?
If so, type:

df -T

Willo3092
19-11-21, 20:58
It does say the Mount Type is a CIFS share.

62869

birdman
19-11-21, 20:59
I also have no sub directories for my shared drives in /media/autofs/ although timer recordings are still working to my network mount okay.Unless you have ghosting configured they only appear as required (and disappear when not).

Willo3092
19-11-21, 20:59
Can you login to a command line there?
If so, type:

df -T

I did actually find the Storage Manager and all drives are Ext4

birdman
19-11-21, 21:00
I've had it set to NFSv3 for ages, but 2 days ago, after wasting hours trying to get nfs mounts to work again, I changed it to v4 and they immediately started working again.nfsv4 added id mapping between domains. Not really needed in this set-up.

birdman
19-11-21, 21:03
I just ran Timeshift.py from ViX 5.4 through an online python 3 converter and that works.
....
Is it just a matter of comparing the 2 versions and seeing what is different or is it going to be totally different?v6 does a file-system type check.
But if the location isn't isn't yet mounted (because it will be automounted) it might show up as an invalid filesystem?

Willo3092
19-11-21, 21:07
Unless you have ghosting configured they only appear as required (and disappear when not).

Yes, you're right. I used to mount my shares with fstab and the shares were always visible in /media/net/

Just checked by playing a recording on the NAS and the RECORDINGS folder has appeared in /media/autofs/

It does say 'mount when needed' in Mount Manager. :o

Willo3092
19-11-21, 21:14
v6 does a file-system type check.
But if the location isn't isn't yet mounted (because it will be automounted) it might show up as an invalid filesystem?

I've just tried to set timeshift to the NAS AFTER starting to play a recording but still gives an error about partition type.

ccs
19-11-21, 21:19
Because use of tabs is silly (what it represents is undefined).
Python standard is actually 4 spaces.

Me again, this is a snapshot of notepad++ editing a .py file (the language is set to python). I've added some tabs and spaces, neither of which correspond to line 21. :confused:

A single press of the delete key, positioned before def on line 21 removes all of "---->" (4 characters.)

62870

BrokenUnusableAccount
19-11-21, 23:22
Opened MovieList.py in Notepad++ and CTRL A > DELETE then pasted the whole contents of the raw page.
AFAIK that should be fine as long as it ends up as a Linux format text file (not Windoze or Mac) by the time it reaches the box.
I imagine that if you started with the old contents of the file it'll happen automatically.

Willo3092
19-11-21, 23:45
I've started checking the EOL format before I save files now.

birdman
20-11-21, 02:40
I've just tried to set timeshift to the NAS AFTER starting to play a recording but still gives an error about partition type.But what is in your valid list?
It needs to have nfs and cifs (and nfs4?), not autofs.
(Assuming timeshift works on cifs - recordings do).

Willo3092
20-11-21, 09:18
But what is in your valid list?
It needs to have nfs and cifs (and nfs4?), not autofs.
(Assuming timeshift works on cifs - recordings do).

Just added cifs to the list and it works:


supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'cifs')

Do we need to do the same for Recordings.py and PluginBrowser.py?

62873

EDIT: Just added cifs to Recordings.py and I can now record to the NAS as well :thumbsup:

ccs
20-11-21, 09:40
What does cat /proc/mounts show when timeshift is active?

Are you running Samba ?

Willo3092
20-11-21, 09:55
What does cat /proc/mounts show when timeshift is active?

Are you running Samba ?

Yes, I'm running Samba:



Welcome to OpenViX for sf8008
openvix 6.0 sf8008

sf8008 login: root
Password:
root@sf8008:~# cat /proc/mounts
/dev/mmcblk0p16 / ext4 rw,relatime,data=ordered 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=469304k,nr_inodes=117326,mode=755 0 0
tmpfs /media tmpfs rw,relatime,size=64k,nr_inodes=117395 0 0
tmpfs /var/volatile tmpfs rw,relatime,size=469580k,nr_inodes=117395 0 0
/dev/sdd1 /media/hdd ext4 rw,relatime,data=ordered 0 0
/dev/mmcblk0p3 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,ioc harset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
/etc/auto.network /media/autofs autofs rw,relatime,fd=6,pgrp=2019,timeout=5,minproto=5,ma xproto=5,indirect 0 0
//192.168.0.240/Recordings /media/autofs/RECORDINGS cifs rw,relatime,vers=2.0,sec=ntlmssp,cache=strict,user name=Willo3092,domain=DS916PLUS,uid=0,noforceuid,g id=0,noforcegid,addr=192.168.0.240,file_mode=0755, dir_mode=0755,iocharset=utf8,nounix,serverino,mapp osix,rsize=65536,wsize=65536,actimeo=1 0 0
root@sf8008:~#

Huevos
20-11-21, 09:56
Because I'm a moron. This is the Timeshift.py that I'm using if you can see what I've done wrong?
I just added , 'autofs' manually.

62858

62859

Not sure. No new line at the end of the file?

Huevos
20-11-21, 10:11
Yes, I'm running Samba:



Welcome to OpenViX for sf8008
openvix 6.0 sf8008

sf8008 login: root
Password:
root@sf8008:~# cat /proc/mounts
/dev/mmcblk0p16 / ext4 rw,relatime,data=ordered 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
devtmpfs /dev devtmpfs rw,relatime,size=469304k,nr_inodes=117326,mode=755 0 0
tmpfs /media tmpfs rw,relatime,size=64k,nr_inodes=117395 0 0
tmpfs /var/volatile tmpfs rw,relatime,size=469580k,nr_inodes=117395 0 0
/dev/sdd1 /media/hdd ext4 rw,relatime,data=ordered 0 0
/dev/mmcblk0p3 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,ioc harset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620 0 0
/etc/auto.network /media/autofs autofs rw,relatime,fd=6,pgrp=2019,timeout=5,minproto=5,ma xproto=5,indirect 0 0
//192.168.0.240/Recordings /media/autofs/RECORDINGS cifs rw,relatime,vers=2.0,sec=ntlmssp,cache=strict,user name=Willo3092,domain=DS916PLUS,uid=0,noforceuid,g id=0,noforcegid,addr=192.168.0.240,file_mode=0755, dir_mode=0755,iocharset=utf8,nounix,serverino,mapp osix,rsize=65536,wsize=65536,actimeo=1 0 0
root@sf8008:~#


Why didn't your post #47 show the "cifs" mount?

Have you got "unix extensions" enabled in "smb.conf"? Turn it on.

Add "cifs" to validpartitions in Timeshift.py with "unix extensions" enabled and check it works. For Timeshift hardlinks are absolutely required, so we must see this working in timeshift setup.

ccs
20-11-21, 10:26
Unix extensions are off by default, the line unix extensions = Yes would need adding to /etc/samba/smb-user.conf.

Willo3092
20-11-21, 10:47
Why didn't your post #47 show the "cifs" mount?

Does it only show when it's in use? It only appears in /media/autofs/ when I'm actually using it.


Have you got "unix extensions" enabled in "smb.conf"? Turn it on.

No I haven't, I've never needed to touch that in the past. I'll try it.


Add "cifs" to validpartitions in Timeshift.py with "unix extensions" enabled and check it works. For Timeshift hardlinks are absolutely required, so we must see this working in timeshift setup.

I've added cifs in Timeshift.py and Recordings.py and I can now use the NAS share for timeshift and recordings and both confirmed working.

Willo3092
20-11-21, 10:53
Unix extensions are off by default, the line unix extensions = Yes would need adding to /etc/samba/smb-user.conf.

Just at the bottom or in a particular section?

ccs
20-11-21, 11:10
Just at the bottom or in a particular section?

Mine looks like this with one extra line highlighted....


root@vuultimo4k:/etc/samba# cat smb-user.conf
## User changes to Samba config go here

## You can overrule the insecure defaults and enforce password
## protected access to shares by uncommenting the following
## line, including the secure settings:

[global]
# include = /etc/samba/distro/smb-secure.conf
disable netbios = No

## You can hide and veto access to certain directories, e.g. mount points of
## other boxes in order to prevent round trips through your LAN
## In Samba 4.x this needs to be configured per share:

[Root]
# veto files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/
# hide files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/

[Harddisk]
# veto files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/
# hide files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/
root@vuultimo4k:/etc/samba#

Willo3092
20-11-21, 11:15
Mine looks like this with one extra line highlighted....


root@vuultimo4k:/etc/samba# cat smb-user.conf
## User changes to Samba config go here

## You can overrule the insecure defaults and enforce password
## protected access to shares by uncommenting the following
## line, including the secure settings:

[global]
# include = /etc/samba/distro/smb-secure.conf
disable netbios = No

## You can hide and veto access to certain directories, e.g. mount points of
## other boxes in order to prevent round trips through your LAN
## In Samba 4.x this needs to be configured per share:

[Root]
# veto files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/
# hide files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/

[Harddisk]
# veto files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/
# hide files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/
root@vuultimo4k:/etc/samba#

So where does this line go? :confused:


Unix extensions are off by default, the line unix extensions = Yes would need adding to /etc/samba/smb-user.conf.

ccs
20-11-21, 11:16
Just put it where I added my extra line.

Willo3092
20-11-21, 11:19
Do I need both lines?


## User changes to Samba config go here

## You can overrule the insecure defaults and enforce password
## protected access to shares by uncommenting the following
## line, including the secure settings:

[global]
# include = /etc/samba/distro/smb-secure.conf
disable netbios = No
unix extensions = Yes

## You can hide and veto access to certain directories, e.g. mount points of
## other boxes in order to prevent round trips through your LAN
## In Samba 4.x this needs to be configured per share:

[Root]
# veto files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/
# hide files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/

[Harddisk]
# veto files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/
# hide files = /ThisBox/OtherBox/AnotherBox/YetAnotherBox/

ccs
20-11-21, 11:24
I added disable netbios = No so that network browser could see my other ViX box.

If you haven't set it you probably don't need it.

My Vix boxes and NAS use nfs, apologies, as I had assumed you were using nfs as well for quite some time in this thread.

I'll try out my setup when the dust has settled.

Willo3092
20-11-21, 11:36
Aah, no all my boxes connect to the NAS only. I don't need them to see each other.
All my autotimers are set to record to the NAS on a box that otherwise is rarely used and I use the main box to set one-off recordings and instant recordings.

All the boxes have the NAS shares mounted as AutoFS CIFS and I have configured the coloured buttons in Movie Selection to switch between shares.

62874

Huevos
20-11-21, 13:54
I can now use the NAS share for timeshift and recordings and both confirmed working.Is this with "unix_extensions" enabled or not. Please check timeshift actually works with no error messages in timeshift or permanent timeshift.

Willo3092
20-11-21, 14:11
I haven't changed anything in smb-user.conf unless you want me to try it.

Timeshift and recordings are working fine to my NAS now and I have confirmed that both work okay.

This is by adding the cifs option to Timeshift.py and Recordings.py.

Will this be updated in the ViX image or will I need to include the files in my backup settings? I appreciate that very few people record to a NAS.

birdman
20-11-21, 23:24
Unix extensions are off by default, the line unix extensions = Yes would need adding to /etc/samba/smb-user.conf.This is something you'd need to do on the server, as well as the Vix box.

But it is on by default...

unix extensions (G)

This boolean parameter controls whether Samba implements the CIFS UNIX extensions, as defined by HP. These extensions enable Samba to better serve UNIX CIFS clients by supporting features such as symbolic links, hard links, etc... These extensions require a similarly enabled client, and are of no current use to Windows clients.
Note if this parameter is turned on, the wide links parameter will automatically be disabled.
See the parameter allow insecure wide links if you wish to change this coupling between the two parameters.
Default: unix extensions = yes

birdman
20-11-21, 23:27
Does it only show when it's in use? It only appears in /media/autofs/ when I'm actually using it.That's correct.
The whole point about automount is that it mounts on request. And unmounts when no longer in use.

Willo3092
20-11-21, 23:32
All working now anyway. Thanks to everyone for the help :thumbsup:

ccs
21-11-21, 09:39
This is something you'd need to do on the server, as well as the Vix box.

But it is on by default...

unix extensions (G)

This boolean parameter controls whether Samba implements the CIFS UNIX extensions, as defined by HP. These extensions enable Samba to better serve UNIX CIFS clients by supporting features such as symbolic links, hard links, etc... These extensions require a similarly enabled client, and are of no current use to Windows clients.
Note if this parameter is turned on, the wide links parameter will automatically be disabled.
See the parameter allow insecure wide links if you wish to change this coupling between the two parameters.
Default: unix extensions = yes
No, it's off by default on ViX, and my Synology Nas makes no reference to it, one way or the other in its configs or gui, so maybe it is on.

ViX default...

root@vuultimo4k:/etc/samba/distro# ls -l smb-global.conf
-rw-r--r-- 1 root root 1516 Nov 9 20:37 smb-global.conf
root@vuultimo4k:/etc/samba/distro#


root@vuultimo4k:/etc/samba/distro# cat smb-global.conf
[global]
# CVE-1999-0519 and CVE-2000-1200
access based share enum = yes
restrict anonymous = 2

disable netbios = Yes
min protocol = SMB2_02
smb ports = 445
ntlm auth = yes

workgroup = WORKGROUP
security = USER
guest account = nobody
map to guest = Bad User
username map = /etc/samba/private/users.map
min receivefile size = 16384
use sendfile = Yes
aio read size = 16384
aio write behind = true
aio write size = 16384
smb passwd file = /etc/samba/private/smbpasswd
passdb backend = smbpasswd
idmap config * : backend = tdb
obey pam restrictions = Yes
max stat cache size = 64
unix password sync = Yes
pam password change = Yes
server multi channel support = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# Disable printer support for now
disable spoolss = Yes
load printers = No
printcap name = /dev/null

unix extensions = No
allow insecure wide links = Yes

strict locking = no
oplocks = yes
kernel oplocks = yes

include = /etc/samba/distro/smb-branding.conf
include = /etc/samba/distro/smb-shares.conf
include = /etc/samba/distro/smb-vmc.conf

include = /etc/samba/smb-user.conf
root@vuultimo4k:/etc/samba/distro#

ccs
21-11-21, 10:04
That's correct.
The whole point about automount is that it mounts on request. And unmounts when no longer in use.

Mine doesn't show when I change the location in movielist to the NAS. I see a listing, but it only shows in/proc/mounts when I start playing a recording.

EDIT: It shows for a second or so after a reboot and then disappears, so that probably sets up /media/autofs/SYNOLOGY, the movielist.

birdman
21-11-21, 14:30
No, it's off by default on ViX,...Perhaps that should be changed, given that it is needed?
Or, if it's felt that the default needs to be off (why?), there should be a menu item to toggle it.

ccs
21-11-21, 15:26
Perhaps that should be changed, given that it is needed?
Or, if it's felt that the default needs to be off (why?), there should be a menu item to toggle it.

It's (unix extensions) been set to off for at least 4 years, maybe @Willo3092 can try it out? I'm setup differently (nfs) so can't oblige.

Willo3092
21-11-21, 15:33
It's (unix extensions) been set to off for at least 4 years, maybe @Willo3092 can try it out? I'm setup differently (nfs) so can't oblige.

What do you need me to do?

ccs
21-11-21, 15:37
What do you need me to do?

Start at post #114.

Maybe add two lines rather than just the one mentioned earlier...


unix extensions = Yes
allow insecure wide links = No

Willo3092
21-11-21, 15:50
Okay added both lines to the global section of smb-user.conf

Now all shares appear in /media/autofs/ using autofs CIFS

Is that what we're trying to achieve?

62875