USB & Network simultaneously

USB & Network simultaneously

Postby fa2konline » Mon Mar 04, 2013 11:06 am

Hi guys,

your firmware ist really nice, btw. :-)

I have bought the lacie NSv2 to watch videos from my tv (with usb) and fill the drive over network. I know thats not a good idea to read/write on the same partition from 2 devices, so my idea was to do following:

mount the image file rw and gave the network daemon full access on it,
create a symlink on that share and gave the usb daemon just ro access on the symlink

But as a non linux guru im stucking at the image mount and it give me an error that the argument isnt valid (mount -t vfat -o loop /media/internal_8/images/1 /shares/USBShare1)

If this is not possible, have you another idea how i can get this szenario working?

Thanks a lot
fa2konline
 
Posts: 2
Joined: Tue Feb 26, 2013 7:26 pm

Re: USB & Network simultaneously

Postby Mijzelf » Mon Mar 04, 2013 3:05 pm

You can't. It would crash your TV. The reason is that you are not sharing a filesystem over USB, but a bunch of sectors. The filesystem only exists in the perception of the TV.

When you would 'double mount' the disk, you have two perceptions of the filesystem. One in the TV, and one in the NAS. Those perceptions are not synchronized. So from the TV point of view, the contents of the sectors are changing when the NAS changes anything. Even worse, the TV will cache parts of the filesystem, and never read them again. That means it can have an obsolete perception of the filesystem, an try to read files and directories which are no longer there. That will not give a 'file not found' error, because the TV acts on sector level. It will just read the sectors where the file used to be, and do whatever it wanted to do. And possibly crash. The firmware might not be prepared for files changing while read.

The best you can get is a read-only filesystem on both devices. But I don't know if the reverse USB mass storage driver on the NAS supports being a 'read-only' USB disk.
Mijzelf
 
Posts: 255
Joined: Wed Nov 21, 2012 9:12 am

Re: USB & Network simultaneously

Postby fvdw » Mon Mar 04, 2013 5:40 pm

which firmware are you using, fvdw-sl ?

In principle it can be done what you propose but will encounter problems as described by Mijzelf. Whatever you do never ever write from two sources to the disk image as it might get corrupt meaning no longer accessible...Thats more serious then crashing the TV


Anyhow if you want to the commands to mount the disk image if prepared on fvdw-sl are:
Code: Select all
losetup -o 32256 /dev/loopx /path-to/diskimage

replace x by the number of a free loop device and diskimage by the actual name of the disk image.
Then mount the loop device
Code: Select all
mount -o umask=000,codepage=850,iocharset=utf8 /dev/loopx /path-to/mountpoint
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: USB & Network simultaneously

Postby fa2konline » Tue Mar 05, 2013 8:53 pm

thanks a lot guys for the replies and the commands.

Will try to get it working w/o data corruption :-)
fa2konline
 
Posts: 2
Joined: Tue Feb 26, 2013 7:26 pm


Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 6 guests