Mountpoint "Use as HDD"

Moderators: Gully, peteru

Kezza52
Apprentice
Posts: 10
Joined: Mon Apr 06, 2015 11:09
Location: Central Coast NSW

Mountpoint "Use as HDD"

Post by Kezza52 » Fri Mar 19, 2021 12:35

Like to know what this option does?
I can record to my NAS with this option disabled. Enabling doesn't appear to make any difference.
Recently bought a Synology DS220j (to replace my ageing WD MyCloud) and want to use it for storage rather than the USB HDD attached to my V2.
Thanks
Kerry
Beyonwiz U4 + V2
Sony Bravia KD-65X9000H
Panasonic SC-BTT775
Synology DS220j 4TB NAS
WD MyCloud 4TB NAS
Logitech Harmony 650
Netcom N300 Router

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Fri Mar 19, 2021 14:40

Kezza52 wrote:
Fri Mar 19, 2021 12:35
Like to know what this option does?

If it is enabled on a share, it should make that share mount as /media/hdd instead of as a mount point under /media/autofs.

It is intended for use with Beyonwizes that run without a disk, and effectively says that that network share is the HDD. It helps minimise the configuration needed to set up a diskless PVR.
Kezza52 wrote:
Fri Mar 19, 2021 12:35
I can record to my NAS with this option disabled. Enabling doesn't appear to make any difference.

It does make a difference, but it's still perfectly possible to record to a network share without using it.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Kezza52
Apprentice
Posts: 10
Joined: Mon Apr 06, 2015 11:09
Location: Central Coast NSW

Re: Mountpoint "Use as HDD"

Post by Kezza52 » Sat Mar 20, 2021 08:55

I looked in media/hdd wasn't there, still in media/autofs.
I will check again. Thanks
Beyonwiz U4 + V2
Sony Bravia KD-65X9000H
Panasonic SC-BTT775
Synology DS220j 4TB NAS
WD MyCloud 4TB NAS
Logitech Harmony 650
Netcom N300 Router

Paul_oz53
Wizard
Posts: 2791
Joined: Sat Jun 13, 2009 02:34
Location: Melbourne

Re: Mountpoint "Use as HDD"

Post by Paul_oz53 » Sat Mar 20, 2021 12:55

Kezza52 wrote:
Sat Mar 20, 2021 08:55
I looked in media/hdd wasn't there, still in media/autofs.
I will check again. Thanks

Glad you asked because I've never used that setting. Instead, I explicitly identify the recording location in the recording settings.

Since all my boxes have HDDs the default is correct. Only ever briefly experimented with recording to the PC hard drives and then I used the mountpoint addresses.
__________________________________
Paul
Beyonwiz T4, 2 x U4: FW - 19.3 20211010
Samsung QA85Q80BAWXXY 4K TV
Samsung QA65Q80TAWXXY 4K TV
Samsung HW Q800BXY soundbar
OverlayHD 1.70, IceTV, Foxtel IQ4
2 x Win7 PCs, 2 x Win10 PCs
Denon AVR -X2400H

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Sat Mar 20, 2021 15:19

OK, my apologies. I didn't investigate thoroughly enough.

"Use as HDD replacement" only has any effect if "Mount using" is "FSTAB (mount at boot)" or "Enigma2 (mount using enigma2).

I have verified that if "Mount using" is "FSTAB (mount at boot)" and "Use as HDD replacement" is enabled, the network share does in fact mount on /media/hdd.

The "Use as HDD replacement" setting should probably only be shown if "Mount using" is not "AUTOFS (mount if needed)".
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Kezza52
Apprentice
Posts: 10
Joined: Mon Apr 06, 2015 11:09
Location: Central Coast NSW

Re: Mountpoint "Use as HDD"

Post by Kezza52 » Mon Mar 22, 2021 09:29

Thanks Peter,
I toyed with trying FSTAB, enigma2 and NFS, NAS/network didn't respond well.
My V2 has an SD card I use for timeshifting and GUI quicker.
I will stick with CFIS and set default recording location to my NAS which appears quicker than the USB drive.
I will do the same with my U4 so all recordings in the one place.
Cheers
Kerry
Beyonwiz U4 + V2
Sony Bravia KD-65X9000H
Panasonic SC-BTT775
Synology DS220j 4TB NAS
WD MyCloud 4TB NAS
Logitech Harmony 650
Netcom N300 Router

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: Mountpoint "Use as HDD"

Post by MrQuade » Mon Mar 22, 2021 09:42

If you are using an SD card, then you are far better off using that as HDD in my opinion.

That way the timeshift and settings backups will automatically go to the right place. It's not hard to then set the default recording location to the network share.
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Mon Mar 22, 2021 10:11

MrQuade wrote:
Mon Mar 22, 2021 09:42
If you are using an SD card, then you are far better off using that as HDD in my opinion.

+1
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Mountpoint "Use as HDD"

Post by Grumpy_Geoff » Mon Mar 22, 2021 11:01

There is an open issue in the OE-Alliance plugins repository for this issue with autofs mounts and "Use as HDD replacement" -
https://github.com/oe-alliance/enigma2- ... issues/337

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Mon Mar 22, 2021 11:49

I had a look at the pull request that's supposed to fix the problem, and I think it just makes it worse. It looks to me that it "fixes" the problem by removing the code that was supposed to implement "Use as HDD" for autofs, while adding the code that would be necessary to make it work. I.e. if the mount is autofs, and /mnt/hdd exists and isn't a mountpoint, do rmtree("/mnt/hdd"), and then create the symlink /mnt/hdd to point to the share mountpoint. The first part has been added, but the second part has been deleted from the code. I'm not sure how much the changes were tested, or even if the author of the change quite knows what the problem is.

I must say, I feel a bit uneasy about any code that does an rmtree("/mnt/hdd"), anyway!

ETA: the changes are dated Jan 2019, and haven't been merged into the code, I think with good reason!
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

BrettR
On probation
Posts: 2
Joined: Mon Mar 22, 2021 22:43

Re: Mountpoint "Use as HDD"

Post by BrettR » Mon Mar 22, 2021 22:47

I struggle to understand all the settings involved with connecting a NAS. Is there a comprehensive user guide to select the correct settings? I have managed to mount the drive, but have no idea whether I have chosen the correct settings. I can find the drive when I go hunting but haven't found where you nominate it as the recording location.

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Tue Mar 23, 2021 09:08

BrettR wrote:
Mon Mar 22, 2021 22:47
I struggle to understand all the settings involved with connecting a NAS. Is there a comprehensive user guide to select the correct settings?

No, there's no comprehensive manual for just about anything for the T/U/V Beyonwiz series. In the settings screen, there's a short description of each setting in the panel on the upper left of the settings screen, but for setting up network share mounts, sometimes the description isn't all that helpful.
BrettR wrote:
Mon Mar 22, 2021 22:47
I have managed to mount the drive, but have no idea whether I have chosen the correct settings.

Did you set up the drive using MENU>Setup>Network>MountManager>Add new network mount point, or using MENU>Setup>Network>MountManager>Network browser. If you use the latter, find all the accessible network file servers and pre-fill the share mount setup screen with mostly sensible default values.
BrettR wrote:
Mon Mar 22, 2021 22:47
I can find the drive when I go hunting but haven't found where you nominate it as the recording location.

MENU>Setup>TV>Recording settings>Default movie location.

Have you thought about where you want to put the temporary recordings that are needed for timeshift? That's set up in:
MENU>Setup>TV>Timeshift settings>Timeshift location.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Fri Mar 26, 2021 12:38

Getting back on topic, I think that I've nailed down the exact cause of the failure of "Use as HDD" on autofs mounts.

The problem is that each time there's a channel change (and when a channel is started when the box is started), InfoBarTimeshift.createTimeshiftFolder() is called (via InfoBarTimeshift.__serviceStarted()). That does an os.makedirs("/media/hdd/timeshift") even if /media/hdd is not mounted, and even if the timeshift directory is set to something else (and even if timeshift automatic startup is disabled).

That means that if the box was started without a physical HDD, and there is no /media/hdd mountpoint directory (and so nothing mounted on it), then as soon as a channel,starts playing after startup, the directories /media/hdd and /media/hdd/timeshift are created.

Then, if you go to MENU>Network>Network browser or MENU>Network>Mount manager>Add new network mount point, and create a new network mount with "Use as HDD", and it starts up the network mount, the mount will succeed, but because /media/hdd exists, the creation of a symbolic link from /media/hdd to the mountpoint will fail.

However, if you then reboot, the mounting of the network mountpoints and the creation of the symbolic link happen well before a channel is first started, and so the symbolic link /media/hdd to the mountpoint will succeed.

I think that the problem can be solved by adding the following to the code in AutoMount (untested):

Code: Select all

def cleanMountpoint(path):
	if os.path.exists(path) and not os.path.ismount(path):
		hasFiles = False
		for root, dirs, files in os.walk(path):
			if files:
				hasFiles = True
				break
		if hasFiles:
			print "Mountpoint not removed - contains files:", path
		else:
			print "Removing mountpoint:", path # ZZ
			return # ZZ
			try:
				rmtree(path)
				harddiskmanager.removeMountedPartition(path)
			except Exception, ex:
				print "Failed to remove", path, "Error:", ex

cleanMountpoint("/media/hdd")
That will remove /media/hdd and everything under it, provided that there are no files in the subtree. That should protect against most kinds of potential data loss.

I'd also add the "don't remove if there are files" test to the rmtree() that's called if the network mount fails.

The funny thing about the whole business of always creating /media/hdd/timeshift even if /media/hdd doesn't exist, is that /media is a 64kB (in-memory) tempfs, and is far too small for the system to actually allow it to be used for timeshift, and no timeshift files are created in it. :shock: :?

Anyway, for now the workaround to use "Use as HDD" for autofs mounts is, configure the mount, then reboot.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
MrQuade
Uber Wizard
Posts: 11844
Joined: Sun Jun 24, 2007 13:40
Location: Perth

Re: Mountpoint "Use as HDD"

Post by MrQuade » Fri Mar 26, 2021 12:55

prl wrote:
Fri Mar 26, 2021 12:38
The funny thing about the whole business of always creating /media/hdd/timeshift even if /media/hdd doesn't exist, is that /media is a 64km (in-memory) tempfs
Cripes, 64km! How wide is it? ;)
Logitech Harmony Ultimate+Elite RCs
Beyonwiz T2/3/U4/V2, DP-S1 PVRs
Denon AVR-X3400h, LG OLED65C7T TV
QNAP TS-410 NAS, Centos File Server (Hosted under KVM)
Ubiquiti UniFi Managed LAN/WLAN, Draytek Vigor130/Asus RT-AC86U Internet
Pixel 4,5&6, iPad 3 Mobile Devices

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Fri Mar 26, 2021 14:28

MrQuade wrote:
Fri Mar 26, 2021 12:55
prl wrote:
Fri Mar 26, 2021 12:38
The funny thing about the whole business of always creating /media/hdd/timeshift even if /media/hdd doesn't exist, is that /media is a 64km (in-memory) tempfs
Cripes, 64km! How wide is it? ;)

:D

I noticed that when I was proofreading, and then forgot to fix it!
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Fri Mar 26, 2021 17:28

Two more quirks of "Use as HDD":

If you disable "Use as HDD" with autofs, the "/media/hdd" symlink isn't deleted as it should be.

You can enable as many network mounts as you like as "Use as HDD".
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Sat Mar 27, 2021 16:26

I have logged the following bugs:

#740: Apparent failure of "Use as HDD" on autofs network mounts
#741: Some network mounts are not correctly recognised in MENU>Setup>Network
#742: More than one network mount can be set to Use as HDD replacement
#743: After disabling "Use as HDD" on autofs network mount symlink is not removed

I have fixes for all of them in test, and there is some other minor cleanup that I'd like to do before I submit the changes.

When it's all done I'll post a link back to the Beyonwiz changes in the OE-Alliance plugins repository commentary that Grumpy_Geoff posted so that they can pick up the changes if they want them.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Mon Apr 05, 2021 16:07

Here's an alpha patch for the four bugs above.

It's in my usual form; I hope that the people who I'd normally expect to try things like this will know how to apply the patch and to uninstall it.

In bug report #741, peteru queried whether the changes might have consequences in mounting NFS shares from NFSv3 servers. I don't have access to any NFSv3 servers, so if someone can check that they work with the patch, I'd appreciate that. If anyone else wants to try it, I can post more detailed instructions.

Setting nfsvers=4 option in an NFS mount setup screen will have unknown effects (with or without the patch), but whatever they are, they appear to be benign. More on this in my next post.
Attachments
fix-netbrowser-installer.zip
(17.99 KiB) Downloaded 47 times
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Mon Apr 05, 2021 16:34

If you've read the discussion in issue #741, this will be no surprise, but the processing of user options in the NetworkBrowser is fairly broken.

The method AutoMount.sanitizeOptions() adds (sometimes conditionally) extra mount options to the user-supplied ones before writing them into the /etc/fstab or /etc/auto.network files.

For example, for a CIFS mount, the default options that the user sees in the mount setup screen are rw,utf8,vers=2.1 (except on a T3, where it doesn't have vers=2.1. But the options actually written to the system config files are rw,iocharset=utf8,vers=2.1,cache=loose.

However, it's not very clever about the way it does this. For example, for NFS network mounts, it unconditionally adds nfsvers=3 to the system file options, even if the user has specified a different NFS version for the mount. If the user adds nfsvers=4 to the default screen options, that becomes nfsvers=4,nfsvers=3 in the system config files :shock: :roll:
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Paul_oz53
Wizard
Posts: 2791
Joined: Sat Jun 13, 2009 02:34
Location: Melbourne

Re: Mountpoint "Use as HDD"

Post by Paul_oz53 » Tue Apr 06, 2021 13:47

prl wrote:
Mon Apr 05, 2021 16:07
Here's an alpha patch for the four bugs above.

It's in my usual form; I hope that the people who I'd normally expect to try things like this will know how to apply the patch and to uninstall it.

In bug report #741, peteru queried whether the changes might have consequences in mounting NFS shares from NFSv3 servers. I don't have access to any NFSv3 servers, so if someone can check that they work with the patch, I'd appreciate that. If anyone else wants to try it, I can post more detailed instructions.

Setting nfsvers=4 option in an NFS mount setup screen will have unknown effects (with or without the patch), but whatever they are, they appear to be benign. More on this in my next post.

Although I downloaded it (twice - first time to the phone) it is probably pointless to try it in a machine with a HDD as it will have files already in /media/hdd. It appears that I would need to remove the internal HDD in the study U4 or the T3 (since neither is in a "production" role) and select another location for storage to make a meaningful test. Is this correct?
__________________________________
Paul
Beyonwiz T4, 2 x U4: FW - 19.3 20211010
Samsung QA85Q80BAWXXY 4K TV
Samsung QA65Q80TAWXXY 4K TV
Samsung HW Q800BXY soundbar
OverlayHD 1.70, IceTV, Foxtel IQ4
2 x Win7 PCs, 2 x Win10 PCs
Denon AVR -X2400H

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Mountpoint "Use as HDD"

Post by Grumpy_Geoff » Tue Apr 06, 2021 15:01

Paul_oz53 wrote:
Tue Apr 06, 2021 13:47
Although I downloaded it (twice - first time to the phone) it is probably pointless to try it in a machine with a HDD as it will have files already in /media/hdd. It appears that I would need to remove the internal HDD in the study U4 or the T3 (since neither is in a "production" role) and select another location for storage to make a meaningful test. Is this correct?

My thought (and trepidation) too. What happens to an existing /dev/sda1 mounted on /media/hdd? Do we now need to get to /media/sda1/movie to access what was originally /media/hdd/movie from that "old" mount structure?

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Tue Apr 06, 2021 16:20

Thanks for your interest.

"Use as HDD replacement" is intended to be used on diskless devices.

If /media/hdd is a mountpoint (as you'd expect it to be in PVR with HDD), enabling "Use as HDD replacement" with mount type AUTOFS will have no effect, because /media/hdd won't be able to be created as a symlink pointing to the actual mountpoint.

If the mount type is FSTAB, the share will be mounted on top of /media/hdd, over-riding any existing HDD mount. That behaviour should be unchanged.

I don't think it's possible to test the fixes to bugs:
#740: Apparent failure of "Use as HDD" on autofs network mounts
#743: After disabling "Use as HDD" on autofs network mount symlink is not removed
if there's a HDD being mounted as /media/hdd. However, nothing bad should happen.

It should be possible to test the other bugs, though testing #742: More than one network mount can be set to Use as HDD replacement will require mounting a share as HDD replacement using an FSTAB mount type (and it will require more than one share to be visible in either the Network Browser screen or the Mountpoints management screen. In the Network Browser screen, you don't need more than one share to be mounted, just one mounted as HDD replacement: the others don't need to be mounted to do the test. All that happens is that if (at least) one mount is marked as "Use as HDD replacement", that option won't be visible in any share config screens that don't have it set.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Paul_oz53
Wizard
Posts: 2791
Joined: Sat Jun 13, 2009 02:34
Location: Melbourne

Re: Mountpoint "Use as HDD"

Post by Paul_oz53 » Thu Apr 08, 2021 01:56

The patch installed and uninstalled fine. Rebooted each time with no gremlins.

On the Study U4 I nominated the T3 HDD FSTAB mounted Movie folder to use as HDD replacement and rebooted. Viola, the T3 folder appeared as /Media/HDD/Movie!

In the Devices submenu the internal SSD reported as sda1 present but not mounted. On uninstalling the patch this reverted to normal. Anything on sda1 was inaccessible.

Quirks:
1. In media player my custom assignment of long yellow to be Go To /Media/HDD/movie changed to Location. Reverted after restoration.
2. In Network Browser the T4 URL and shares ceased to show in scans and rescans. Reverted to visible after restoration.
3. Also in Network Browser, the T3 FSTAB share of /Media/HDD/Movie defiantly showed as not active (red cross) though it definitely was working as the U4 storage location. A second reboot didn't change this red cross despite the share being mounted and usable.

Note I didn't record but the T3 share played back OK and file deletion worked.
__________________________________
Paul
Beyonwiz T4, 2 x U4: FW - 19.3 20211010
Samsung QA85Q80BAWXXY 4K TV
Samsung QA65Q80TAWXXY 4K TV
Samsung HW Q800BXY soundbar
OverlayHD 1.70, IceTV, Foxtel IQ4
2 x Win7 PCs, 2 x Win10 PCs
Denon AVR -X2400H

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Thu Apr 08, 2021 10:11

Hi, Paul. Thanks for the effort you put into testing and into the detailed report.
Paul_oz53 wrote:
Thu Apr 08, 2021 01:56
The patch installed and uninstalled fine. Rebooted each time with no gremlins.

On the Study U4 I nominated the T3 HDD FSTAB mounted Movie folder to use as HDD replacement and rebooted. Viola, the T3 folder appeared as /Media/HDD/Movie!

My changes were intended to remove the need to reboot in some cases, but even without my changes that should have been successful without a reboot.

Are all the tests you did of my code using an FSTAB mount rather than AUTOFS? This isn't a criticism, I just need to know for certain to help replicate and understand the problems you're seeing.
Paul_oz53 wrote:
Thu Apr 08, 2021 01:56
In the Devices submenu the internal SSD reported as sda1 present but not mounted. On uninstalling the patch this reverted to normal. Anything on sda1 was inaccessible.

That's odd. If the "Use as HDD replacement" was on an FSTAB mount both with and without the patch, I'd have expected to to hide the mount of /dev/sda1 on /media/hdd in both cases. The mount of /dev/sd1a on /media/hdd would still be present, but the contents of /dev/sda1would not be accessible through the mount. If the mount of the network share on /media/hdd was unmounted, then /dev/sda1's contents should then be accessible again.
Paul_oz53 wrote:
Thu Apr 08, 2021 01:56
Quirks:
1. In media player my custom assignment of long yellow to be Go To /Media/HDD/movie changed to Location. Reverted after restoration.

That's also a case that I can't think of a good reason for if an FSTAB "Use as HDD replacement" was used. I could think of a few things that could cause it for AUTOFS.
Paul_oz53 wrote:
Thu Apr 08, 2021 01:56
2. In Network Browser the T4 URL and shares ceased to show in scans and rescans. Reverted to visible after restoration.
3. Also in Network Browser, the T3 FSTAB share of /Media/HDD/Movie defiantly showed as not active (red cross) though it definitely was working as the U4 storage location. A second reboot didn't change this red cross despite the share being mounted and usable.

These are issues in the area I was trying to fix, and are a bit annoying. It was also one of my concerns that changes I'd made to make that to sort of thing work for my setup might make it fail for other people.

Are you able to post the names of the shares as posted by the servers, and also the values for corresponding mounts in /etc/enigma2/automounts.xml, in their respective <sharedir/> elements? In the circumstances, the value of "Server share" in the mount setup screen is likely to be unreliable.

The output of either smbclient -m SMB3 -g -U username%password -L serverIp (if the server requires a password) or smbclient -m SMB3 -g -N -L serverIp if it doesn't (i.e. guest access) would be useful for each of the servers your Beyonwizes are accessing (you only need to run the commands from one Beyonwiz: a server can be queried by smbclient running on the same machine).
Paul_oz53 wrote:
Thu Apr 08, 2021 01:56
Note I didn't record but the T3 share played back OK and file deletion worked.

At least that worked! :)
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Thu Apr 08, 2021 10:19

Paul: I also forgot to ask - are all the mounts CIFS mounts?
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Thu Apr 08, 2021 11:36

There are issues with using "Use as HDD replacement" in my patch. I recommend that you should uninstall it if it is installed, and not install it if it isn't installed!
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Paul_oz53
Wizard
Posts: 2791
Joined: Sat Jun 13, 2009 02:34
Location: Melbourne

Re: Mountpoint "Use as HDD"

Post by Paul_oz53 » Thu Apr 08, 2021 13:05

prl wrote:
Thu Apr 08, 2021 10:19
Paul: I also forgot to ask - are all the mounts CIFS mounts?

I'm out until mid afternoon but the T3 mount was FSTAB.

I realise that I may have mislead you about sda1. It was only inaccessible while the T3 was the host drive.

All my other mounts were accessible both as FSTAB and autofs. I'll get the information later today.

I wasn't sure about rebooting so I just did it without checking anything.

I didn't think to see if other machines could still see the study u4 network shares but I assumed they would see the T3.

I tried creating an FSTAB mount of the study U4 sda1 but it seemed not to work. I couldn't see it on the study u4. Didn't try other machines though.

Cheers, Paul

Edit: My mounts are autofs for the Movie folders of the T4 and lounge U4 and the PCs. I also FSTAB mount /media/hdd/movie for the T3, T4 and U4 and these all appeared normal.
__________________________________
Paul
Beyonwiz T4, 2 x U4: FW - 19.3 20211010
Samsung QA85Q80BAWXXY 4K TV
Samsung QA65Q80TAWXXY 4K TV
Samsung HW Q800BXY soundbar
OverlayHD 1.70, IceTV, Foxtel IQ4
2 x Win7 PCs, 2 x Win10 PCs
Denon AVR -X2400H

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Thu Apr 08, 2021 14:17

Thanks, Paul. There's wrong code in both my changes and in the original wrt "Use as HDD replacement" for both AUTOFS and FSTAB mounts.

It's probably not worth doing any more testing than you've already done, because I think I'm going to have to rewrite pretty much all that code, and not just the bits I changed. :(
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Paul_oz53
Wizard
Posts: 2791
Joined: Sat Jun 13, 2009 02:34
Location: Melbourne

Re: Mountpoint "Use as HDD"

Post by Paul_oz53 » Thu Apr 08, 2021 15:00

No worries Peter. Happy to have another go when you're ready.

Off topic but testing on the Study U4 reminded me that discussion of the update to the devices code for tuner numbers has gone quiet. There's only a few of us that have a use for the changes but I'm wondering if they have been accepted for a future update.
__________________________________
Paul
Beyonwiz T4, 2 x U4: FW - 19.3 20211010
Samsung QA85Q80BAWXXY 4K TV
Samsung QA65Q80TAWXXY 4K TV
Samsung HW Q800BXY soundbar
OverlayHD 1.70, IceTV, Foxtel IQ4
2 x Win7 PCs, 2 x Win10 PCs
Denon AVR -X2400H

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Thu Apr 08, 2021 15:31

Paul_oz53 wrote:
Thu Apr 08, 2021 15:00
Off topic but testing on the Study U4 reminded me that discussion of the update to the devices code for tuner numbers has gone quiet. There's only a few of us that have a use for the changes but I'm wondering if they have been accepted for a future update.

Allowing a full list of tuners in MENU>Information>Devices has been merged into the repository and will appear in the next release.

The changes to the InfoBar uuner status area haven't been submitted yet, but as soon as I've got the NetworkBrowser stuff sorted, I'll get back onto the InfoBar tuner display stuff.

It turned into something bigger than I expected - I wanted a trimmed-down display for the transponder information at the bottom of the tuner status area, and I wanted to do that as a skin-configurable list of fields. If I implemented that, it would mean then that a bunch of the other multi-field displays (like the current transponder information in that area) could be defined in terms of (for now, at least) hard-coded lists of fields that use the same list display mechanism.

There's still a bit of tweaking to do on that, and to finalise the skin layout of the area, including removing some of the unused or uninteresting channel status icons at the top of the area.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Sat Apr 10, 2021 16:38

Here's a second alpha patch for the following bugs:
#740: Apparent failure of "Use as HDD" on autofs network mounts
#741: Some network mounts are not correctly recognised in MENU>Setup>Network
#742: More than one network mount can be set to Use as HDD replacement
#743: After disabling "Use as HDD" on autofs network mount symlink is not removed
#744: The mounted/unmounted icon sometimes doesn't update for AUTOFS network mounts
#745: Buggy sort order in Mountpoints management

The new alpha also fixes two bugs in the original patch: the code that cleans up before making a symlink when an AUTOFS mount is also "Use as HDD replacement" and when a share is unmounted (the original code called the same function to do both, but actually there are small, but important differences between them), and a second bug that prevented the active/not active icons being displayed in the Mountpoints management screen.

The fix for #744 removes an ill-conceived optimisation that I made in AutoMount in earlier work on NetworkBrowser.

The patch is in my usual form; I hope that the people who I'd normally expect to try things like this will know how to apply the patch and to uninstall it. If anyone else wants to try it, I can post more detailed instructions.

If you have my previous patch installed, uninstall it before installing this patch!

I have a fix coded that should make option handling cleaned in the share setup screens (e.g. prevent "nfsvers=4,nfsvers=3" nbeing put into the final config files when the user specifies "nfsvers=4" in the setup screen. I still haven't written that up as a bug report yet, and it will be in a separate commit.
Attachments
fix-netbrowser-installer-2.zip
(18.11 KiB) Downloaded 35 times
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Mountpoint "Use as HDD"

Post by Grumpy_Geoff » Sun Apr 11, 2021 12:30

I installed the alpha on my U4. I verified the install by confirming the 7 python ".bak" files were created.

I mounted a CIFS share as AUTOFS with "Use as HDD replacement" enabled.
Even after a reboot, the internal drive was still mounted as /media/hdd.

Code: Select all

root@beyonwizu4:~# mount | grep hdd
/dev/sda1 on /media/hdd type ext4 (rw,relatime,data=ordered)
root@beyonwizu4:~#
Share definition -

Code: Select all

root@beyonwizu4:~# grep NASGeoff /etc/auto.network
NASGeoff -fstype=cifs,user={x},pass={y},rw,iocharset=utf8,vers=2.1,cache=loose ://192.168.1.99/NAS-Geoff
root@beyonwizu4:~#
Corresponding entry from /etc/enigma2/automounts.xml file (with "Use as HDD replacement") -

Code: Select all

<autofs>
 <cifs>
  <mount>
   <active>True</active>
   <hdd_replacement>True</hdd_replacement>
   <ip>192.168.1.99</ip>
   <sharename>NASGeoff</sharename>
   <sharedir>NAS-Geoff</sharedir>
   <options>rw,utf8,vers=2.1</options>
   <username>{x}</username>
   <password>{y}</password>
  </mount>
 </cifs>
</autofs>
The "NASGeoff" share was accessible.
Perhaps this alpha#2 won't change the "Use as HDD replacement" functionality on a box fitted with an internal drive?

Edit -
Oh, and my custom long-YELLOW wasn't honoured in the media selection list, it was actioned as location not bookmarks as defined -
config.movielist.btn_yellowlong=bookmarks

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Mountpoint "Use as HDD"

Post by Grumpy_Geoff » Sun Apr 11, 2021 14:33

Grumpy_Geoff wrote:
Sun Apr 11, 2021 12:30
Perhaps this alpha#2 won't change the "Use as HDD replacement" functionality on a box fitted with an internal drive?

Edit -
Oh, and my custom long-YELLOW wasn't honoured in the media selection list, it was actioned as location not bookmarks as defined -
config.movielist.btn_yellowlong=bookmarks

Had a shower moment -
I disabled timeshift, disabled debug logging, stopped Samba, then restarted the GUI.
Then I unmounted /dev/sda1, and I then re-saved the "Use as HDD" share.
Now, MEDIA takes me to Shares/NASGeoff ("Shares" is an alias for /media/autofs).
sda1 shows as unmounted.
I re-enabled timeshift and zapped - movie and timeshift directories were created in the share.

Custom long-YELLOW is still not-actioned.

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Mountpoint "Use as HDD"

Post by Grumpy_Geoff » Sun Apr 11, 2021 15:12

I disabled "Use as HDD replacement" for the share.
The share is still mounted on /media/hdd, likely as I was still in the timeshift buffer. I exited timeshift, and can see /media no longer contains "hdd".
I restarted the GUI - /media/hdd reappeared but was still pointing at the share. I rebooted - ahh, now I'm back to the internal drive mounted as /media/hdd.

Before the reboot, I couldn't re-mount the internal drive, but I could run a filesystem check -

Code: Select all

root@beyonwizu4:~# fsck.ext4 /dev/sda1
e2fsck 1.44.3 (10-July-2018)
U4: clean, 7360/357712 files, 664939850/732566272 blocks
root@beyonwizu4:~#
root@beyonwizu4:~# mount /dev/sda1 /media/hdd
NTFS signature is missing.
Failed to mount '/dev/sda1': Invalid argument
The device '/dev/sda1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
FUSE exfat 1.2.3
ERROR: exFAT file system is not found.
NTFS signature is missing.
Failed to mount '/dev/sda1': Invalid argument
The device '/dev/sda1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
mount: mounting /dev/sda1 on /media/hdd failed: No such file or directory
root@beyonwizu4:~#

I then proceeded to uninstall the alpha#2, and restarted the GUI.
Seems fine.
I notice long-YELLOW in the media list is still Location, and Bookmarks is not an option - perhaps it was removed some time back and I didn't notice.

Paul_oz53
Wizard
Posts: 2791
Joined: Sat Jun 13, 2009 02:34
Location: Melbourne

Re: Mountpoint "Use as HDD"

Post by Paul_oz53 » Sun Apr 11, 2021 16:46

I also installed the alpha with a similar lack of autofs results to Grumpy_Geoff. Spoiler: selecting "Use as hdd replacement" on the autofs mount of the Lounge U4 was not honoured.

The sda1 drive remained mounted as /media/hdd. This occurred whether it was rebooted or not.

To test, deleted the fstab mount of the Lounge U4 /media/hdd/movie folder and rebooted. The autofs mount of the Lounge U4 was not accessible without the fstab mount. Nonetheless, I tried implementing "use as hdd replacement". It failed as would be expected.

Restored the fstab mount of the /media/hdd/movie folder of the Lounge U4. This restored access to the autofs mount of the Lounge U4 movie folder. Again tried implementing "use as hdd replacement" but again it failed.

Next, I changed the mount type to fstab. Immediately the Lounge U4 movie was mounted as /media/hdd. Within it, a movie and a timeshift folder were created. Timeshift is off on the Study U4.

Movies recorded on the Lounge U4 were accessible and playable on the Study U4. The custom long yellow button setting was not honoured. It became Location instead.

Recording failed however. The instant recording screen ominously suggests a duration of 0:00. Setting this to 10 minutes or 10 hours made no difference.

Code: Select all

Error while preparing to record. Disk full?
Landline [R]
However, Information/Devices reports Size: 975.56GB capacity and Free: 874.43 GB.

The Network Browser reports mounted folders correctly and all available mounts appear as expected.
__________________________________
Paul
Beyonwiz T4, 2 x U4: FW - 19.3 20211010
Samsung QA85Q80BAWXXY 4K TV
Samsung QA65Q80TAWXXY 4K TV
Samsung HW Q800BXY soundbar
OverlayHD 1.70, IceTV, Foxtel IQ4
2 x Win7 PCs, 2 x Win10 PCs
Denon AVR -X2400H

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Sun Apr 11, 2021 18:53

Hi Geoff. Thanks for giving it a whirl.
Grumpy_Geoff wrote:
Sun Apr 11, 2021 12:30
I mounted a CIFS share as AUTOFS with "Use as HDD replacement" enabled.
Even after a reboot, the internal drive was still mounted as /media/hdd.
That is expected. /media/hdd exists and is a mountpoint, so it's not possible to (and the code doesn't even try to) make a symlink /media/hdd that points to the share. If you change "Mount using" to FSTAB, it should work as you expect it to. This depends on the "Mount using" setting, not on the "Mount type". It should work (or fail) in the same way for both NFS and CIFS.

In more detail, in most cases it won't be possible to do (umount /media/hdd && rm -rf /media/hdd && ln -s /media/mount/MyShare /media/hdd) because the first command will often fail. And you definitely don't want to get rid of the first command! ;)

As I said before, the option is mainly intended for diskless boxes (and especially using it with AUTOFS).
Grumpy_Geoff wrote:
Sun Apr 11, 2021 12:30
Oh, and my custom long-YELLOW wasn't honoured in the media selection list, it was actioned as location not bookmarks as defined -
config.movielist.btn_yellowlong=bookmarks
I'll experiment with that.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Paul_oz53
Wizard
Posts: 2791
Joined: Sat Jun 13, 2009 02:34
Location: Melbourne

Re: Mountpoint "Use as HDD"

Post by Paul_oz53 » Sun Apr 11, 2021 21:20

Regarding long YELLOW, I tried it again after rebooting and found it did recognise the custom setting.

The Study U4 has been reverted successfully to its preexisting condition.
__________________________________
Paul
Beyonwiz T4, 2 x U4: FW - 19.3 20211010
Samsung QA85Q80BAWXXY 4K TV
Samsung QA65Q80TAWXXY 4K TV
Samsung HW Q800BXY soundbar
OverlayHD 1.70, IceTV, Foxtel IQ4
2 x Win7 PCs, 2 x Win10 PCs
Denon AVR -X2400H

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Mon Apr 12, 2021 12:33

Grumpy_Geoff wrote:
Sun Apr 11, 2021 15:12
I notice long-YELLOW in the media list is still Location, and Bookmarks is not an option - perhaps it was removed some time back and I didn't notice.

Internally the user-settable function "bookmarks" is the name for "Location".

userDefinedDescriptions = {
...
'bookmarks': (_("Location"), _("Select the movie path")),
...
}

The first element of the tuple is the button name for the function, and the second element is the name in the media selection screen menu.

This doesn't address the long-Yellow button problem that Paul_oz53 describes.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Mon Apr 12, 2021 12:40

Paul_oz53 wrote:
Thu Apr 08, 2021 01:56
1. In media player my custom assignment of long yellow to be Go To /Media/HDD/movie changed to Location. Reverted after restoration.

That seems to me to be an unlikely setting for a Go To button. Case matters. What is the Go To location actually set to? It's hard to test without knowing for sure.

And if that really is what the Go To button is set to, what are /Media and /Media/HDD?
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Mountpoint "Use as HDD"

Post by Grumpy_Geoff » Mon Apr 12, 2021 13:06

prl wrote:
Mon Apr 12, 2021 12:33
Grumpy_Geoff wrote:
Sun Apr 11, 2021 15:12
I notice long-YELLOW in the media list is still Location, and Bookmarks is not an option - perhaps it was removed some time back and I didn't notice.

Internally the user-settable function "bookmarks" is the name for "Location".

Right-o, I well and truly confused myself! Since MEDIA>>MEDIA gets one to the bookmarks screen, there's no need for that non-existent mapping in any case.
Since it's defined in my settings, I must've changed it from the default - what is the default mapping for long-YELLOW?

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Mountpoint "Use as HDD"

Post by Grumpy_Geoff » Mon Apr 12, 2021 13:20

Grumpy_Geoff wrote:
Mon Apr 12, 2021 13:06
Since it's defined in my settings, I must've changed it from the default - what is the default mapping for long-YELLOW?

"Tags" is the answer I believe.
Also assigned to TEXT for the U4 and V2, and to RADIO in the T-series.

Paul_oz53
Wizard
Posts: 2791
Joined: Sat Jun 13, 2009 02:34
Location: Melbourne

Re: Mountpoint "Use as HDD"

Post by Paul_oz53 » Mon Apr 12, 2021 16:58

prl wrote:
Mon Apr 12, 2021 12:40
Paul_oz53 wrote:
Thu Apr 08, 2021 01:56
1. In media player my custom assignment of long yellow to be Go To /Media/HDD/movie changed to Location. Reverted after restoration.

That seems to me to be an unlikely setting for a Go To button. Case matters. What is the Go To location actually set to? It's hard to test without knowing for sure.

Attached are the button settings. Apologies for the caps - my phone autocorrects endlessly. It is set to /media/hdd/movie. I'm inclined to think that the long-press question may be a furphy - short YELLOW is Location. In may be I just had a poor button press this time around. Last time was definitely a problem but not this time.

And if that really is what the Go To button is set to, what are /Media and /Media/HDD?

Not sure how to read this. I think they are in fact: /media and /media/hdd respectively. The actual share is:

Code: Select all

[Media]
  path = /media
  guest ok = yes
  read only = no
Part of my inaccuracy is that mount manager entries appear to be autocorrected to lowercase. The attached screenshots for the T4 mount may help explain my confusion. If what I mounted was just /media this would suggest the smb-user.conf entry is translating the case between the label and the first line and all would be clear.

But my Mount manager entry for T4Movie contains a capital "M" in "Media" and a full path "Media/hdd/movie". The T4 folder as mounted is /media/hdd/movie as the recorded files therein are accessible from the other machines but is labelled /media/net/T4Movie in the media player screen.

Thus, what is loaded and labelled in media player is a hybrid of the actual folder name, "net" and the mount-manager mount-point name. Consistency of the case in the folder path is out the window.

Apropos of nothing, I note the Folder shown in media player for recordings on the Study U4 is normally /media/hdd/movie but with "Use as hdd replacement" active, the Media folder title line becomes /media/hdd. What is displayed is the host machine folder but with two added folders "movie" and "timeshift". You have to navigate to the new movie folder to use it, which has the path /media/hdd/movie/movie. This is different to the normal path to the movie folder on a machine with internal hdd. I suspect that this may be a factor in why the attempts to record on the StudyU4 failed with a disk full message.

Certainly, it seems a bad idea to have two machines record to the same folder(s) as conflicts may occur in the filenames if both record the same program.
Attachments
Media playback button settings.jpg
Fstab mount T4 - 1.jpg
Fstab mount T4 - 1.jpg (82.94 KiB) Viewed 2763 times
Fstab mount T4 - 2.jpg
Fstab mount T4 - 2.jpg (113.88 KiB) Viewed 2763 times
Fstab mount T4 - 3a.jpg
Fstab mount T4 - 3a.jpg (104 KiB) Viewed 2763 times
Last edited by Paul_oz53 on Mon Apr 19, 2021 19:00, edited 1 time in total.
__________________________________
Paul
Beyonwiz T4, 2 x U4: FW - 19.3 20211010
Samsung QA85Q80BAWXXY 4K TV
Samsung QA65Q80TAWXXY 4K TV
Samsung HW Q800BXY soundbar
OverlayHD 1.70, IceTV, Foxtel IQ4
2 x Win7 PCs, 2 x Win10 PCs
Denon AVR -X2400H

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Mon Apr 12, 2021 17:43

Your posted mount setup should create the mount point /media/net/T4Movie. I don't understand what's happening that allows you to access /media/hdd/movie on the T4 as Media/hdd/movie. But maybe CIFS is doing unspeakable things with case mapping.

ETA: Is the T4 exporting its root directory (/) as the T4Movie share? That's not the default. When I mount my T4's /media/hdd/movie (using the default Samba setup) it looks completely different to what you've got there.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Mon Apr 12, 2021 17:52

BTW, the code in NetworkBrowser's AutoMount module is still giving me headaches. I think that the only way to safely change any of Mount using, Mount type or Use as HDD replacement is to delete the share and re-create it. :(

Also, it's generally safer to delete a mount than switching off Active, too.

The code's a horror. :twisted:
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Mountpoint "Use as HDD"

Post by Grumpy_Geoff » Mon Apr 12, 2021 18:03

prl wrote:
Sun Apr 11, 2021 18:53
Grumpy_Geoff wrote:
Sun Apr 11, 2021 12:30
I mounted a CIFS share as AUTOFS with "Use as HDD replacement" enabled.
Even after a reboot, the internal drive was still mounted as /media/hdd.
That is expected. /media/hdd exists and is a mountpoint, so it's not possible to (and the code doesn't even try to) make a symlink /media/hdd that points to the share. If you change "Mount using" to FSTAB, it should work as you expect it to. This depends on the "Mount using" setting, not on the "Mount type". It should work (or fail) in the same way for both NFS and CIFS.

Armed with that info, I gave it another go. I installed the aplha#2 again.
I ensured Samba was stopped/disabled, debug logging off, timeshift off.
I changed the mount definition type to FSTAB, and enabled "Use as HDD replacement".
Save - bingo, an unmounted /dev/sda1 and /media/hdd is now pointing at the share.
Set off an instant recording - working as stated on the tin.
MENU>>Information>>Devices shows the unmounted internal drive. Curiously, it reports the share twice.
Used ShootYourScreen to take a screenie, it correctly created the "screenshots" sub-dir under /media/hdd as it didn't already exist on the share.

screenshot_2021-04-12_15-44-42.jpg

Oh, yes, mounted twice, snippet from mount command -
//192.168.1.99/NAS-Geoff on /media/net/NASGeoff type cifs
//192.168.1.99/NAS-Geoff on /media/hdd type cifs

I think that would be me, as I first changed the mount type, then enabled "use as HDD".

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Mon Apr 12, 2021 18:18

Grumpy_Geoff wrote:
Mon Apr 12, 2021 18:03
Oh, yes, mounted twice, snippet from mount command -
//192.168.1.99/NAS-Geoff on /media/net/NASGeoff type cifs
//192.168.1.99/NAS-Geoff on /media/hdd type cifs

I think that would be me, as I first changed the mount type, then enabled "use as HDD".

Yes, that's exactly the sort of thing that my earlier post about deleting and re-creating was intended to avoid.

Good to see that otherwise, it's working.

ETA: when you disable "use as HDD", I think no matter how you do it, you won't get the normal HDD mount back until you reboot. I don't know of a better workaround for it than that.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Paul_oz53
Wizard
Posts: 2791
Joined: Sat Jun 13, 2009 02:34
Location: Melbourne

Re: Mountpoint "Use as HDD"

Post by Paul_oz53 » Mon Apr 12, 2021 18:34

prl wrote:
Mon Apr 12, 2021 17:43
Your posted mount setup should create the mount point /media/net/T4Movie. I don't understand what's happening that allows you to access /media/hdd/movie on the T4 as Media/hdd/movie. But maybe CIFS is doing unspeakable things with case mapping.

I think that something there is remapping some uppercase to lower case.
ETA: Is the T4 exporting its root directory (/) as the T4Movie share? That's not the default. When I mount my T4's /media/hdd/movie (using the default Samba setup) it looks completely different to what you've got there.
All my machines export the root directory as /root and the media directory as /media.

The only difference between fstab and autofs mounts is the "net" is replaced with "autofs". EG: /media/autofs/T4Movie.
__________________________________
Paul
Beyonwiz T4, 2 x U4: FW - 19.3 20211010
Samsung QA85Q80BAWXXY 4K TV
Samsung QA65Q80TAWXXY 4K TV
Samsung HW Q800BXY soundbar
OverlayHD 1.70, IceTV, Foxtel IQ4
2 x Win7 PCs, 2 x Win10 PCs
Denon AVR -X2400H

prl
Wizard God
Posts: 32710
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: Mountpoint "Use as HDD"

Post by prl » Mon Apr 12, 2021 18:38

Paul_oz53 wrote:
Mon Apr 12, 2021 18:34
All my machines export the root directory as /root and the media directory as /media.

Then I really don't understand why your Server share is Media/hdd/movie!
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Grumpy_Geoff
Uber Wizard
Posts: 6490
Joined: Thu Mar 05, 2009 22:54
Location: Perth

Re: Mountpoint "Use as HDD"

Post by Grumpy_Geoff » Mon Apr 12, 2021 18:52

prl wrote:
Mon Apr 12, 2021 18:18
ETA: when you disable "use as HDD", I think no matter how you do it, you won't get the normal HDD mount back until you reboot. I don't know of a better workaround for it than that.

Can I mount the internal drive via command line as, say, /media/i-hdd using something like -
mount -t ext4 /dev/sda1 /media/i-hdd
whilst the share is mounted as/on /media/hdd?
The reason I ask is that a timer has fired and it started to record to the share, so I can't revert just yet, but I also can't get to the internal drive.

Post Reply

Return to “Tips & How to Guides V2”