USB and HDD folders on SD Cards and External HDDs

Moderators: Gully, peteru

Post Reply
anthonym
Apprentice
Posts: 51
Joined: Sat Jul 27, 2019 11:45

USB and HDD folders on SD Cards and External HDDs

Post by anthonym » Thu Nov 21, 2019 08:46

When setting up my V2 I ended up with my SD card as the "HDD" folder on the Wiz and my USB HDD as the "USB" folder. The SD card is only for timeshift and the USB for recordings. What I have come across when trying to move my recordings is that the only folder my PC sees is the Media/HDD/Movies folder which is located on the SD drive and thus sees no recordings.

I'm about to install new firmware and reformat my drives to try and fix a freezing problem and am just wondering if there is a way in the setup process to have the "Media/HDD/Movies folder" end up on my USB drive so that my PC can see the recordings? I think I initially had the SD card in first and set that up then added the USB drive during my setup process. So I'm wondering if I should have done it the other way around, then just moved the timeshift location to the SD card after the setup? Or if it will always ends up the way it did?

With help from Grumpy Geoff I've managed to learn that using Filezilla and FTP I can see everything on the Wiz and that code can be added to Samba to make more folders visible, but it would be easier (and safer with my limited tech knowledge) in the long run if all was setup correctly in the initial process.

Thanks in advance.

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by Grumpy_Geoff » Thu Nov 21, 2019 09:44

I suspect the V2 will always mount the "internal drive" microSD card (/dev/sda1) as /media/hdd.

anthonym
Apprentice
Posts: 51
Joined: Sat Jul 27, 2019 11:45

Re: USB and HDD folders on SD Cards and External HDDs

Post by anthonym » Thu Nov 21, 2019 11:36

Just updating what I have found in case it helps others.

I have installed new firmware which then required a fresh start of the setup wizard. I did this with only the USB HDD plugged in, which I then formatted. Everything went well and the USB HDD became "HDD" in the folder structure, "Movie" and "Timeshift" folders then appeared on the USB HDD. Checking on my PC the "Movie" folder was readable and working 100%.

Then I installed the SD card, rebooted and reformatted it as well. However as Geoff suspected, the SD card has now taken over the "Media/HDD" status on the machine and the USB HDD is now called "Media/USB". As a result my PC can no longer see the recordings. In fact my PC won't even open the "Movie", however my suspicion is that's maybe because the Wiz has yet to make that folder.

End result is my PC can't see my recordings. There are workarounds as Grumpy Geoff has helped me find (Samba code edits and FTP transfers) however these might confuse someone who is not overly computer literate. I've set up the V2 in what I thought would be the most logical way (USB HDD for recordings and SD card for time shift) so it's a pity it won't work without some extra help from a program or programming. Personally it's no real problem, but I can see it might be for others. I guess my solution to all this will be FTP transfers through Filezilla.

Cheers :D

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by prl » Thu Nov 21, 2019 15:12

Grumpy_Geoff wrote:
Thu Nov 21, 2019 09:44
I suspect the V2 will always mount the "internal drive" microSD card (/dev/sda1) as /media/hdd.

If there are all of connected microSD card, a drive in the USB2 port and a drive in the USB3 port and all have a single usable volume on them, the SD card will normally mount as /media/hdd, the USB2 drive as /media/usb and the USB3 drive as /media/sdc1.

The mount order is normally SD card, USB2 drive, USB3 drive, but that order is apparently not guaranteed. The first device mounted will appear as /media/hdd, second device as /media/usb and subsequent devices as /media/sd{c,d,e,...}1.

That means that, for example, if you have your recording drive in the USB3 slot (which appears to be the sensible choice), but you happen to start up with a USB thumb drive in the USB2 port, it will look as though your recordings have all disappeared (though they're still actually there, just in /media/usb/movie).

If you add multi-volume devices and/or a USB hub with multiple drives, life gets even more interesting.

This rather counter-intuitive behaviour is one of the things that I really dislike about the otherwise quite nice V2.
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: USB and HDD folders on SD Cards and External HDDs

Post by Grumpy_Geoff » Thu Nov 21, 2019 15:49

prl wrote:
Thu Nov 21, 2019 15:12
That means that, for example, if you have your recording drive in the USB3 slot (which appears to be the sensible choice), but you happen to start up with a USB thumb drive in the USB2 port, it will look as though your recordings have all disappeared (though they're still actually there, just in /media/usb/movie).

Wouldn't the drive in the USB3 get mounted as /media/sdc1 in that case, given it's the third detected drive?

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by Grumpy_Geoff » Thu Nov 21, 2019 15:59

In this earlier topic, the USB recording drive showed as being device /dev/sdc1, but two posts further back /media was listed as containing 'usb' (as well as the other usual entries). So how did /media/usb get mounted against /dev/sdc1?
viewtopic.php?f=66&t=13724&p=182791#p182793

Colour me confused!

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by prl » Thu Nov 21, 2019 16:10

Grumpy_Geoff wrote:
Thu Nov 21, 2019 15:49
prl wrote:
Thu Nov 21, 2019 15:12
That means that, for example, if you have your recording drive in the USB3 slot (which appears to be the sensible choice), but you happen to start up with a USB thumb drive in the USB2 port, it will look as though your recordings have all disappeared (though they're still actually there, just in /media/usb/movie).

Wouldn't the drive in the USB3 get mounted as /media/sdc1 in that case, given it's the third detected drive?
I was referring to the case where only the USB3 and USB2 slots have drives, and the microSD slot is empty (or used for something that doesn't look like a filesystem. I probably didn't make that clear enough. This is the problem I most frequently run into. I'm using the microSD for other purposes, and it doesn't hotmount.

It all depends on exactly what devices are connected and the order that the USB hotmount process mounts them. All sorts of variations are possible :evil:
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: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: USB and HDD folders on SD Cards and External HDDs

Post by prl » Thu Nov 21, 2019 16:12

Grumpy_Geoff wrote:
Thu Nov 21, 2019 15:59
Colour me confused!

That's the colour users sometimes just get coloured in on the V2.
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: USB and HDD folders on SD Cards and External HDDs

Post by Grumpy_Geoff » Thu Nov 21, 2019 17:52

prl wrote:
Thu Nov 21, 2019 16:10
It all depends on exactly what devices are connected and the order that the USB hotmount process mounts them. All sorts of variations are possible :evil:

Sounds like a V2 owner using a USB storage drive is better off not having a microSD card inserted (thus letting timeshift go to the USB drive), and also never booting with more than one USB storage drive attached.
The USB storage drive should always then be mounted as /media/hdd, with it's 'movie' default recording directory already exported as the "Movie" share.

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by prl » Thu Nov 21, 2019 18:01

Grumpy_Geoff wrote:
Thu Nov 21, 2019 17:52
prl wrote:
Thu Nov 21, 2019 16:10
It all depends on exactly what devices are connected and the order that the USB hotmount process mounts them. All sorts of variations are possible :evil:

Sounds like a V2 owner using a USB storage drive is better off not having a microSD card inserted (thus letting timeshift go to the USB drive), and also never booting with more than one USB storage drive attached.
The USB storage drive should always then be mounted as /media/hdd, with it's 'movie' default recording directory already exported as the "Movie" share.

Yes.

A possible alternative scheme if you want to be able to boot with two USB drives attached is to connect the recording drive to the USB2 port, and the other drive to the USB3 port, though that my not be guaranteed to always work, and just seems the wrong setup to have to use.

As I said in the earlier post, this is for me the one major downside of an otherwise good PVR.
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: USB and HDD folders on SD Cards and External HDDs

Post by Grumpy_Geoff » Thu Nov 21, 2019 18:31

prl wrote:
Thu Nov 21, 2019 18:01
As I said in the earlier post, this is for me the one major downside of an otherwise good PVR.

I recall at least one user of a T/U-series (can't remember which now) that on a few occasions had their attached USB drives swap to different device assignments at boot time, even though not physically changing USB ports.
When I first learned of the V2, I thought of that potential outcome and mumbled to myself "I hope this doesn't bite a V2 user in the bum" :!:

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: USB and HDD folders on SD Cards and External HDDs

Post by adoxa » Thu Nov 21, 2019 19:42

There's always the option of modifying the fstab (via fstabeditor plugin) to force particular mounts.

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by prl » Thu Nov 21, 2019 20:10

adoxa wrote:
Thu Nov 21, 2019 19:42
There's always the option of modifying the fstab (via fstabeditor plugin) to force particular mounts.

That still depends on being certain of the hotmount order, which from what peteru has posted, is not certain, though it would probably work most of the time.

But it's hardly a user-friendly option.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
peteru
Uber Wizard
Posts: 9735
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: USB and HDD folders on SD Cards and External HDDs

Post by peteru » Fri Nov 22, 2019 22:56

If you have more than one locally attached mass storage device, then it is unpredictable as to where it will be mounted. This is because there is a race condition. The system enumerates all devices in parallel and they get mounted as they become ready. It is conceivable that a super-fast USB3 SSD could be mounted before a slow microSD card. For most users, the mount locations are consistent as long as the configuration does not change, so there is the illusion of (almost) predictable behaviour.

The issue with unpredictable mount points has been discussed during beta testing and the upshot was that before any technological solutions can be proposed, someone needs to come up with the specifications as to what combinations of devices are supported and what the expected outcome is for connecting these devices. What should the user experience look like in all scenarios, including devices moving around, being temporarily/permanently unavailable, etc.?

I can think of a whole bunch of solutions, including "pairing" a specific HDD with a PVR, looking for volume labels, etc. Many of these ideas have edge cases, where things get complicated. A proper design document is needed. The solution will need to work on all models - T2, T3, T4, U4, V2.

"Beauty lies in the hands of the beer holder."
Blog.

anthonym
Apprentice
Posts: 51
Joined: Sat Jul 27, 2019 11:45

Re: USB and HDD folders on SD Cards and External HDDs

Post by anthonym » Fri Nov 22, 2019 23:12

Seems it's a hard nut to crack. Given that the mounting may be unpredictable and that by changing some code in Samba will make other drives than media/HDD view-able on a PC. Couldn't the changed Samba code be there on the Wiz from the start in the firmware so that the "movie" file of any connected drive will show up on a networked PC, not just the media/HDD? Although I probably could change the code myself, I must admit I feel hesitant about doing it in case I break my new V2. That way no matter what order the drives mount it won't be an issue as all drives will be seen on the network.

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by Grumpy_Geoff » Sat Nov 23, 2019 17:01

anthonym wrote:
Fri Nov 22, 2019 23:12
Seems it's a hard nut to crack. Given that the mounting may be unpredictable and that by changing some code in Samba will make other drives than media/HDD view-able on a PC. Couldn't the changed Samba code be there on the Wiz from the start in the firmware so that the "movie" file of any connected drive will show up on a networked PC, not just the media/HDD? Although I probably could change the code myself, I must admit I feel hesitant about doing it in case I break my new V2. That way no matter what order the drives mount it won't be an issue as all drives will be seen on the network.

If you wish, I can quite easily knock up a script that'll add the share entries to the Samba user configuration file for you. You can run it from a USB thumb drive using File Commander.
Do you want me to do that?
It won't break your V2, but please do take a settings backup first.

anthonym
Apprentice
Posts: 51
Joined: Sat Jul 27, 2019 11:45

Re: USB and HDD folders on SD Cards and External HDDs

Post by anthonym » Mon Nov 25, 2019 19:24

Hi Grumpy, that would be great if you feel so inclined. But I've no experience at all with this type of thing, so are you able to make it idiot proof? :D

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by Grumpy_Geoff » Mon Nov 25, 2019 21:39

anthonym wrote:
Mon Nov 25, 2019 19:24
Hi Grumpy, that would be great if you feel so inclined. But I've no experience at all with this type of thing, so are you able to make it idiot proof? :D

You can use this script to add the entries to the "user" Samba config file (it'll either add to it or create it, but you should already have one on your V2 firmware).
The script is shown below and attached as 'add_USB_to_SMB_config.sh'

Download the script, and then copy the script file to a USB thumb drive. Attach the thumb drive to the V2, and then use File Commander (MENU>>Sources / Files) to navigate to the thumb drive and then to the script file and execute it by pressing 'OK' button and choosing the "run script" option.

Once the script has finished execution, you'll need to "unmount" the USB thumb drive, so exit back to the main menu, locate the SimpleUmount plugin in the left-most 'Plugins' column and open it. Then select the thumb drive (not the recording drive) and Unmount the thumb drive.

Wait about 30-180 seconds or so, then check/refresh Windows File Explorer. Observe that your recordings that are present on the USB recording drive are now shown in Windows when the correct share name is expanded.
You can use OpenWebif's 'Box Info' to see the device assignment to identify the drive (it's shown at the end of the 'Capacity' line), or in the GUI use MENU>>Information>>Devices list. Or try each share in turn until you get the expected results, you won't break anything :)

Code: Select all

#!/bin/sh
if [ -f /etc/samba/smb-user.conf ] ; then
    cp /etc/samba/smb-user.conf /etc/samba/smb-user.conf.backup.$(date +'%y%m%d_%H%M%S')
fi
cat <<_EOD_ >> /etc/samba/smb-user.conf

# user entries
[media-usb]
  comment = /media/usb
  path = /media/usb
  guest ok = yes
  read only = no

[media-sdb1]
  comment = /media/sdb1
  path = /media/sdb1
  guest ok = yes
  read only = no

[media-sdc1]
  comment = /media/sdc1
  path = /media/sdc1
  guest ok = yes
  read only = no

[media-sdd1]
  comment = /media/sdd1
  path = /media/sdd1
  guest ok = yes
  read only = no
_EOD_
echo '*** finished modifying'
echo '*** wait up to 3 mins and then check the shares'
Attachments
add_USB_to_SMB_config.sh
(660 Bytes) Downloaded 73 times

anthonym
Apprentice
Posts: 51
Joined: Sat Jul 27, 2019 11:45

Re: USB and HDD folders on SD Cards and External HDDs

Post by anthonym » Sat Nov 30, 2019 18:51

Thanks Geoff ,
that worked a treat and couldn't be simpler.

You're a legend!!
I owe you a beer or two :D

That code would be worth a sticky post on the "how to" fix stuff in the V2 folder of this forum.
I'm sure others will find the same problem I did in the future.

Cheers
Anthony

User avatar
peteru
Uber Wizard
Posts: 9735
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: USB and HDD folders on SD Cards and External HDDs

Post by peteru » Sun Dec 01, 2019 11:43

anthonym wrote:
Sat Nov 30, 2019 18:51
That code would be worth a sticky post on the "how to" fix stuff in the V2 folder of this forum.
I'm sure others will find the same problem I did in the future.

Not recommended as a sticky.

While this hack may have given you the results you were looking for, it is by no means a sanctioned approach. Mainly because of the security implications of doing this. The above configuration will expose the content of attached devices on the network. If you happen to attach a drive that has sensitive content, it will appear on the network, without access control and with red/write/delete permissions.

"Beauty lies in the hands of the beer holder."
Blog.

anthonym
Apprentice
Posts: 51
Joined: Sat Jul 27, 2019 11:45

Re: USB and HDD folders on SD Cards and External HDDs

Post by anthonym » Wed Dec 04, 2019 18:55

I see the argument Peter, but why would you want to attach a drive with sensitive material to your PVR? Surely any attached drive would most likely only have recorded TV on it?

User avatar
peteru
Uber Wizard
Posts: 9735
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: USB and HDD folders on SD Cards and External HDDs

Post by peteru » Wed Dec 04, 2019 22:25

Someone could easily connect a backup drive with important / personal / confidential stuff to "just copy a recording to it, because it's the only drive big enough."

The thing about security is, you don't know who will do what and when, so you need to be cautious.

"Beauty lies in the hands of the beer holder."
Blog.

ample
Apprentice
Posts: 85
Joined: Tue May 17, 2016 16:29

Re: USB and HDD folders on SD Cards and External HDDs

Post by ample » Sun Jan 03, 2021 19:06

Not recommended as a sticky.

While this hack may have given you the results you were looking for, it is by no means a sanctioned approach. Mainly because of the security implications of doing this. The above configuration will expose the content of attached devices on the network. If you happen to attach a drive that has sensitive content, it will appear on the network, without access control and with red/write/delete permissions.
---
Hi there,

I'm looking to install this script to allow my networked Win 10 PC to see multiple folders on multiple USB drives attached to my T4. (I already have these multiple drives with content on them and I don't have the budget to replace them all with a large (say, 10TB) NAS, hence the reason for wanting to use the existing drives but manage them for file transfers over my home LAN using the Win 10 File Explorer GUI.)

Q1. Multiple USB drives on a single T4.
I understand from another post that having multiple USB drives on a single T4 isn't recommended and that it may have something to do with the fact that the T4 can allocate drive letters (or the equivalent, sdb1, sdb2 etc.) randomly during the startup sequence. (i.e. it's not like Windows, in which you can set fixed drive letters, C: , D: , E: etc. However, I'm not sure why this would be a problem as, even if the identifiers changed, it would be easy to tell which drive is which by looking at a listing of the contents (e.g. film titles, TV program titles). COuld you elaborate on this for me, please?

Q2. Security issues.
Please could you explain a bit more about this. If I have, say, four USB drives attached to my T4 (soem Seagate drives have a built in USB hub for daisy-chaining), I find that I can access all four of them through the T4's own UI (e.g in "Media" they show up as sdb1, sdb2, USB etc.) With the script installed, (I hope) I can access them all through the Win 10 File Explorer on the PC in my home office (on the same LAN). I may have other USB drives attached to my PC, as well as its internal SSD, or course. Are these other drives (not attached to the T4) at risk in some way? Are they only at risk from attack by other devices on the LAN (which would just my partner's PC in her home office), or are they vulnerable to attack over the internet as well? If any of this is the case, is there a way round it while still giving remote access to all these T4 USB drives and folders?

Q3. More permanent fix by Beyonwiz?
I note that the Movie folder in the internal HDD is available by default through the network. This being the case, is there any possibility that BW might inlude this facility for other devices (and folders) in a futire firmware release?

Many thanks
Paul
Melb

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by Grumpy_Geoff » Sun Jan 03, 2021 19:25

ample wrote:
Sun Jan 03, 2021 19:06
I'm looking to install this script to allow my networked Win 10 PC to see multiple folders on multiple USB drives attached to my T4.

What firmware is the T4 running?

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by Paul_oz53 » Sun Jan 03, 2021 20:37

Hi Paul.

1. Multiple drives
You are correct - when you look at them from file explorer they may shuffle around but they are easy enough to tell apart by their contents.

2. Security issues.
Security is a complex topic so, at one level, your setup has a non-zero degree of vulnerability. However, it seems to me unlikely that the proposed setup materially increases the already present vulnerability. If the PC were infected with ransomeware you may lose access to the T4 drives as well. Personally, I am not worried about security with my setup.

3. Beyonwiz update
Unlikely as few users require the facility. The script is the best option for the few who do want it.

Lastly, the script assumes recent firmware. We need to know your firmware version to be sure it will work for you.
__________________________________
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

ample
Apprentice
Posts: 85
Joined: Tue May 17, 2016 16:29

Re: USB and HDD folders on SD Cards and External HDDs

Post by ample » Mon Jan 04, 2021 11:07

Hi

Please see photo for the relevant firmware version.

A few other questions:

i) Backing up: I've done a backup of the T4 settings (using its menu function). If I go to "Restore" it gives me the option to continue, suggesting that the backup file has been stored properly. However, there is no file name or date and time for the backup file. Somebody suggested that I make two backups, one today and one tomorrow, before modifying the T4 firmware with the script. This is presumably in case there is a problem with the backup which prevents a Restore. If the Restore function doesn't show a file name, version number and/or date, on what basis would I select a file to Restore from? Or, if you create multiple backups, does it display a list of them with dates and times (somewhat like Windows Backup and Restore)?

ii) Alternatives. If few people are attempting to remotely access the external USB drives, what is the usual solution to the internal HDD being full?
- accept this as a limitation of the T4 and delete lower value unwatched content to make way for new content?
- upgrade to a larger internal HDD and copy all content files across to it?
- add USB drives but only interact with them through the Beyonwiz UI (using the remote control)?
- jump straight to using one or more NAS devices?

iii) "Ethernet to USB" adapter/hub? I understand that there are some advantages to using one or more NAS devices rather than 'standard' USB drives. Is it possible to get an adapter or hub to connect one or more USB drives to a LAN, thereby making them into 'pseudo-NAS' which the T4 can interface with? I have seen such adapters with a single USB port for connecting a USB-only printer to a LAN, and also a multi-USB-Port "USB over ethernet" device which claims to support USB hard drives - *but* it has to interface with software running on a Windows PC so it wouldn't work with a T4. Is there something cheaper and simpler (effectively the opposite of a USB-to-ethernet dongle) that doesn't require any drivers or special hardware, that the T4 would see as a NAS-like device on the network? This is the sort of thing I mean, but it says "compatible with Linux, Windows and OS X" which suggests that it needs to interface over the LAN to a computer. Even though the T4 runs on Linux (AFAIK), I assume it's non-trivial (or impossible) to load up the necessary drivers etc. into the T4...?

https://the-gadgeteer.com/2009/07/14/tu ... re%20done.


Thanks
Paul
T4 version info 20210104.jpg

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by Grumpy_Geoff » Mon Jan 04, 2021 11:42

ample wrote:
Mon Jan 04, 2021 11:07
Please see photo for the relevant firmware version.

Okay, firmware 20191106 is the latest general release/production firmware, and modification to the user Samba configuration files will work.
However, that script to modify the Samba user config was designed for uncomplicated setups - it won't work well for multi-partitioned drives, as it only shares the first partition.
For example, take your setup as posted here - viewtopic.php?f=50&t=13230#p178590
The Seagate Backup Plus "Hub" drive has two partitions and it's the 2nd one that has the NTFS partition.
The 80GB Toshiba MK80 2.5" HDD has two partitions - the 1st being an NTFS partition and the 2nd FAT32 "RECOVERY".
You may be better served to run a modified version - attached below as "Paul_add_USB_to_SMB_config.sh"

I don't know if the Seagate "Hub" drive attached as /dev/sdb, with an unmounted partition #1 "sdb1", and its /dev/sdb2 partition #2 will be mounted as /media/usb.
Of course, drive enumeration may alter the device assignment :)

ample wrote: A few other questions:

i) Backing up: I've done a backup of the T4 settings (using its menu function). If I go to "Restore" it gives me the option to continue, suggesting that the backup file has been stored properly. However, there is no file name or date and time for the backup file. Somebody suggested that I make two backups, one today and one tomorrow, before modifying the T4 firmware with the script. This is presumably in case there is a problem with the backup which prevents a Restore. If the Restore function doesn't show a file name, version number and/or date, on what basis would I select a file to Restore from? Or, if you create multiple backups, does it display a list of them with dates and times (somewhat like Windows Backup and Restore)?

Backup files timestamps (and sizes) can be checked by using File Commander (MENU>>Sources / Files) to navigate through "T4 (Intenbal HDD)", then "backup", then "beyonwiz", then "v1".
The most recent settings backup will be named "enigma2settingsbackup.tag.gz". Older backups will have a YYYY-MM-DD- prefix.
You can use the "Software Management" plugin's Advanced options>>Advanced restore function to restore from other than the latest backup file.

ample wrote: ii) Alternatives. If few people are attempting to remotely access the external USB drives, what is the usual solution to the internal HDD being full?
- accept this as a limitation of the T4 and delete lower value unwatched content to make way for new content?
- upgrade to a larger internal HDD and copy all content files across to it?
- add USB drives but only interact with them through the Beyonwiz UI (using the remote control)?
- jump straight to using one or more NAS devices?

I think you'll find one of those solutions have been adopted at times by many users.


Modified Samba user config alteration script.
Paul_add_USB_to_SMB_config.sh
(1.16 KiB) Downloaded 42 times

Code: Select all

 
#!/bin/sh
if [ -f /etc/samba/smb-user.conf ] ; then
    cp /etc/samba/smb-user.conf /etc/samba/smb-user.conf.backup.$(date +'%y%m%d_%H%M%S')
fi
cat <<_EOD_ >> /etc/samba/smb-user.conf

# user entries
[media-usb]
  comment = /media/usb
  path = /media/usb
  guest ok = yes
  read only = no

# /dev/sdb1 => /media/usb (media-usb above?)
# or maybe 
# /dev/sdb2 => /media/usb (media-usb above?)
# thus "[media-sdb2]" may be erroneous and not exist...
[media-sdb2]
  comment = /media/sdb2
  path = /media/sdb2
  guest ok = yes
  read only = no

[media-sdc1]
  comment = /media/sdc1
  path = /media/sdc1
  guest ok = yes
  read only = no

[media-sdc2]
  comment = /media/sdc2
  path = /media/sdc2
  guest ok = yes
  read only = no

[media-sdd1]
  comment = /media/sdd1
  path = /media/sdd1
  guest ok = yes
  read only = no

[media-sdd2]
  comment = /media/sdd2
  path = /media/sdd2
  guest ok = yes
  read only = no

[media-sde1]
  comment = /media/sde1
  path = /media/sde1
  guest ok = yes
  read only = no

[media-sde2]
  comment = /media/sde2
  path = /media/sde2
  guest ok = yes
  read only = no
_EOD_
echo '*** finished modifying'
echo '*** wait up to 3 mins and then check the shares'

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by MrQuade » Mon Jan 04, 2021 11:53

ample wrote:
Mon Jan 04, 2021 11:07
i) Backing up: I've done a backup of the T4 settings (using its menu function). If I go to "Restore" it gives me the option to continue, suggesting that the backup file has been stored properly. However, there is no file name or date and time for the backup file. Somebody suggested that I make two backups, one today and one tomorrow, before modifying the T4 firmware with the script. This is presumably in case there is a problem with the backup which prevents a Restore. If the Restore function doesn't show a file name, version number and/or date, on what basis would I select a file to Restore from? Or, if you create multiple backups, does it display a list of them with dates and times (somewhat like Windows Backup and Restore)?
Each backup is stored in a different file. By default, the "restore" function will only restore from the latest backup file.
To restore from a previous backup file, you need to perform an "advanced restore".
This is done via the software management plugin (from memory).
ample wrote:
Mon Jan 04, 2021 11:07
ii) Alternatives. If few people are attempting to remotely access the external USB drives, what is the usual solution to the internal HDD being full?
- accept this as a limitation of the T4 and delete lower value unwatched content to make way for new content?
- upgrade to a larger internal HDD and copy all content files across to it?
- add USB drives but only interact with them through the Beyonwiz UI (using the remote control)?
- jump straight to using one or more NAS devices?
The usual strategy is to archive stuff that you want to keep to a NAS or some other location. The Wiz is a PVR primarily, and not really intended to be a bulk storage server.
If you take a step back and analyse what you are storing, you may find that there is a lot of content there you can simply delete. Ask yourself are you going to re-watch stuff you have seen already, and with so much saved, will you have time to even watch a good portion of it a first time?
Keep stuff that is likely to be irreplaceable, but just about anything else can usually be accessed via streaming service, physical media, or just pirated if it cannot be bought legally.

You can also save space on archived media by re-encoding to a lower bit-rate using a more advanced codec, or by trimming out ads and whatnot. A bit of a manual process.

Honestly though, I have had to do the same soul searching myself with my own media hoarding habits. There may come a point where you realise you simply don't need it.
ample wrote:
Mon Jan 04, 2021 11:07
iii) "Ethernet to USB" adapter/hub? I understand that there are some advantages to using one or more NAS devices rather than 'standard' USB drives. Is it possible to get an adapter or hub to connect one or more USB drives to a LAN, thereby making them into 'pseudo-NAS' which the T4 can interface with? I have seen such adapters with a single USB port for connecting a USB-only printer to a LAN, and also a multi-USB-Port "USB over ethernet" device which claims to support USB hard drives - *but* it has to interface with software running on a Windows PC so it wouldn't work with a T4. Is there something cheaper and simpler (effectively the opposite of a USB-to-ethernet dongle) that doesn't require any drivers or special hardware, that the T4 would see as a NAS-like device on the network?
Simple devices like the one you are describing, are often a way to connect a single PC to a network connected disk, and don't have the capability to serve data for general access to multiple PCs an media devices.
You can certainly get single disk NAS devices, though you are looking at $200-$250. It's not that cost effective really.
You can built a cheap PC and connect your drives into that to act as a NAS/server.
If you need a lot of storage though, then the NAS is the way to go, for both reliability and features. They generally don't come cheap though.
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

ample
Apprentice
Posts: 85
Joined: Tue May 17, 2016 16:29

Re: USB and HDD folders on SD Cards and External HDDs

Post by ample » Mon Jan 04, 2021 12:14

Thanks for all this - much to re-read and digest. I'll try the modified script.

Comments about hoarding content are noted - and the irony is that I watch very little TV anyway (perhaps an hour a day...). Sometimes sit down to watch a film that we've recorded.

The problem is... with so much stuff being broadcast every day, there's always the feeling "ah, that looks good, might want to watch that sometime..." Also old films, like Casablanca, which I've seen as a live broadcast several times.. am I going to watch it again? Then there are old shows from childhood (e.g. the original Thunderbirds) which have greater nostalgic appeal the older I get (I'm 61 now). But many of these are available on YouTube (albeit with annoying ads sometimes, although speed-up plug-ins for the browser can sometimes reduce the intrusiveness). And we do have a Netflix subscription, which is mainly used by my wife (she watches more TV than it do).

I used to have an old Sony PVR without an EPG, and the effort of setting start and stop times for all the recordings certainly acted as a deterrent!

Anyway... one other thought... If I dig out an old router with a USB socket on it, would a connected USB drive be visible to the T4? If I daisy chain a number of Seagate drives (via their internal USB hubs), would they all be visible to the T4 via that router?

This has all very very educational for me - thanks!

Tks
Paul

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

Re: USB and HDD folders on SD Cards and External HDDs

Post by Paul_oz53 » Mon Jan 04, 2021 13:50

Hi Paul,

As noted, there is an advanced menu for restoring earlier backups. It's hidden in the Plugins menu under Software management. It stores one backup per day.

If one absent mindedly makes a backup after reinstalling the firmware it will overwrite the last backup the same day. Then, if you find a problem, you cannot revert to earlier settings. By having the extra backup available you can sidestep this trap.

The router idea may work if you assign it an IP address in the same network but it may not. How well chaining USB drives works is unknown. You would have to have the host PC share them at a minimum.
__________________________________
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: 32703
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

Re: USB and HDD folders on SD Cards and External HDDs

Post by prl » Mon Jan 04, 2021 15:27

Paul_oz53 wrote:
Mon Jan 04, 2021 13:50
As noted, there is an advanced menu for restoring earlier backups. It's hidden in the Plugins menu under Software management.

Specifically in PLUGIN>Software management>Advanced options>Advanced restore.
Paul_oz53 wrote:
Mon Jan 04, 2021 13:50
It stores one backup per day.

I first read that as "it stores one backup every day", but it's really "at most one backup for any given day".

The most recent backup is called enigma2settingsbackup.tar.gz, and that's the backup file that's used when you use the normal "Restore backup" in the setup screens.

Older backup files are timestamped with a prefix of the date the backup was done, e.g: 2020-11-24-enigma2settingsbackup.tar.gz. That's why only the most recent backup done on any given day is stored.

Settings backup files are never deleted by the system. They're typically about 500kB each unless you've added stuff into the list of files/directories backed up. You can weed out old backups by using the File Commander (MENU>Sources / Files) and navigating to /media/hdd/backup/beyonwiz/v1 and using the file deletion function in File Commander to remove old files.

Don't add files (or especially directories) to the backup list unless you really know what you're doing. You can cause some seriously strange behavior (and even crashes) if you backup and (much later) the restore the wrong files.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

Post Reply

Return to “General Topics V2”