Hi,
How is it possible, to mount the video directory in read-only mode?
I want to use a slave vdr like this:
vdr -Pstreamdev-client -Pxineliboutput -v/net/media/data/video
But it does not work, because /net/media/data is mounted read-only.
The slave vdr should not write anything, just read the recordings.
TIA for any hints,
On Tue, Mar 5, 2013 at 1:35 AM, Peter Münster pmlists@free.fr wrote:
How is it possible, to mount the video directory in read-only mode?
I want to use a slave vdr like this:
vdr -Pstreamdev-client -Pxineliboutput -v/net/media/data/video
But it does not work, because /net/media/data is mounted read-only.
The slave vdr should not write anything, just read the recordings.
IIRC it's not possible, IIRC... A workaround is to use the mplayer plugin and add your recordings dir to the sources list. Then make the recordings dir /tmp or something. Maybe you could even use /dev/null, I dunno.
On Tue, Mar 05 2013, VDR User wrote:
A workaround is to use the mplayer plugin
I prefer the VDR interface. Finally it's very easy:
I've just deleted the lines
--8<---------------cut here---------------start------------->8--- if (!DirectoryOk(VideoDirectory, true)) { fprintf(stderr, "vdr: can't access video directory %s\n", VideoDirectory); return 2; } --8<---------------cut here---------------end--------------->8---
in vdr.c and now it works as expected... :)
On Tue, Mar 5, 2013 at 4:23 PM, Peter Münster pmlists@free.fr wrote:
A workaround is to use the mplayer plugin
I prefer the VDR interface. Finally it's very easy:
I've just deleted the lines
--8<---------------cut here---------------start------------->8--- if (!DirectoryOk(VideoDirectory, true)) { fprintf(stderr, "vdr: can't access video directory %s\n", VideoDirectory); return 2; } --8<---------------cut here---------------end--------------->8---
in vdr.c and now it works as expected... :)
With no bad side effects?
Hi!
Am 03/05/13 10:35, schrieb Peter Münster:
How is it possible, to mount the video directory in read-only mode?
I want to use a slave vdr like this:
vdr -Pstreamdev-client -Pxineliboutput -v/net/media/data/video
But it does not work, because /net/media/data is mounted read-only.
The workaround I use is to mount the server in a subdirectory e.g. mount the server-directory to /net/media/data/video/servervideo and start the client-vdr like this: vdr -Pstreamdev-client -Pxineliboutput -v/net/media/data/video
Regards, Stephan.
On Wed, Mar 06 2013, Stephan Loescher wrote:
The workaround I use is to mount the server in a subdirectory e.g. mount the server-directory to /net/media/data/video/servervideo and start the client-vdr like this: vdr -Pstreamdev-client -Pxineliboutput -v/net/media/data/video
On Wed, Mar 06 2013, Udo Richter wrote:
You can always mount an unionfs or aufs on top of the read only mount, and redirect all write access to a local disk or ram disk. That way VDR will be able to write its status files without changing the source file system.
Hi Stephan and Udo,
Unfortunately I don't understand. Could you please show examples?
I have for example this directory: /net/media/data/video/Pippi-geht-von-Bord/2010-07-31.06.55.50.99.rec The slave (nfs-client) should read it, but it should not write anything to this directory (or its parents). Is this possible with your solutions?
TIA,
2013/3/6 Peter Münster pmlists@free.fr:
On Wed, Mar 06 2013, Stephan Loescher wrote:
The workaround I use is to mount the server in a subdirectory e.g. mount the server-directory to /net/media/data/video/servervideo and start the client-vdr like this: vdr -Pstreamdev-client -Pxineliboutput -v/net/media/data/video
On Wed, Mar 06 2013, Udo Richter wrote:
You can always mount an unionfs or aufs on top of the read only mount, and redirect all write access to a local disk or ram disk. That way VDR will be able to write its status files without changing the source file system.
Hi Stephan and Udo,
Unfortunately I don't understand. Could you please show examples?
I have for example this directory: /net/media/data/video/Pippi-geht-von-Bord/2010-07-31.06.55.50.99.rec The slave (nfs-client) should read it, but it should not write anything to this directory (or its parents). Is this possible with your solutions?
With a union filesystem you can mount the lower level read only and have an upper layer where changes get stored. So yes - the master file system will for sure not be touched and you can keep VDR as is and keep full functionality.
Am 06.03.2013 21:56, schrieb Peter Münster:
On Wed, Mar 06 2013, Stephan Loescher wrote: On Wed, Mar 06 2013, Udo Richter wrote:
You can always mount an unionfs or aufs on top of the read only mount, and redirect all write access to a local disk or ram disk. That way VDR will be able to write its status files without changing the source file system.
Hi Stephan and Udo,
Unfortunately I don't understand. Could you please show examples?
I have for example this directory: /net/media/data/video/Pippi-geht-von-Bord/2010-07-31.06.55.50.99.rec
Just improvising, haven't tested it, but should give you a hint how to do it:
- assuming /net/media is an NFS mount or similar - create a folder /net/media-tmp (optionally mount an tmpfs on it) - create a folder /net/media-rw - mount -t aufs -o br:/net/media-tmp:/net/media aufs /net/media-rw
Now you have a virtual copy of /net/media in /net/media-rw, fully writeable, where all write access goes to /net/media-tmp instead, leaving /net/media untouched. You can play back /net/media-rw/data/video/Pippi-geht-von-Bord/2010-07-31.06.55.50.99.rec just as before, you can even delete it, but the recording will only disappear within /net/media-rw, the original copy in /net/media stays untouched.
Cheers,
Udo
Hi!
The workaround I use is to mount the server in a subdirectory e.g. mount the server-directory to /net/media/data/video/servervideo and start the client-vdr like this: vdr -Pstreamdev-client -Pxineliboutput -v/net/media/data/video
Unfortunately I don't understand. Could you please show examples?
My VDR-client has this directories: /video /video/server
I mount my VDR-server to /video/server, e.g. mount -t nfs -o ro server:/video /video/server
The VDR-client is started this way: vdr -Pstreamdev-client -Pxineliboutput -v /video
Regards, Stephan.
On Fri, Mar 08 2013, Stephan Loescher wrote:
The VDR-client is started this way: vdr -Pstreamdev-client -Pxineliboutput -v /video
Thanks, now I understand: /video is writable by vdr. I don't want that: the client sees the same setup files (also the timers) as the server, so the client would try to record the same as the server. The client should not be able to record anything.
Thanks also to Steffen and Udo for your suggestions. I'm sure, that the unionfs or aufs solutions would work, but I would like to keep things as simple as possible: an ro-nfs-mount and a patched vdr.c work quite well.
I've just finished my vdr-setup: http://pmrb.free.fr/vdr/ Any comments are welcome!
Hi!
The VDR-client is started this way: vdr -Pstreamdev-client -Pxineliboutput -v /video
Thanks, now I understand: /video is writable by vdr. I don't want that: the client sees the same setup files (also the timers) as the server, so the client would try to record the same as the server.
No. The setup, timers, etc. from the server are all in the clients /video/server directory. The client does not use them, because they are not in its video-root-direcory.
When you use the suggested solution with unionfs, then the client uses the servers setup/timers/epg/etc. because it sees them in its /video-directory.
Regards, Stephan.
On Fri, Mar 08 2013, Stephan Loescher wrote:
No. The setup, timers, etc. from the server are all in the clients /video/server directory. The client does not use them, because they are not in its video-root-direcory.
In my case, the setup for client and server are the same, because I want it this way. For now I'm lucky with this design, but whenever I'll need different setups for client and server, I'll change that of course...
When you use the suggested solution with unionfs, then the client uses the servers setup/timers/epg/etc. because it sees them in its /video-directory.
I'll keep this idea in my mind, and whenever I'll see, that my choices are too limited, I'll reconsider your suggestions.
Thanks,
Am 08.03.2013 19:35, schrieb Stephan Loescher:
When you use the suggested solution with unionfs, then the client uses the servers setup/timers/epg/etc. because it sees them in its /video-directory.
Only until the first write, after that the client will continue with its local writable copy.
It is generally possible (and in a network shared environment also a good idea) to have config files in a different place, and just recordings within /video. If you definitely want shared (read-only) config files, I'd suggest using symbolic links, like /etc/vdr/channels.conf -> /net/media/data/vdr-config/channels.conf. Solves a lot of problems, like clients trying to record the same as the server because of same timers.conf, or not having to configure streamdev-client on the server.
Cheers,
Udo
Am 05.03.2013 10:35, schrieb Peter Münster:
How is it possible, to mount the video directory in read-only mode? I want to use a slave vdr like this: vdr -Pstreamdev-client -Pxineliboutput -v/net/media/data/video But it does not work, because /net/media/data is mounted read-only. The slave vdr should not write anything, just read the recordings.
You can always mount an unionfs or aufs on top of the read only mount, and redirect all write access to a local disk or ram disk. That way VDR will be able to write its status files without changing the source file system.
Cheers,
Udo