Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £99! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £149! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[VU+ Duo4K SE] Cannot move up and down in a Setup screen

I get a different result. I tweaked the code:

Code:
for partition in Components.Harddisk.harddiskmanager.getMountedPartitions():     
       print("[Timeshift] DEBUG: path %s, mountpoint %s and filesystem %s" % (path, partition.mountpoint, partition.filesystem()))
       print("Valid", partition.filesystem() in supported_filesystems)                                                            
       if partition.filesystem() in supported_filesystems:                                                                        
             valid_partitions.append(partition.mountpoint)

These are the results in my log:

Code:
<   210.0182> [Timeshift] DEBUG: path /beast/, mountpoint / and filesystem ubifs
<   210.0202> Valid False
<   221.3488> [Timeshift] DEBUG: path /media/, mountpoint / and filesystem ubifs
<   221.3506> Valid False
<   224.8464> [Timeshift] DEBUG: path /e2/timeshift/, mountpoint / and filesystem ubifs
<   224.8483> Valid False
<   228.7765> [Timeshift] DEBUG: path /beast/enigma2/timeshift/, mountpoint / and filesystem ubifs
<   228.7786> Valid False

So the getMountedPartitions() function is not picking up my mounted NFS partition (/beast). Not sure why - trying to track down the getMountedPartitions function to see what's going on.

For reference, the partition does show up in mount:

Code:
172.30.1.2:/beast on /beast type nfs4 (rw,relatime,vers=4.0,rsize=8192,wsize=8192,namlen=255,soft,proto=tcp,port=0,timeo=14,retrans=2,sec=sys,clientaddr=172.30.1.18,local_lock=none,addr=172.30.1.2)

(and equivalent in df)
So using the attachment below:
Putty to receiver: init 4 (space between)
Filezilla: copy attachment to /usr/lib/enigma2/python/Components
Putty: init 6 (space between)

Post the debug log here.(do not zip log)
 

Attachments

Thanks - can you also mount via E2----------> menu/setup/Network/Mounts
and then run with a further updated Harddisk.py

First log is updated Harddisk.py with NFS mount through E2. I had specified nfsvers=4 in the mount options in E2, but then nfsvers=3 was added. Seems to mount with NFSv3. Getting errors that /media/net/beast/subdir is not writable (to see the data in the ZFS sets, you need to mount with nfsvers=4)
View attachment Enigma2_debug_2022-11-16_22-55-13.log

So I then edited /etc/fstab on my E2 box to remove the nfsvers=3 (and, therefore, leave nfsvers=4). Reboot and here's the log (sets now visible in shell but getting same errors about it not being ext/nfs partition)
View attachment Enigma2_debug_2022-11-16_23-01-41.log
 
Thanks… away until Sunday, so may not be able to do much until then … but will have a look later today at logs
 
First log is updated Harddisk.py with NFS mount through E2. I had specified nfsvers=4 in the mount options in E2, but then nfsvers=3 was added. Seems to mount with NFSv3. Getting errors that /media/net/beast/subdir is not writable (to see the data in the ZFS sets, you need to mount with nfsvers=4)
View attachment 64445

So I then edited /etc/fstab on my E2 box to remove the nfsvers=3 (and, therefore, leave nfsvers=4). Reboot and here's the log (sets now visible in shell but getting same errors about it not being ext/nfs partition)
View attachment 64444
so both logs show 224.5516> [RecordingSettings] valid partitions ['/media/net/beast/', '/media/net/beast'] from Records.py ----> isValidPartition (called by TimeShift & Recordings.py)
so where is it being rejected??? i.e. "Getting errors that /media/net/beast/subdir is not writable"
 
so both logs show 224.5516> [RecordingSettings] valid partitions ['/media/net/beast/', '/media/net/beast'] from Records.py ----> isValidPartition (called by TimeShift & Recordings.py)
so where is it being rejected??? i.e. "Getting errors that /media/net/beast/subdir is not writable"

Thanks for your help. After a lot of adding lines , rebooting and looking at logs, I think I've found the issue - though how to fix it, I'm not sure.

I added this into Recordings.py as part of isValidPartition

Code:
rp = realpath(path)
cp_rp = Components.Harddisk.findMountPoint(realpath(path))                                                                           
print("[Recordings] Path is: %s, realpath is: %s, realpath from findMountPoint: %s" % (path, rp, cp_rp))

Result is:

Code:
[Recordings] Path is: /e2/recordings/, realpath is: /media/net/beast/enigma2/recordings, realpath from findMountPoint: /media/net/beast/enigma2

The NFS mount in /etc/fstab is /media/net/beast - but nfs4 will result in each ZFS dataset displaying as a separate mount - hence the path doesn't match with the result from findMountPoint.

I have gone back through the source and I don't think the findMountPoint has changed in a long time so don't know why it worked for me in 5 but not in 6. My guess is it's some difference in how python3 deals with os.path
 
The NFS mount in /etc/fstab is /media/net/beast - but nfs4 will result in each ZFS dataset displaying as a separate mount - hence the path doesn't match with the result from findMountPoint.
An NFS mount should be just an NFS mount. How it actually exists on the server should be irrelevant.
My guess is it's some difference in how python3 deals with os.path
Difficult to see how someone would have made the code deliberately perverse.
But it's also interesting how realpath() converts it to the correct result.
 
Code:
	def isValidPartition(self, path):
		print("path", path)
		if path is not None:
			supported_filesystems = ('ext4', 'ext3', 'ext2', 'nfs', 'cifs', 'ntfs')
			valid_partitions = []
			for partition in Components.Harddisk.harddiskmanager.getMountedPartitions():
				if partition.filesystem() in supported_filesystems:
					valid_partitions.append(partition.mountpoint)
			print("[" + self.__class__.__name__ + "] valid partitions", valid_partitions)
			if valid_partitions:
				from os.path import abspath
				print("Components.Harddisk.findMountPoint(abspath(path))", Components.Harddisk.findMountPoint(abspath(path)))
				print("Components.Harddisk.findMountPoint(realpath(path))", Components.Harddisk.findMountPoint(realpath(path)))
				return Components.Harddisk.findMountPoint(realpath(path))+'/' in valid_partitions or Components.Harddisk.findMountPoint(realpath(path)) in valid_partitions
		return False

Please post debug.
 
Please post debug.

View attachment Enigma2_debug_2022-12-07_23-05-02_redact.log

I've cut it just after it picked up the log lines I added to Recordings.py. Interestingly, the getMountedPartition lines that twol added pick up both /media/net/beast and /media/net/beast/enigma2 (125.6412) in the dump but not in the individual lines (125.6425, 125.6428, 125.6432). I note valid_partitions has a double entry of ['/media/net/beast/', '/media/net/beast']. Wonder if /media/net/beast/enigma2 is getting cut down by some function.

nfs version 4 was mentioned. I think that will show up as nfs4.

Yes, correct. If I use nfs/nfs3, the datasets won't mount so I can effectively only get at the root directory. I have added ext4 to supported_filesystems (and it seems to work).
 
View attachment 64525

I've cut it just after it picked up the log lines I added to Recordings.py. Interestingly, the getMountedPartition lines that twol added pick up both /media/net/beast and /media/net/beast/enigma2 (125.6412) in the dump but not in the individual lines (125.6425, 125.6428, 125.6432). I note valid_partitions has a double entry of ['/media/net/beast/', '/media/net/beast']. Wonder if /media/net/beast/enigma2 is getting cut down by some function.



Yes, correct. If I use nfs/nfs3, the datasets won't mount so I can effectively only get at the root directory. I have added ext4 to supported_filesystems (and it seems to work).

This log is not from my debug.
 

OpenViX Feeds Status

Back
Top