Author Topic: mce planning: Parental controls and NAS mount/unmount  (Read 9574 times)

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: mce planning: Parental controls and NAS mount/unmount
« Reply #15 on: March 11, 2009, 09:12:01 pm »
The upshot of this automounting is that when the device is online, all the media in it is merged into the same media browser views with your other media. When the device goes offline, LMCE simply doesn't display that media any more. At worst this will only take until the next UpdateMedia scan marks the media as offline, which runs every 2 mins, but maybe even faster than that.
<snip>....

Your absolutely right Colin...we see this on Core's with say 4 x Data drives installed and also when we install NAS's. The problem is, as you correctly suggest, when the automounter un-mounts the drive the media from that drive will disappear...as UpdateMedia cannot differentiate between a drive that was unmounted because it was removed and a drive that was 'unmounted' temporarily by the systems. Once this has happened the user looses any access to the 'missing' media from the Orbiter... until something 'wakes' up the drive again and it gets remounted... then UpdateMedia will scan it and re-add it again.

Currently we use a 'hack' to get around this. We add a small bash script that runs at boot time and creates a screen session and then simply cd's into one of the symlinks to the device in /home/public/data/audio or videos. This keeps the drive mounted and available... its not very clean...but for now it works.

We plan to work on a more elegant fix asap ;-)

All the best

Andrew

I'm not sure I was describing a problem here (not the one you are Andrew, anyway!)  ... I was trying to point out how LMCE presents and hides media correctly based on whether a source is genuinely available or not... ie a good thing :)

Well this is a problem Colin... because once the NAS has been forced offline it disappears from the Media Browser (if you have a large media library the time it takes for it to 'reappear' can be a long time... upto 45 mins+). During this period, from the user perspective, all of the media on the NAS has mysteriously disappeared! If you watch Core's with NAS's attached & Core's where you have say 4 sata drives installed purely for media storage... the mounts are continuously disappearing... and can take an age to reappear.

All the best

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: mce planning: Parental controls and NAS mount/unmount
« Reply #16 on: March 11, 2009, 09:24:38 pm »
I can see that would be a problem, haven't seen that, do you mean this happens all the time whenever the automount system umounts a NAS? Wow, surprised I haven't heard that one before I would have thought that effected a lot of people?

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: mce planning: Parental controls and NAS mount/unmount
« Reply #17 on: March 11, 2009, 09:59:43 pm »
I can see that would be a problem, haven't seen that, do you mean this happens all the time whenever the automount system umounts a NAS? Wow, surprised I haven't heard that one before I would have thought that effected a lot of people?

Yep... as far as we can tell it does. Many people with just small amounts of content may not notice it... but as your media library grows it seems to become more of a problem. We are still trying to understand what the mechanism for this is... we think right now that it might need a refactoring of the StorageRadar scripts in some way... but thats not 100% definite yet.

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: mce planning: Parental controls and NAS mount/unmount
« Reply #18 on: March 11, 2009, 10:04:32 pm »
I have all my media on a Windows share on the internal network. ~2600 video files, ~8800 pictures and ~6800 music files, and I never see this at all. Are you saying it only happens when you have lots of shares around the house, or what is the criteria?

tkmedia

  • wants to work for LinuxMCE
  • **
  • Posts: 937
    • View Profile
    • LMCECompatible
Re: mce planning: Parental controls and NAS mount/unmount
« Reply #19 on: March 12, 2009, 02:01:27 am »
Quote
I have all my media on a Windows share

Well its windows... so I imagine you reboot it periodically. ;D

I was using a cheap Iomega nas and thought that might be the problem.
Generally a reboot would bring it back....
Recently Put in a freenas worked great 30 days or so.... while I was feeding it new stuff.
Strangely enough now it seems to be dropping periodically


Tim

My Setup http://wiki.linuxmce.org/index.php/User:Tkmedia

For LinuxMce compatible  systems and accessories
http://lmcecompatible.com/

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: mce planning: Parental controls and NAS mount/unmount
« Reply #20 on: March 12, 2009, 03:24:15 am »
I have all my media on a Windows share on the internal network. ~2600 video files, ~8800 pictures and ~6800 music files, and I never see this at all. Are you saying it only happens when you have lots of shares around the house, or what is the criteria?

Well it seems to be more likely to happen on NAS's with a large amount of content (customer who has 55,000 audio tracks and still ripping ;-) )... but it can also occur on NAS's with very little content. It certainly has nothing whatsoever to do with the make of the NAS or whether its a real Windows Share or not. We have tested all kinds of NAS's from IcyBox's running FreeNAS to UnRAID on a racked unit.

The issue is in LinuxMCE's StorageRadar scripts themselves for sure... sometimes they work just fine (as is clearly the case for you) and in others they dont... what causes this difference in behaviour is not clear yet.

Can you describe in detail how your NAS is used? Do you ever leave a ssh or Konsole session open after having 'cd' into one of the NAS's share's?...or have a screen session for some reason doing the same thing? In either case this will keep the share mounted... and mask the problem completely as the StorageRadar scripts will not unmount a share that is being used.

All the best

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: mce planning: Parental controls and NAS mount/unmount
« Reply #21 on: March 12, 2009, 10:39:14 am »
Andrew,

one thing I noticed locally is, if I define shares to be used with lmce directory structure, and automatically, they tend to stay connected. My audio library is only around 26k files, but it still takes a long time, when I did loose the connection. Since I have defined it to have the lmce structure AND allowed lmce to utilize it automatically things are fine.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: mce planning: Parental controls and NAS mount/unmount
« Reply #22 on: March 12, 2009, 12:39:02 pm »
Quote
I have all my media on a Windows share

Well its windows... so I imagine you reboot it periodically. ;D

I was using a cheap Iomega nas and thought that might be the problem.
Generally a reboot would bring it back....
Recently Put in a freenas worked great 30 days or so.... while I was feeding it new stuff.
Strangely enough now it seems to be dropping periodically


Tim



Sorry Tim, much as I would like to agree.... I am currently rebooting my core on average about every 4 days (sometimes by choice, but I still get instances occasionally where it locks), whereas my XP machine runs at least 3 weeks between reboots on average ... I never log out and constantly leave many applications and firefox sessions open - 13 ff sessions at the moment and that's about the norm.) Certainly, I have had periods of 2 weeks or more without having to reboot my core.... rarely anything like that for XP, generally only for the interminable windows updates! And yet I still consider my LMCE to be more stable than my windows system :) pls don't ask me to justify that, it just is ... so there!


Andrew - I don't have a NAS (never mentioned one!) I have a D drive on my XP machine, on that I have a root level folder called Media which is shared out as the same. Then the LMCE structure is under that. I never turn off this machine, and it is rarely if ever off line. On your ssh/Konsole question, no, never. I rarely, if ever, cd into the media folders either from the core or my MD. In fact I would say that the only times I access those folders is from outside those folders doing a cp/mv to move files around, and that is only once in a blue moon. I can think of nothing that would stimulate autofs to maintain the mounts except playing media. Whilst we watch a lot of stuff, it can't be said to be continuous :)

When I check my windows security log, I see both the core and MD regularly authenticating against the share. Similarly, when I check the windows share admin point, there are regularly connections from the core when we are not watching anything. Authentications probably every 5 seconds. Connections seem less frequent, but sometimes last for minute or so at a time, which I interpret as UpdateMedia. Note, I _always_ create the share in the device tree with manual credentials at the share and server object levels... that would be something worth checking for you. This is a hang over from when I first set up LMCE, and it couldn't by default scan the folders even though it found them on its own, but didn't prompt for credentials. I have just gotten used to adding those details... don't know if it is still needed, but it could be material to maintaining the share as mounted I suppose.

Again, I mention that I normally only have a single share with media on it.... sounded like your environment was with many shares... also I don't have any local media drives on the core other than the root drive and that has no media on it....