'mvdisks' question

peterworks

Ye Olde Bowler
I have removed the disk from my old humax and put it into a caddy and connected it to my other humax. I have left the folder/file structure in place and it works fine.
I installed mvdisk this morning and when I now look in My Video I see USB Storage listed. However when I open USB Storage and drill down to the My Video folder it doesn't show anything.
Should I move the My Video folder and, if so, where ? or is there something else going on...
 
The code says that the mount is at /mnt/hd2/My Video/ [USB Storage].

I assume HDRs are involved.

/tmp/modinit.log may help.
 
Thanks @/df for your response.
Yes HDRs are involved. The disk in the USB caddy is straight out of a HDR.
Here is the relevant section of the modinit log showing the amount stored on the USB:
modinit log.jpg

and here is the entry in My Video:
My Video.jpg

There are a couple of hundred GB's of recordings on drive2/My Video but they are inaccessible through this method.
Using the 'change storage' on the Humax itself fully displays all folders/files on the USB once drilled down to.
 
What does ls -lR "/media/My Video/ [USB Storage]/" reveal?
Although based on those 4.0KiB annotations I think I already know the answer.
 
Maybe it was /tmp/rag.log that I should have asked for, then. One of the two should log the mvdisks code. I wonder if the code handles USB disks with multiple partitions properly.
 
I assume HDRs are involved.
Yes HDRs are involved.
@peterworks I think /df meant as opposed to HD-FOX... IIRC he's only running on HD-FOX.


I wonder if the code handles USB disks with multiple partitions properly.
Looks like not!

Can anyone help please ?
On that presumption, you could try attacking the disk with a partition editor and remove all but the media partition.

However, I am concerned that mounting what the Humax code is likely to see as "extra space" into My Video using mvdisks (or using shareFolder=On in NSA) isn't a good idea. Can anyone confirm whether the disk utilisation figures are (or are not) affected by this? Hypothesised problems are:
  • When recording, the unit will think it has more space available than it actually does, or less space than it actually does (if the recordings on the external drive are subtracted from the space on the internal drive);

  • The DLNA indexer will scan the attached drive (as part of the My Video file system);

  • The shutdown process will take much longer while the thumbnail generator scans the attached drive (as part of the My Video file system)
 
Last edited:
The DLNA indexer will scan the attached drive (as part of the My Video file system)
I believe that's the whole point of it - the description says "Mounts external drives under "My Video" to allow export by the DLNA server".
Output is:
As expected. I'll try it when I get chance.
What happens if you do this from the command line: mount --bind /media/drive2 "/media/My Video/ [USB Storage]/drive2"
Does it give an error message, or does it make it work?
 
The DLNA configuration database contains the indexable locations, but there might be several hurdles to getting the settop program to recognise and not overwrite any changes.

The mount command makes it work :)
This was supposed to have happened already in the zmvdisks mdev script (here, for the second partition on the external disk we should have mp="/media/drive2" and shadmp="/mnt/hd2/My Video/ [USB Storage]/drive2"):
Code:
mount --bind "$mp" "$shadmp"
What actually happened should be shown in the /tmp/rag.log.
 
Last edited:
From rag.log (hopefully the correct section)
305707:18/04/2022 11:06:24 +0000: sda: Non-removable disk, skipping package scan.
304707:18/04/2022 11:06:24 +0000: Considering package scan on /media/drive1
303707:18/04/2022 11:06:24 +0000: <<< /mod/etc/mdev/zmvdisks
302cannot create directory `/mnt/hd2/My Video/ [USB Storage]/drive1': File exists
301707:18/04/2022 11:06:23 +0000: /media/drive1 /tmp/tmp.xfqm6m
300707:18/04/2022 11:06:23 +0000: >>> /mod/etc/mdev/zmvdisks add /dev/sda1
299707:18/04/2022 11:06:23 +0000: <<< /mod/etc/mdev/z9samba
298709:18/04/2022 11:06:23 +0000: sda: Non-removable disk, skipping package scan.
297709:18/04/2022 11:06:23 +0000: Considering package scan on /media/drive3
296709:18/04/2022 11:06:23 +0000: <<< /mod/etc/mdev/zmvdisks
295cannot create directory `/mnt/hd2/My Video/ [USB Storage]/drive3': File exists
294709:18/04/2022 11:06:22 +0000: /media/drive3 /tmp/tmp.cXcBcJ
293709:18/04/2022 11:06:22 +0000: >>> /mod/etc/mdev/zmvdisks add /dev/sda3
292709:18/04/2022 11:06:22 +0000: <<< /mod/etc/mdev/z9samba
2911241:18/04/2022 11:06:22 +0000: sdb: Non-removable disk, skipping package scan.
2901241:18/04/2022 11:06:22 +0000: Considering package scan on /mnt/hd1
2891241:18/04/2022 11:06:22 +0000: <<< /mod/etc/mdev/zmvdisks
288cannot create directory `/mnt/hd2/My Video/ [USB Storage]/mnt/hd1': No such file or directory
2871241:18/04/2022 11:06:22 +0000: /mnt/hd1 /tmp/tmp.YWqOe0
2861241:18/04/2022 11:06:22 +0000: >>> /mod/etc/mdev/zmvdisks add /dev/sdb1
2851241:18/04/2022 11:06:22 +0000: <<< /mod/etc/mdev/z9samba
284710:18/04/2022 11:06:21 +0000: sda: Non-removable disk, skipping package scan.
283710:18/04/2022 11:06:21 +0000: Considering package scan on /media/drive2
282710:18/04/2022 11:06:21 +0000: <<< /mod/etc/mdev/zmvdisks
281cannot create directory `/mnt/hd2/My Video/ [USB Storage]/drive2': File exists
280710:18/04/2022 11:06:21 +0000: /media/drive2 /tmp/tmp.Fedel0
279710:18/04/2022 11:06:21 +0000: >>> /mod/etc/mdev/zmvdisks add /dev/sda2
278710:18/04/2022 11:06:21 +0000: <<< /mod/etc/mdev/z9samba
2771244:18/04/2022 11:06:20 +0000: sdb: Non-removable disk, skipping package scan.
2761244:18/04/2022 11:06:20 +0000: Considering package scan on /mnt/hd2
2751244:18/04/2022 11:06:20 +0000: <<< /mod/etc/mdev/zmvdisks
274cannot create directory `/mnt/hd2/My Video/ [USB Storage]/mnt/hd2': No such file or directory
2731244:18/04/2022 11:06:20 +0000: /mnt/hd2 /tmp/tmp.MrSOR5
2721244:18/04/2022 11:06:20 +0000: >>> /mod/etc/mdev/zmvdisks add /dev/sdb2
2711244:18/04/2022 11:06:20 +0000: <<< /mod/etc/mdev/z9samba
2701250:18/04/2022 11:06:19 +0000: sdb: Non-removable disk, skipping package scan.
2691250:18/04/2022 11:06:19 +0000: Considering package scan on /mnt/hd3
2681250:18/04/2022 11:06:19 +0000: <<< /mod/etc/mdev/zmvdisks
267cannot create directory `/mnt/hd2/My Video/ [USB Storage]/mnt/hd3': No such file or directory
2661250:18/04/2022 11:06:19 +0000: /mnt/hd3 /tmp/tmp.VCmOUO
2651250:18/04/2022 11:06:19 +0000: >>> /mod/etc/mdev/zmvdisks add /dev/sdb3
2641250:18/04/2022 11:06:19 +0000: <<< /mod/etc/mdev/z9samba
2631241:18/04/2022 11:06:18 +0000: /mnt/hd1 /tmp/tmp.G1kMPq
2621241:18/04/2022 11:06:18 +0000: >>> /mod/etc/mdev/z9samba add /dev/sdb1
2611241:18/04/2022 11:06:18 +0000: completed after 19 seconds.
260707:18/04/2022 11:06:18 +0000: /media/drive1 /tmp/tmp.5QoVqM
259707:18/04/2022 11:06:18 +0000: >>> /mod/etc/mdev/z9samba add /dev/sda1
258710:18/04/2022 11:06:18 +0000: /media/drive2 /tmp/tmp.A5PM2n
257710:18/04/2022 11:06:18 +0000: >>> /mod/etc/mdev/z9samba add /dev/sda2
256707:18/04/2022 11:06:18 +0000: completed after 28 seconds.
2551244:18/04/2022 11:06:18 +0000: /mnt/hd2 /tmp/tmp.XOlD9E
2541244:18/04/2022 11:06:17 +0000: >>> /mod/etc/mdev/z9samba add /dev/sdb2
253710:18/04/2022 11:06:17 +0000: completed after 24 seconds.
252709:18/04/2022 11:06:17 +0000: /media/drive3 /tmp/tmp.t75ui3
251709:18/04/2022 11:06:17 +0000: >>> /mod/etc/mdev/z9samba add /dev/sda3
2501250:18/04/2022 11:06:17 +0000: /mnt/hd3 /tmp/tmp.Qjrn9C
2491250:18/04/2022 11:06:17 +0000: >>> /mod/etc/mdev/z9samba add /dev/sdb3
2481250:18/04/2022 11:06:17 +0000: completed after 11 seconds.
247709:18/04/2022 11:06:17 +0000: completed after 24 seconds.
2461244:18/04/2022 11:06:17 +0000: +++ Modinit complete +++
 
Can it be as simple as failing to perform the mount when the mount point is already present?

What about this change to /mod/etc/init.d/mdev/zmvdisks l.20?
Code:
-	mkdir "$shadmp" || exit 1
+	mkdir -p "$shadmp" || exit 1
If that works, it might be worth adding a check for something already being mounted on "$shadmp".
 
Last edited:
What - you mean a quick fudge rather than fix the actual problem? Yes, add a startup script to /mod/etc/init.d, eg (note I've not tested this):
  1. WebIF >> Diagnostics >> File Editor >> Create File >> /mod/etc/init.d/S99peterworks

  2. Paste the following into the text edit box:
    Code:
    #!/bin/sh
    mount --bind /media/drive2 "/media/My Video/ [USB Storage]/drive2"

  3. Click Save, then click Make Executable.
The "99" decides where in the boot process the script gets run. 99 will be after everything else (that isn't 99).

However, maybe you want to try out /df's suggestions first?
 
Last edited:
Thanks @/df that worked perfectly. Did notice that I have an extra folder displayed (mnt):
Capture 18-04-2022 16_42_01.jpg

Thanks @Black Hole - didn't realise that it was me who should make the change rather than a general observation (sorry /df).
Will keep your startup script for future reference.

Edit: Not so perfectly - all folders in My Video are displayed but single recordings are not...
 
Back
Top