LinuxMCE Forums

General => Users => Topic started by: thedaver on January 21, 2009, 11:51:16 pm

Title: mce planning: Parental controls and NAS mount/unmount
Post by: thedaver on January 21, 2009, 11:51:16 pm
Hi all!  starting the process to spec out and build an MCE, really looking forward to it!  I'll prob b asking quite a few questions for a while, appreciate all input (and patience)!

Q1) I saw a thread in the forum from mid-2007 regarding the implementation of Parental Controls; what's the status of Parental controls over what can be viewed (or even listed) in MCE?  Does the answer vary by media source?  (cable vs local media vs disk media vs. mounted media)??? 

Q2) related to parental controls, I have a NAS with a good bit of video media that I'd like to expose to MCE once it's built.  that NAS has two Windoze shares: 1) that's kid-friendly content, and 2) that isn't terribly kid friendly.  Currently under my linux desktop I just mount and unmount the shares to suit my needs.... what tools/strategies are available in MCE to deal with that? 

I kind of hope that the answer to #2 is related to #1 since that would allow me to leave the mounts active all the time and would let MCE manage viewing privs.... also dunno how upset MCE would be from a "library" or "index" perspective if a mount/share was enabled/disabled frequently... maybe that's my question #3?

Thanks again!
Dave.
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: tkmedia on January 22, 2009, 05:55:32 am
media can be public or private just make your private shares private.


Tim
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: colinjones on January 22, 2009, 06:23:10 am
media can be public or private just make your private shares private.


Tim

Although, to be fair Tim, this functionality isn't really working very well at the moment is it?! Do you know if any fixes made it into the alpha on that?
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: krys on January 22, 2009, 03:51:32 pm
I was also under the impression that private media shows up regardless, I have ripped movies to private and they were available to all users
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: tkmedia on January 22, 2009, 04:47:58 pm
works for music I don't see my kids rap ... hmm i have no pr0n so I haven't  tried it with video




Tim
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: thedaver on January 22, 2009, 06:15:45 pm
Can you gurus also comment on the issues (or lack of) that arise when a share full of media is mounted, acquired by MCE's library, and then unmounted, then remounted...   I have to assume this happens a lot (for maintenance if nothing else)..., just wanted to know your insights.  THX!
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: tschak909 on January 22, 2009, 07:03:27 pm
LinuxMCE uses an autofs4 automounter, with a very short timeout.

This automounter has probably one of the most intricate scripts attached to it to mount the correct device the correct way, no matter where in the house it is...

due to this and the timeout, the disk is mounted when accessed, and then almost immediately unmounted when done. This was done to facilitate hot plug action.

-Thom
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: colinjones on January 22, 2009, 07:48:47 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.

tk - in filename mode my "private" videos are simply not visible at all even after choosing the user and entering the PIN. You can only see them via tags. And if memory serves, you can still find them by searches even without switching to the user and entering the PIN... so from what I see, public/private does not work at all currently (at least for video) and hasn't for a long time.
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: tschak909 on January 22, 2009, 11:13:35 pm
private mode works, the videos must be tagged with at least a title.

and you're right, private media is currently still visible during a search. A query change in the media plugin can fix this.

-Thom
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: colinjones on January 22, 2009, 11:25:04 pm
Thom - thanks for the clarification. Private media is definately not visible in Filename sort mode ... unless you mean even then you have to tag at least the title (which is counterintuitive with the rest of the system) as that what you meant? Can that requirement be removed so that it works like the rest of the media browser grids?
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: tkmedia on January 22, 2009, 11:27:00 pm
Colin if that is the case could you maybe define what works and what doesn't and submit a trac ticket to see what we may be able to fix for 0810. Be sure to select correct version of lmce when submitting.



Thanks


Tim
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: tschak909 on January 22, 2009, 11:27:15 pm
by default, updatemedia will assign title as filename if there is no title attribute present.. sort by filename currently does not work in that mode because the root pathname for private media is different from public media. This needs to be patched. Again, Media Plugin is the culprit here.

-Thom
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: colinjones on January 22, 2009, 11:29:01 pm
ah ha, got it!
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: totallymaxed on March 11, 2009, 01:33:32 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
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: colinjones on March 11, 2009, 08:38:37 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 :)
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: totallymaxed 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
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: colinjones 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?
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: totallymaxed 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
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: colinjones 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?
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: tkmedia 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

Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: totallymaxed 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
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: posde 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.
Title: Re: mce planning: Parental controls and NAS mount/unmount
Post by: colinjones 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....